how to setup file system usage

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: how to setup file system usage

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how to setup file system usage

Post 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" 
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: how to setup file system usage

Post 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"
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how to setup file system usage

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: how to setup file system usage

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: how to setup file system usage

Post by scottwilkerson »

On
donnyforbes wrote:so on the nagios server add this?
No, on the remote server.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: how to setup file system usage

Post 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 ...
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how to setup file system usage

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
donnyforbes
Posts: 357
Joined: Tue Jun 13, 2017 2:17 pm

Re: how to setup file system usage

Post 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
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: how to setup file system usage

Post 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"
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked