Open nyetwurk opened 5 years ago
Interesting!
In your use-case you run plugins provided by munin and you change the graph_period
- correct?
Are you doing this via configuration or by changing the plugin?
I have a plugin where graph_period is adjustable by env, so both :)
I am not entirely sure, whether it should be the responsibility of the plugin or munin's, to handle a non-default ${graph_period}
.
Since the graph_period
can be configured by the munin master (the plugin does not know this), it feels like the munin master should be responsible for scaling warning/critical levels for DERIVE
and COUNTER
fields.
@steveschnepp: what do you think?
(and min/max fields, which is somewhere else, i cant figure out where - munin-graph?)
I can't say that I've considered this issue at any time.
I think the most important consideration here is KISS plugins: Keep the plugins (and the node) as simple to make as possible - complexity falls on the master.
Also the plugin can't know what ${graph_period} the master uses for the final rendering.
@nyetwurk 's plugin has a bug it seems. It should emit graph_period
if it wants to control it (see https://munin.readthedocs.io/en/latest/reference/plugin.html#plugin-reference).
It does emit graph_period
graph_title Harmony Reward Rate
graph_category other
graph_args --base 1000 -l 0
graph_vlabel ONE/hour
graph_scale yes
graph_period hour
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.label one1y0xc_0
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.info Harmony Rewards Rate
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.max 0.02777777777777778
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.min 0
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.warning 0.0097:
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.critical 0.0028:
one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.type DERIVE
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.label one18lp2_1
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.info Harmony Rewards Rate
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.max 0.02777777777777778
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.min 0
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.warning 0.0097:
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.critical 0.0028:
one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.type DERIVE
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.label one1geml_0
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.info Harmony Rewards Rate
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.max 0.02777777777777778
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.min 0
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.warning 0.0097:
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.critical 0.0028:
one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.type DERIVE
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.label one1pnjl_1
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.info Harmony Rewards Rate
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.max 0.02777777777777778
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.min 0
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.warning 0.0097:
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.critical 0.0028:
one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.type DERIVE
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.label one19yh7_3
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.info Harmony Rewards Rate
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.max 0.02777777777777778
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.min 0
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.warning 0.0097:
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.critical 0.0028:
one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.type DERIVE
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.label one13rnn_0
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.info Harmony Rewards Rate
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.max 0.02777777777777778
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.min 0
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.warning 0.0097:
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.critical 0.0028:
one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.type DERIVE
Oh sorry, I searched to source and couldn't find the string.
Nicolai
On 14/08/2019 16:35, Nye Liu wrote:
It does emit graph_period
|graph_title Harmony Reward Rate graph_category other graph_args --base 1000 -l 0 graph_vlabel ONE/hour graph_scale yes graph_period hour one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.label one1y0xc_0 one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.info Harmony Rewards Rate one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.max 0.02777777777777778 one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.min 0 one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.warning 0.0097: one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.critical 0.0028: one1y0xcf40fg65n2ehm8fx5vda4thrkymhpg45ecj.type DERIVE one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.label one18lp2_1 one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.info Harmony Rewards Rate one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.max 0.02777777777777778 one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.min 0 one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.warning 0.0097: one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.critical 0.0028: one18lp2w7ghhuajdpzl8zqeddza97u92wtkfcwpjk.type DERIVE one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.label one1geml_0 one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.info Harmony Rewards Rate one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.max 0.02777777777777778 one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.min 0 one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.warning 0.0097: one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.critical 0.0028: one1gemlvpun4528ajv7pcn2d9fufzcv80kjt3dxwg.type DERIVE one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.label one1pnjl_1 one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.info Harmony Rewards Rate one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.max 0.02777777777777778 one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.min 0 one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.warning 0.0097: one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.critical 0.0028: one1pnjl29uv2avuv5ts9nejwecc5em37yu92vllqn.type DERIVE one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.label one19yh7_3 one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.info Harmony Rewards Rate one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.max 0.02777777777777778 one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.min 0 one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.warning 0.0097: one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.critical 0.0028: one19yh7lug7x76xtyvhqqlz0yahh3fz7vhlj50s2j.type DERIVE one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.label one13rnn_0 one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.info Harmony Rewards Rate one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.max 0.02777777777777778 one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.min 0 one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.warning 0.0097: one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.critical 0.0028: one13rnn8uawlpqpcsh0hpm2k26xxusq639wkvl7r5.type DERIVE |
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/munin-monitoring/munin/issues/1214?email_source=notifications&email_token=AAK7OJALQKKBGSP2QSPD5PTQEQJ2PA5CNFSM4IJ4Z6FKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4I7X2I#issuecomment-521272297, or mute the thread https://github.com/notifications/unsubscribe-auth/AAK7OJBJJ6Y6FRVUAVGHVDDQEQJ2PANCNFSM4IJ4Z6FA.
Yea its a bit obfuscated in the code since those are concatenated with graph_
later on
Because this just bit me and it took way too long to find the underlying cause, +1, and: It's awkward that .type DERIVE
values in graphs of plugins e.g. w/ graph_period minute
are based on a different scale compared to the thresholds for warning and critical shown below the graphs.
Another aspect is that the horizontal lines for warning and critical thresholds drawn onto the graphs are not scaled to graph_period. In one case these thresholds are low (~ 0.2) so several lines are drawn close to 0 which makes lower values in the graph practically unreadable.
More than 10 years ago I added commit c4b6c44, committed by @steveschnepp. This week I've used few hours wondering why I didn't get email warning when the value was clearly over the warning limit.
This issue is the reason.
For example, if
graph_period
is hour, and you want to warn on less than 100/hour, you have to set warning tostr(100/60/60)+":"
, and the 'warning' will read0.02777777777:
in the graph.Furthermore, the resulting (very small) warning/critical threshold lines are near zero and display nowhere near the graphed data.
Debian 2.0.49-3