issue 2 check remote server free disk space using check_nrpe
issue 2 check remote server free disk space using check_nrpe
Hi,
I am facing an issue to check Remote server's free disk space of a particular 'Path' using "check_nrpe" plugin.
I used below command to check the the free disk space for current logged in server and got the success --
./check_disk -w 20% -c 10% -p /var
( output --> DISK WARNING - free space: /var 918 MB (19% inode=66%);| /var=3737MB;3928;4419;0;4911)
However when I am trying to check the same (using check_nrpe) for other remote servers from my current logged in server using below command I am getting error message as " ./check_nrpe: invalid option -- 'w' Incorrect command line arguments supplied"
Command ---> ./check_nrpe -H xyz.com -w 20% -c 20% -p /var
I tried below command also but getting error message as "CHECK_NRPE: Socket timeout after 10 seconds."
Command --> ./check_nrpe -H xyz.com
I tried below command also but "Socket timeout" error is coming after 10 seconds.
Command --> ./check_nrpe -H xyz.com -c check_dm-o 'warning=free<20%' 'critical=free<10%' show-all
Appreciate all your extended help.
Regards
Debashis
I am facing an issue to check Remote server's free disk space of a particular 'Path' using "check_nrpe" plugin.
I used below command to check the the free disk space for current logged in server and got the success --
./check_disk -w 20% -c 10% -p /var
( output --> DISK WARNING - free space: /var 918 MB (19% inode=66%);| /var=3737MB;3928;4419;0;4911)
However when I am trying to check the same (using check_nrpe) for other remote servers from my current logged in server using below command I am getting error message as " ./check_nrpe: invalid option -- 'w' Incorrect command line arguments supplied"
Command ---> ./check_nrpe -H xyz.com -w 20% -c 20% -p /var
I tried below command also but getting error message as "CHECK_NRPE: Socket timeout after 10 seconds."
Command --> ./check_nrpe -H xyz.com
I tried below command also but "Socket timeout" error is coming after 10 seconds.
Command --> ./check_nrpe -H xyz.com -c check_dm-o 'warning=free<20%' 'critical=free<10%' show-all
Appreciate all your extended help.
Regards
Debashis
Last edited by debdutta on Fri May 25, 2018 6:07 am, edited 3 times in total.
Re: issue 2 check remote server free disk space using check_
When using arguments with the check_nrpe plugin, you have to add the -a option and then the options you need to pass to the remote NRPE system.
For example, you would specify the check_nrpe command like the following.
Or like this
Depending on how the check_disk command is setup in the remote NRPE config file, you may have to change the arguments to match.
The Socket Timeout message could be caused by the following.
The NRPE agent is not running on the remote server.
The NRPE agent is not configured to listen to the Nagios servers IP address
The firewall is not allowing inbound connections to port 5666.
This article can help out in troubleshooting the NRPE agent.
https://support.nagios.com/kb/article/n ... e-615.html
Let us know if you have any other questions.
-a, --args=LIST Optional arguments that should be passed to the command,
separated by a space. If provided, this must be the last
option supplied on the command line.
For example, you would specify the check_nrpe command like the following.
Code: Select all
check_nrpe -H xyz.com -a '-w 20% -c 20% -p /var'
Code: Select all
check_nrpe -H xyz.com -a -w 20% -c 20% -p /var
The Socket Timeout message could be caused by the following.
The NRPE agent is not running on the remote server.
The NRPE agent is not configured to listen to the Nagios servers IP address
The firewall is not allowing inbound connections to port 5666.
This article can help out in troubleshooting the NRPE agent.
https://support.nagios.com/kb/article/n ... e-615.html
Let us know if you have any other questions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: issue 2 check remote server free disk space using check_
Hi,
Thanks for your prompt reply.
As per your suggestion I tried both the command however I did not get the expected result. Below I am sharing the command along with error message --
1. Command ---> ./check_nrpe -H xyz.com -a '-w 20% -c 20% -p /var'
Output ---> CHECK_NRPE: Socket timeout after 10 seconds.
2. Command ---> ./check_nrpe -H xyz.com -a -w 20% -c 20% -p /var
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
I Think we need to pass the user ID and PWD of " xyz.com" server. What is the option/parameter for that.
Regarding NRPE installation status & validity of the Port in " xyz.com" server, I already send the request to our "Nagios" Admin team.
Thanks for your prompt reply.
As per your suggestion I tried both the command however I did not get the expected result. Below I am sharing the command along with error message --
1. Command ---> ./check_nrpe -H xyz.com -a '-w 20% -c 20% -p /var'
Output ---> CHECK_NRPE: Socket timeout after 10 seconds.
2. Command ---> ./check_nrpe -H xyz.com -a -w 20% -c 20% -p /var
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
I Think we need to pass the user ID and PWD of " xyz.com" server. What is the option/parameter for that.
Regarding NRPE installation status & validity of the Port in " xyz.com" server, I already send the request to our "Nagios" Admin team.
Last edited by debdutta on Fri May 25, 2018 6:09 am, edited 2 times in total.
Re: issue 2 check remote server free disk space using check_
Hi,
Add on my last reply, I also tried below command however same Socket Time out error is coming --
./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 20% -p /var'
CHECK_NRPE: Socket timeout after 10 seconds.
To check the port I used below command however no output found --
netstat -anp|grep 5666
Appreciate all your extended help.
Add on my last reply, I also tried below command however same Socket Time out error is coming --
./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 20% -p /var'
CHECK_NRPE: Socket timeout after 10 seconds.
To check the port I used below command however no output found --
netstat -anp|grep 5666
Appreciate all your extended help.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: issue 2 check remote server free disk space using check_
This actually looks better, but is xyz.com setup to accept the connection?debdutta wrote:Hi,
Add on my last reply, I also tried below command however same Socket Time out error is coming --
./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 20% -p /var'
CHECK_NRPE: Socket timeout after 10 seconds.
To check the port I used below command however no output found --
netstat -anp|grep 5666
Appreciate all your extended help.
how about
Code: Select all
./check_nrpe -H xyz.com -c check_disk -a -w 20% -c 20% -p /var
Re: issue 2 check remote server free disk space using check_
Hi,
Thanks for your reply, I already tried the suggested below command also however same error message is coming --------
./check_nrpe -H xyz.com -c check_disk -a -w 20% -c 20% -p /var
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Regarding connectivity of the server xyz.com, I tried the below command and get expected result -----
./check_disk -w 20% -c 10% -p /var
Appreciate your early response.
Thanks for your reply, I already tried the suggested below command also however same error message is coming --------
./check_nrpe -H xyz.com -c check_disk -a -w 20% -c 20% -p /var
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Regarding connectivity of the server xyz.com, I tried the below command and get expected result -----
./check_disk -w 20% -c 10% -p /var
Appreciate your early response.
Last edited by debdutta on Fri May 25, 2018 6:11 am, edited 2 times in total.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: issue 2 check remote server free disk space using check_
Something stripped my quote out, I meant to have you try
Code: Select all
./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 10% -p /var'
Re: issue 2 check remote server free disk space using check_
Hi,
Tried below command also however same 'Socket Timeout' message is coming ---
monap01:/usr/local/nagios/libexec$ ./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 10% -p /var'
CHECK_NRPE: Socket timeout after 10 seconds.
For checking purpose tried to connect " xyz.com" from " xyz.com" host using below command however the output message is different in this case ---
monap02:/usr/local/nagios/libexec$ ./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 10% -p /var'
connect to host xyz.com port 5666: Connection refused
I think there is some permission related issue is there against "check_nrpe" .
It will be great if you can help me to cross check that all necessary permission/access is there to execute check_nrpe plugin.
For your information, I execute below command on both 01 & 02 server and get expected result ---
./check_disk -w 20% -c 10% -p /var
DISK OK - free space: /var 2436 MB (52% inode=99%);| /var=2218MB;3928;4419;0;4911
Please note that I am using my Personal "UID" & "PWD" to logging which have execution permission of all 'Nagios' plugin
Appreciate all your extended help.
Tried below command also however same 'Socket Timeout' message is coming ---
monap01:/usr/local/nagios/libexec$ ./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 10% -p /var'
CHECK_NRPE: Socket timeout after 10 seconds.
For checking purpose tried to connect " xyz.com" from " xyz.com" host using below command however the output message is different in this case ---
monap02:/usr/local/nagios/libexec$ ./check_nrpe -H xyz.com -c check_disk -a '-w 20% -c 10% -p /var'
connect to host xyz.com port 5666: Connection refused
I think there is some permission related issue is there against "check_nrpe" .
It will be great if you can help me to cross check that all necessary permission/access is there to execute check_nrpe plugin.
For your information, I execute below command on both 01 & 02 server and get expected result ---
./check_disk -w 20% -c 10% -p /var
DISK OK - free space: /var 2436 MB (52% inode=99%);| /var=2218MB;3928;4419;0;4911
Please note that I am using my Personal "UID" & "PWD" to logging which have execution permission of all 'Nagios' plugin
Appreciate all your extended help.
Last edited by debdutta on Fri May 25, 2018 6:15 am, edited 4 times in total.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: issue 2 check remote server free disk space using check_
How did you install NRPE on each of these machines? Are you sure it is running? Did you add the other servers IP to the allowed IP list ?
Can you send up the nrpe.cfg and and other .cfg files included in it
Can you send up the nrpe.cfg and and other .cfg files included in it
Re: issue 2 check remote server free disk space using check_
Hi,
I am using above commands from Command Line (monap02:/usr/local/nagios/libexec$ ) only to check the correctness of the command.
I try to find out the nrpe.cfg under "/usr/local/nagios/" folder however could not find out the same.
Regarding NRPE installation if I type "/usr/local/nagios/libexec$ ./check_nrpe" from command prompt I am getting below message
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
Pl. help me to prepare the nrpe.cfg file if it is mandatory to check the command from 'Command prompt' and let me know where i have to save that .cfg file.
I am using above commands from Command Line (monap02:/usr/local/nagios/libexec$ ) only to check the correctness of the command.
I try to find out the nrpe.cfg under "/usr/local/nagios/" folder however could not find out the same.
Regarding NRPE installation if I type "/usr/local/nagios/libexec$ ./check_nrpe" from command prompt I am getting below message
Incorrect command line arguments supplied
NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 2.15
Last Modified: 09-06-2013
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: Anonymous DH Mode, OpenSSL 0.9.6 or higher required
Usage: check_nrpe -H <host> [ -b <bindaddr> ] [-4] [-6] [-n] [-u] [-p <port>] [-t <timeout>] [-c <command>] [-a <arglist...>]
Pl. help me to prepare the nrpe.cfg file if it is mandatory to check the command from 'Command prompt' and let me know where i have to save that .cfg file.
Last edited by debdutta on Fri May 25, 2018 6:16 am, edited 1 time in total.