Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm writing a munin plugin and display a GAUGE which displays a value which constantly increases.

What I want to add to that plugin is a day/week/etc. average. I simply have to substract the day's minimal value from the maximal value.

But I have no clue how to access that data. Is it even possible?

I've read on the plugin documentation that there are fields called {fieldname}.min but they seem to be config fields not data fields.

Did anyone try something like that yet?

share|improve this question

1 Answer 1

You'll need to store that data yourself, unfortunately. In the graphs that munin generates, the min/avg/max values are generated by RRD from the RRD database; munin, and munin plugins especially, don't have access to that data as far as I know.

Munin plugins are passed an environment variable named PLUGIN_STATE; it gives the name of a directory where the plugin can store data that needs to persist from one invocation to the next. You will have to write your plugin to use a file in the state directory to remember the daily minimum and maximum values.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.