I have a set of logs that have the following shape:
{
delta: number
time: 'yyyy-mm-ddThh:mm:ss'
records: number
msg='target message'
}
This comes from a job that runs for some amount of time every hour.
So far I have min (rate({container_name="name"} |= target message | json delta="delta" [15m])) which returns a values but does not seem to be correct (and is the same for every period). Using min by() groups on delta which is not desirable.
Ideally, I would like this to group by hour (the actual hour, not a rolling period of time) and show min, 5%, 10%, 25%.
Is there a way to extract the YYYY-MM-DDTHH portion of the startTime key and group on that?
Any other suggestions are greatly appreciated, thanks
thanks, that label_format is very helpful. Where is the best place to find documentation on label_format and string manipulation functions? Searching for grafana label_format points me to Template functions but that doesn’t seem like a very good resource.