check_by_ssh_wrapper

Trying to mutualise Nagios services (or Shinken in my case) and NRPE configuration, sometimes a check returns to many data for NRPE or a host in DMZ don't have NRPE port accessible.

On one infrastructure I monitor, while my NRPE configuration can check free disk space on local file systems (among other), I have a NAS in one DMZ with a lot of file systems (one LVM volume by share). The size of returned data, with Nagios perf data was above NRPE limit (1 kB). Rather than moving NRPE command line in Shinken services configuration and having to handle character escaping, rights and complexify Shinken configuration, I wrote this little script which use via check_by_ssh the same parameters than check_nrpe and read NRPE configuration one the client host to validate the command and execute it.

Read more…