0

I am trying to do a simple alert in Munin checking SW RAID 1 status where a metric of 2 disks is healthy, 1 disk is Warning and 0 disks is Critical.

All the Munin monitors I've seen are triggered when a value is too high e.g. Disk space is over 90% but in my case, I want the reverse. I can't seem to find anything in the Munin docs that support this.

I know I could reverse the logic such that it monitors the number of unhealthy disks, i.e. 0 healthy, 1 Warning and 2 Critical but it just seems neater the other way around.

Jason
  • 121
  • 6

2 Answers2

0

From http://guide.munin-monitoring.org/en/latest/reference/plugin.html#plugin-attributes-data on the warning / critical section it says:

Attribute:  {fieldname}.critical
Value:  integer or decimal numbers (both may be signed)
Type:   optional
Description:    Can be a max value or a range separated by colon. E.g. “min:”, “:max”, “min:max”, “max”. Used by munin-limits to submit an error code indicating critical state if the value fetched is outside the given range.
See also:   Let Munin croak alarm
Default:

Interestingly, though at http://guide.munin-monitoring.org/en/latest/reference/munin.conf.html#munin-conf it says:

The value at which munin-limits will mark the service as being in a critical state. Value can be a single number to specify a limit that must be passed or they can be a comma separated pair of numbers defining a valid range of values.

So, not sure if it is either, or just one - I have seen reference to the : values elsewhere too. Good luck!

Bryan
  • 101
  • 1
0

The answer from Bryan is linking to the correct documentation. As i needed to solve this for another plugin of ours. The output of such a plugin should be:

sudo munin-run my_plugin

raid_disks_healthy.value 3

sudo munin-run my_plugin config

...
raid_disks_healthy.warning 2:
raid_disks_healthy.critical 1:

meaning less than 2 healthy disks is warning, less than 1 healthy disk is critical

bigbear3001
  • 113
  • 5