Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zmarkdown] Set graph_vlabel for processus status in Munin controller #502

Conversation

philippemilink
Copy link
Member

Otherwise Munin complains:

[WARNING] 1 lines had errors while 8 lines were correct in data from 'config zmd_status'

The part of the label 0=online, 1=stopped, 2=errored could be generated automatically from the status 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

The concerned URL is http://127.0.0.1:27272/munin/config/status.

Otherwise Munin complains `[WARNING] 1 lines had errors while 8 lines
were correct in data from 'config zmd_status'`.
@StaloneLab
Copy link
Member

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.

@StaloneLab
Copy link
Member

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.

@StaloneLab StaloneLab closed this Jan 5, 2024
@StaloneLab StaloneLab added this to the [email protected] milestone Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants