Closed philippemilink closed 7 months ago
I don't like that much how the graph is renderer... Do you know if there is another way to show this legend? Munin does not seem to support custom things for axis labels. Maybe we should simply skip a line after "Status", or not display it at all? Anyways, I agree what you suggest would be better than nothing, as I always thought this graph was not working anymore since it showed 0 all the time.
Also, to generate the legend automatically from the status
object, you could use:
Object.entries(status).map(([label, state]) => `${state}=${label}`).join(', ')
Of course, that would require moving the status
object at the beginning of the block, before definition of the graph.
Please see commit zmarkdown@425a5395d1de9b6ac5743c5a4d9a4ae8af9f3372, based on your work. Closing the PR, but feel free to comment if the proposed solution does not suit your needs.
Otherwise Munin complains:
The part of the label
0=online, 1=stopped, 2=errored
could be generated automatically from thestatus
object, but that's would maybe be over-engineered (and I don't know how to do it properly!).I also added some property to the graph.
Here is how it looks:![zmd_status-day](https://github.com/zestedesavoir/zmarkdown/assets/5911232/14f65ed4-7911-4f38-a1bd-d0691dc09e77)
The concerned URL is http://127.0.0.1:27272/munin/config/status.