Page 2 of 3

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:22 pm
by donnyforbes
npolovenko wrote:@donnyforbes, Just noticed that your command is repeating 2 times:

Code: Select all

[nagios@nag ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -c check_folder_size -a "-f /var -s g -w 60 -c 80" 
The command needs to look like this:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_folder_size -a "-f /var -s g -w 60 -c 80"
Where 192.168.1.12 is the IP address of the remote server that has the /var folder.
And yes, the command needs to be executed from the Nagios XI server's console.

If you get the SSL handshake error again, please refer to this tutorial to troubleshoot the problem:
https://support.nagios.com/kb/article/n ... e-615.html

Ran again and got this ...

[nagios@nag ~]$ /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_folder_size -a "-f /var -s g -w 60 -c 80"
NRPE: Command 'check_folder_size' not defined

different error did I do something wrong?

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:24 pm
by npolovenko
@donnyforbes, I apologize, our command was:

Code: Select all

command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
So please rerun the command with the correct name:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80" 

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:27 pm
by donnyforbes
npolovenko wrote:@donnyforbes, I apologize, our command was:

Code: Select all

command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
So please rerun the command with the correct name:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_disk_new -a "-f /var -s g -w 60 -c 80" 

Do you need me to add this in the nrpe.cfg file on the nagios server
command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$

then run this from the XI
/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_disk_new -a "-f /var -s g -w 60 -c 80"

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:29 pm
by npolovenko
@donnyforbes
Do you need me to add this in the nrpe.cfg file on the nagios server
command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
On the remote nrpe server. In /usr/local/nagios/etc/nrpe.cfg file, to the section with all the other commands.

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:30 pm
by donnyforbes
npolovenko wrote:@donnyforbes
Do you need me to add this in the nrpe.cfg file on the nagios server
command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
On the remote nrpe server. In /usr/local/nagios/etc/nrpe.cfg file, to the section with all the other commands.
so on the nagios server add this?

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:32 pm
by scottwilkerson
On
donnyforbes wrote:so on the nagios server add this?
No, on the remote server.

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:36 pm
by donnyforbes
scottwilkerson wrote:On
donnyforbes wrote:so on the nagios server add this?
No, on the remote server.
Here is what I did. On the remote server I added the following

Code: Select all

command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
then ran the following command below.

[nagios@nag ~]$

Code: Select all

 /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_disk_new -a "-f /var -s g -w 60 -c 80" 
NRPE: Unable to read output

output was a little different ...

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:45 pm
by npolovenko
@donnyforbes, Now your command is repeating 3 times.
/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_disk_new -a "-f /var -s g -w 60 -c 80"
Here is the correct command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80"
*Where 192.168.1.12 is the IP address of the remote server.

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:48 pm
by donnyforbes
npolovenko wrote:@donnyforbes, Now your command is repeating 3 times.
/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -c check_disk_new -a "-f /var -s g -w 60 -c 80"
Here is the correct command:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80"
*Where 192.168.1.12 is the IP address of the remote server.
yes .12 is the remote server where I add this to.

Code: Select all

command[check_disk_new]=/usr/local/nagios/libexec/check_folder_size $ARG1$
Just ran again and got this.

[nagios@nag ~]$

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80" 
NRPE: Unable to read output

Re: how to setup file system usage

Posted: Tue Jun 19, 2018 4:56 pm
by npolovenko
@donnyforbes
Just ran again and got this.

Code: Select all

[nagios@nag ~]$
/usr/local/nagios/libexec/check_nrpe -H 192.168.1.186 -t 30 -c /usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80"

NRPE: Unable to read output
This is not the command that I suggested. The command was:

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H 192.168.1.12 -t 30 -c check_disk_new -a "-f /var -s g -w 60 -c 80"