Hi,
I just want to share a template for monitoring multipath devices.
Nearly all items make usage of the multipath command which needs root privileges.
To avoid running Zabbix-Agent with root privileges or making other nasty changes to the system, I decided to give the user zabbix the needed privileges via sudo.
Because I plan to use this on hundreds of servers which log any execve() system call I decided to add alternative UserParameter definitions which reduce the usage of multipath (and sudo) to a minimum.
Depending which UserParameter variation is enabled one has a more accurate measurement or a more resource friendly measurement.
In my first attempt I used multipathd to gather (a lot more) information. But if multipathd is in trouble, it tends to freeze what may result in lots of unwanted processes.
Parsing multipath's output would certainly look much prettier and would be for sure much more powerful if implemented by a shell script.
However, I don't like to put additional files in place and instead try to do the work in as short as possible one-liners, with as less as possible commands.
I just want to share a template for monitoring multipath devices.
Nearly all items make usage of the multipath command which needs root privileges.
To avoid running Zabbix-Agent with root privileges or making other nasty changes to the system, I decided to give the user zabbix the needed privileges via sudo.
Because I plan to use this on hundreds of servers which log any execve() system call I decided to add alternative UserParameter definitions which reduce the usage of multipath (and sudo) to a minimum.
Depending which UserParameter variation is enabled one has a more accurate measurement or a more resource friendly measurement.
In my first attempt I used multipathd to gather (a lot more) information. But if multipathd is in trouble, it tends to freeze what may result in lots of unwanted processes.
Parsing multipath's output would certainly look much prettier and would be for sure much more powerful if implemented by a shell script.
However, I don't like to put additional files in place and instead try to do the work in as short as possible one-liners, with as less as possible commands.