So I have a default linux config working with NRDS. I am trying to add a check_services so I can monitor all the services related to IPA.
I can add it to the config I have defined but it doesn't seem to return the correct results. The service in Nagios XI shows as a status of unknown.
Running the check manually as the nagios user on the system results in the following:
/usr/local/nrdp/clients/nrds/nrds.pl -H 'hostname'
/usr/local/nagios/libexec/utils.sh: line 2: $'\r': command not found
/usr/local/nagios/libexec/utils.sh: line 8: $'\r': command not found
/usr/local/nagios/libexec/utils.sh: line 15: syntax error near unexpected token `$'{\r''
'usr/local/nagios/libexec/utils.sh: line 15: `print_revision() {
: numeric argument requiredheck_services: line 112: exit: 0
Sent 7 checks to https://fgdn/nrdp/
Here is my config:
command[__HOST__]=/usr/local/nagios/libexec/check_ping -H localhost -w 200.0,40% -c 400.0,80% -p 1
command[Check Users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[Check Load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[Check Disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /
command[Check Zombie Procs]=/usr/local/nagios/libexec/check_procs -w 100 -c 150 -s Z
command[Check Total Procs]=/usr/local/nagios/libexec/check_procs -w 250 -c 300
command[Check Directory Service]=/usr/local/nagios/libexec/check_services -p 'dirsrv.service'
Running the check_services command manually by itself gives:
./check_services -p 'dirsrv'
/usr/local/nagios/libexec//utils.sh: line 2: $'\r': command not found
/usr/local/nagios/libexec//utils.sh: line 8: $'\r': command not found
/usr/local/nagios/libexec//utils.sh: line 15: syntax error near unexpected token `$'{\r''
'usr/local/nagios/libexec//utils.sh: line 15: `print_revision() {
dirsrv: 2
: numeric argument required exit: 0
A version check of the command gives:
./check_services -V
/usr/local/nagios/libexec//utils.sh: line 2: $'\r': command not found
/usr/local/nagios/libexec//utils.sh: line 8: $'\r': command not found
/usr/local/nagios/libexec//utils.sh: line 15: syntax error near unexpected token `$'{\r''
'usr/local/nagios/libexec//utils.sh: line 15: `print_revision() {
check_services - 0.01.1
: numeric argument requiredexit: 0
Issue with check_services and NRDS
-
RobertWebb
- Posts: 13
- Joined: Wed May 11, 2016 1:30 pm
Re: Issue with check_services and NRDS
SO this is still an issue for the check_service script, but I moved to the check_init_service script for monitoring my services.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Issue with check_services and NRDS
It sounds like the script has a problem, possible with DOS/Windows line endingRobertWebb wrote:SO this is still an issue for the check_service script, but I moved to the check_init_service script for monitoring my services.
Can you attach it if you still want to use it?