Hello! This is Sudo (
id:do-su-0805) from the Mackerel CRE team.
I’d like to let you know about a recent fix we made as per the title.
Previously, when you wanted to check posted metrics on the graph, if there were not more than a certain number of metrics posted within the display period (30 minutes, 1 day, etc.), you would see “No metrics available for the selected period” and you could not view the metrics. This has now been fixed so that if at least one metric has been posted within the display period, the graph will be drawn, enabling you to view the metric(s)!
Use cases
Case where the results of a batch executed once a day around midnight are posted as metrics
In a case where the results of a batch executed once a day around midnight are posted as metrics, the graph could be displayed if the display range was selected as the neighborhood of the posting time, but if the range was set to the whole day of execution, the message “No metrics available for the selected period” would appear.
With this fix, even if only one metric has been posted within the display period, it is now viewable on the graph as shown below.
Case where the results of irregularly run batches are posted as metrics
Similarly, in a case where the results of irregularly run batches are posted as metrics, the graph could be displayed if the display range was selected as the neighborhood of the posting time, but the message “No metrics available for the selected period” would appear depending on the display period. With this fix, the graph will appear as shown below even for display intervals where the message “No metrics available for the selected period” would have been shown in the past.
Conclusion
This feature was originally designed this way based on metrics with a one-minute granularity posted by mackerel-agent, having determined that when showing them as averages according to the display period, it would be inappropriate for values of metrics posted at a low frequency like once per hour due to errors or the like to be used without averaging.
Now, however, metrics are posted in a variety of ways including not only mackerel-agent but also APIs and CLI tools (mkr), and we received a lot of feedback about posted metrics not being displayed due to this previous design.
This change addresses those sorts of customer concerns. We hope this fix will make Mackerel even more convenient to use!