Hello,
I have a local disk wait time monitor script, what is working well on out half infrastructure, but on the other half not.
/etc/sudoers
# NEEDED TO ALLOW NAGIOS TO CHECK SERVICE STATUS
Defaults:nagios !requiretty
nagios ALL = NOPASSWD:SETENV: /sbin/service, /usr/local/nagios/libexec/check_init_service, /usr/sbin/dmidecode, /usr/local/nagios/libexec/xsos, /usr/local/nagios/libexec/check_osinfo.sh, /usr/local/nagios/libexec/check_iostst_v110.sh
nrpe.cfg
command[check_diskawt]=sudo -E /usr/local/nagios/libexec/check_iostst_v110.sh $ARG1$
nrpe_user=nagios
nrpe_group=nagios
[root@host ~]# ls -l /usr/local/nagios/libexec/check_iostst_v110.sh
-rwxr-xr-x 1 nagios nagios 6928 Oct 2 09:20 /usr/local/nagios/libexec/check_iostst_v110.sh
logging in as nagios:
[nagios@host ~]$ sudo -E /usr/local/nagios/libexec/check_iostst_v110.sh -w 20 -c 38
OK - sda await (ms): 0.00; | 'sda tps'=2.99; 'sda KB_read/s'=0.00; 'sda KB_written/s'=59.70; 'sda await'=0.00; |
but if i run same chack from nrpe side:
[nagios@host ~]$ /usr/local/nagios/libexec/check_nrpe -H localhost -t 90 -c check_diskawt -a '-w 25 -c 38'
NRPE: Command timed out after 60 seconds
Now i am totally clueless, strace not give any help, also debug mode logging give me the lines:
Oct 2 13:50:10 host nrpe[18432]: WARNING: my_system() seteuid(0): Operation not permitted
Oct 2 13:50:20 host nrpe[18527]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Oct 2 13:50:20 host nrpe[18528]: WARNING: my_system() seteuid(0): Operation not permitted
Oct 2 13:50:40 host nrpe[18567]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
what is, if i found well, normal messages, and logged on that times also when other checks are coming in and working well...
Please help the issue,
best regards,
Ferenc
nrpe timeout
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: nrpe timeout
Hello Ferenec,
On the other half that is not working, did it ever work?
1. What version of the NRPE did you install?
2. From the Nagios XI server, run nmap on the remote host running NRPE and post the output. The default port for NRPE is and it should be open.
3. Run this tail command and post the output. Thanks.
On the other half that is not working, did it ever work?
1. What version of the NRPE did you install?
Code: Select all
./check_nrpe
Code: Select all
nmap <remote host ip address>
Code: Select all
tail -/var/log/messagesAs of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: nrpe timeout
Hello,
Thank you for the answer, the script is running well now. All the other nrpe check worked still when these one not...
The error was with that the nrpe calling of the command.
[command]=sudo cmd
and also the cmd contained a sudo line. When i let the sudo line in the script and delete the "sudo" section before the cmd in the [command] line, the solution begin worked on all hosts.
The case can be closed, thank you, best regards,
ferenc
Thank you for the answer, the script is running well now. All the other nrpe check worked still when these one not...
The error was with that the nrpe calling of the command.
[command]=sudo cmd
and also the cmd contained a sudo line. When i let the sudo line in the script and delete the "sudo" section before the cmd in the [command] line, the solution begin worked on all hosts.
The case can be closed, thank you, best regards,
ferenc
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nrpe timeout
Great!junkertf wrote:Hello,
Thank you for the answer, the script is running well now. All the other nrpe check worked still when these one not...
The error was with that the nrpe calling of the command.
[command]=sudo cmd
and also the cmd contained a sudo line. When i let the sudo line in the script and delete the "sudo" section before the cmd in the [command] line, the solution begin worked on all hosts.
The case can be closed, thank you, best regards,
ferenc
Locking