use check_by_ssh plugin

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
baber
Posts: 295
Joined: Wed Oct 21, 2015 4:39 am

use check_by_ssh plugin

Post by baber »

dear all
Hi



now for example with nrpe i use check_disk with this method :

add this to nrpe.cfg

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$  

and in service.cfg file for that host add this

Code: Select all

   check_command           check_nrpe!check_disk!'-w 20% -c 10 -W 20% -K 10 -e -A -i /net -i /var/named'
but wheni want use check_ny_ssh

in command.cfg file on nagios server i have added this line

Code: Select all

define command{
        command_name    check_disk
        command_line    $USER1$/check_by_ssh -H $HOSTADDRESS$ -C '/usr/local/nagios/libexec/check_disk -w $ARG2$ -c $ARG3$ -p $ARG4$ '
}
 
in service.cfg file added this

Code: Select all

define service{
        use                     local-service
        host_name               NAG
        service_description     DISk Space
        check_command           check_disk!22!20%!10%!/
        }
but i want it automatically detect all of my file system such as nrpe here i have to add each file system such as / , /usr , /var manually ?

please see attach pic it can just monitor / filesystem
Attachments
disk.jpg
User avatar
ruffsense
Posts: 140
Joined: Thu Apr 11, 2013 12:40 am

Re: use check_by_ssh plugin

Post by ruffsense »

Code: Select all

check_by_ssh -H $HOSTADDRESS$ -C "/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$"
I don't insult, I diagnose.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: use check_by_ssh plugin

Post by ssax »

Does the one just posted (utilizing $ARG1$) work for you or are you still having issues when running it through check_by_ssh?
Locked