I'm running the exporter to collect azure application gateway metrics. I face an time offset of 4 minutes for all metrics gotten from azure monitor.
I found the GetTimes function for query delay in code
// GetTimes - Returns the endTime and startTime used for querying Azure Metrics API
func GetTimes() (string, string) {
// Make sure we are using UTC
now := time.Now().UTC()
// Use query delay of 3 minutes when querying for latest metric data
endTime := now.Add(time.Minute * time.Duration(-3)).Format(time.RFC3339)
startTime := now.Add(time.Minute * time.Duration(-4)).Format(time.RFC3339)
return endTime, startTime
}
The exposed metrics endpoint does not provide any timestamp information which might explain the offset in prometheus.
...
HELP throughput_bytespersecond_total throughput_bytespersecond_total
# TYPE throughput_bytespersecond_total gauge
throughput_bytespersecond_total{resource_group="some-rg",resource_name="some-resource"} 74
...
I'm running the exporter to collect azure application gateway metrics. I face an time offset of 4 minutes for all metrics gotten from azure monitor.
I found the GetTimes function for query delay in code
The exposed metrics endpoint does not provide any timestamp information which might explain the offset in prometheus.
What am I doing wrong?