Page 3 of 4

Re: command not defined

Posted: Fri Dec 13, 2013 1:12 am
by arenist
The last time I started nagios was yesterday at 10.36 am.

Code: Select all

nagios@madpbk51:/usr/local/nagios/var> ll
insgesamt 1740
drwxrwxr-x 2 nagios nagios   4096 2013-12-13 00:00 archives
-rw-r--r-- 1 nagios nagios   1099 2013-12-12 10:36 nagios.debug
-rw-r--r-- 1 nagios nagios      6 2013-12-12 10:36 nagios.lock
-rw-r--r-- 1 nagios nagios  68398 2013-12-13 06:55 nagios.log
-rw-r--r-- 1 nagios nagios 398635 2013-12-12 10:36 objects.cache
-rw------- 1 nagios nagios 635077 2013-12-13 06:36 retention.dat
drwxrwsr-x 2 nagios nagcmd   4096 2013-12-12 10:36 rw
drwxrwxr-x 3 nagios nagios   4096 2013-12-09 13:57 spool
-rw-rw-r-- 1 nagios nagios 631983 2013-12-13 07:10 status.dat

Re: command not defined

Posted: Fri Dec 13, 2013 12:37 pm
by slansing
Out of curiosity, have you tried using your hostname instead of the IP for your host address? "VBGMADB11" Or have you tried using the IP you have defined in your host definition, for your command line tests to that host?

Re: command not defined

Posted: Fri Dec 13, 2013 5:13 pm
by arenist
Hi slansing,

I always use the hostname.

Regards arenist

Re: command not defined

Posted: Mon Dec 16, 2013 3:45 am
by arenist
It woks as well using the IP address:

Code: Select all

nagios@madpbk51:~> ping vbgmadb11
PING vbgmadb11.dpma.de (194.59.106.178) 56(84) bytes of data.
64 bytes from vbgmadb11.dpma.de (194.59.106.178): icmp_seq=1 ttl=63 time=0.566 ms
64 bytes from vbgmadb11.dpma.de (194.59.106.178): icmp_seq=2 ttl=63 time=0.359 ms

--- vbgmadb11.dpma.de ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.359/0.462/0.566/0.105 ms
nagios@madpbk51:~>
nagios@madpbk51:~> /usr/local/nagios/libexec/check_nrpe -H vbgmadb11 -c check_lsnr
Oracle Listener is working fine.
nagios@madpbk51:~> /usr/local/nagios/libexec/check_nrpe -H 194.59.106.178 -c check_lsnr
Oracle Listener is working fine.

Re: command not defined

Posted: Mon Dec 16, 2013 12:33 pm
by abrist
Ludmil caught something this morning, it looks like you have an extra semicolon in the service definition:

Code: Select all

        host_name                       !vmacldb92,!vbgmadb71;,!vbgmadb11
Remove the semicolon so it looks like:

Code: Select all

define service{
        use generic-service
        hostgroup_name                  DB
        host_name                       !vmacldb92,!vbgmadb71,!vbgmadb11
        service_description             Check Listener
        contact_groups                  admins,db-admins
        normal_check_interval           60
        notification_interval           240
        check_command                   check_nrpe!check_lsnr
}

Re: command not defined

Posted: Tue Dec 17, 2013 2:35 am
by arenist
Hi abrist,

as you might know, a semicolon acts like a comment in a service definition. Everything behind of the semicolon will be ignored. :roll:

What I sent you was just during a check to get this mystique message "command is not defined" to post it in this forum. The client vgbmadb11 belongs to the host group DB. That's the host group that needs to be checked wether an oracle listener is running or not. In the line "host_name" I tell nagios which clients of the host group DB shall NOT be checked. On vmacldb92 there is no listener, the other two servers can be checked only manually. So I had put a semicolon in front of ",!vbgmadb11" to force the check on this machine. I could have deleted the string ",!vbgmadb11" as well, but if I would have done so you couldn't know that I going to check the server.

Puh, it's really hard to explain complicated things in a foreign language. I hope you are able to understand what I was going to tell you.

Of course my service.cfg looks actually like your code. Please, please, please tell me the reason why this service can be performed just manually...

Re: command not defined

Posted: Tue Dec 17, 2013 10:45 am
by abrist
arenist wrote:as you might know, a semicolon acts like a comment in a service definition. Everything behind of the semicolon will be ignored.
Yep, but I am out of ideas.
arenist wrote:Please, please, please tell me the reason why this service can be performed just manually...
When this type of discrepancy exists, it is usually due to argument misconfiguration (which we check) or permission issues (which was checked as well). My final guesses without more information of the system (not even sure what more information to look at) would be multiple nagios/nrpe/xinetd daemon parent processes running concurrently. That is easily checked with:

Code: Select all

ps -aef

Re: command not defined

Posted: Wed Dec 18, 2013 8:54 am
by arenist
There's exactly one xinetd running on the remote host:

Code: Select all

[root@vbgmadb11 nagios]# ps -aef|grep xinetd|grep -v grep
root       947     1  0 Dec11 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
[root@vbgmadb11 nagios]# xinetd -version
xinetd Version 2.3.14 libwrap loadavg
So I stop nagios:

Code: Select all

[root@vbgmadb11 etc]# ps -aef|grep nagios|grep -v grep
nagios   27811     1  13:19   0:00  0.1 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
madpbk51:/usr/local/nagios/etc # cd servers/
madpbk51:/usr/local/nagios/etc/servers # /etc/init.d/nagios stop
madpbk51:/usr/local/nagios/etc/servers # ps -aef|grep nagios
root      1468 30617  0 14:22 pts/0    00:00:00 grep nagios
I stop xinetd on the remote host:

Code: Select all

[root@vbgmadb11 etc]# service xinetd stop
Stopping xinetd:                                           [  OK  ]
[root@vbgmadb11 etc]# tail /var/log/debug
...
Dec 18 14:15:56 vbgmadb11 xinetd[17219]: Exiting...
[root@vbgmadb11 etc]# ps -aef|grep xinetd
root     24477 22974  0 14:18 pts/0    00:00:00 grep xinetd
Now I edit services.cfg on the nagios server to check check_lsnr on the remote machine vbmadb11.
Then I start xinetd on the remote host.

Code: Select all

[root@vbgmadb11 etc]# service xinetd start
Starting xinetd:                                           [  OK  ]
[root@vbgmadb11 etc]# ps -aef|grep xinetd|grep -v grep
root     25407     1  0 14:26 ?        00:00:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
Output of /var/log/debug of the remote host:

Code: Select all

Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/chargen-dgram [file=/etc/xinetd.conf] [line=49]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/chargen-stream [file=/etc/xinetd.d/chargen-stream] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/daytime-dgram [file=/etc/xinetd.d/daytime-dgram] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/daytime-stream [file=/etc/xinetd.d/daytime-stream] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/discard-dgram [file=/etc/xinetd.d/discard-dgram] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/discard-stream [file=/etc/xinetd.d/discard-stream] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/echo-dgram [file=/etc/xinetd.d/echo-dgram] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/echo-stream [file=/etc/xinetd.d/echo-stream] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/eklogin [file=/etc/xinetd.d/eklogin] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/ekrb5-telnet [file=/etc/xinetd.d/ekrb5-telnet] [line=13]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/gssftp [file=/etc/xinetd.d/gssftp] [line=14]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/klogin [file=/etc/xinetd.d/klogin] [line=14]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/krb5-telnet [file=/etc/xinetd.d/krb5-telnet] [line=13]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/kshell [file=/etc/xinetd.d/kshell] [line=13]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/nrpe [file=/etc/xinetd.d/nrpe] [line=13]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/rmcp [file=/etc/xinetd.d/rmcp] [line=16]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/rsync [file=/etc/xinetd.d/rsync] [line=34]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/tcpmux-server [file=/etc/xinetd.d/tcpmux-server] [line=13]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/tftp [file=/etc/xinetd.d/tftp] [line=68]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/time-dgram [file=/etc/xinetd.d/time-dgram] [line=18]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Reading included configuration file: /etc/xinetd.d/time-stream [file=/etc/xinetd.d/time-stream] [line=67]
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing chargen
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing chargen
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing daytime
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing daytime
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing discard
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing discard
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing echo
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing echo
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing eklogin
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing telnet
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing ftp
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing klogin
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing telnet
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing kshell
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing asf-rmcp
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing asf-secure-rmcp
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing rsync
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing tcpmux
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing tftp
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing time
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: removing time
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
Dec 18 14:26:44 vbgmadb11 xinetd[25407]: Started working: 1 available service
Now I start nagios again.

Code: Select all

madpbk51:/usr/local/nagios/etc/servers # /etc/init.d/nagios start
Starting nagios: done.
I log in as user nagios on the nagios server:

Code: Select all

nagios@madpbk51:~> /usr/local/nagios/libexec/check_nrpe -H vbgmadb11 -c check_lsnr
Oracle Listener is working fine.
I have a look at /var/log/debug (on the remote host) where I can find that check_lsnr was called and executed:

Code: Select all

Dec 18 14:31:25 vbgmadb11 xinetd[25407]: START: nrpe pid=25880 from=194.59.103.56
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/xvda3
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_var]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /var
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_opt_oracle]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /opt/oracle
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_qc_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/qcprod
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_qc_archive_log]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/qcprod/archive_log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_qc_online_redo]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/qcprod/online_redo
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_aris_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arissvr/dbf
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_aris_archive_log]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arissvr/archive_log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_aris_online_redo]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arissvr/online_redo
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_arisdb_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arispub/dbf
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_arisdb_archive_log]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arispub/archive_log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_arisdb_online_redo]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/arispub/online_redo
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_sfkarte_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/sfkarte
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfsdb_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/kfsdb01/db
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfsdb_archive_log]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/kfsdb01/archive
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfsdb_online_redo]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/kfsdb01/redo
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_fs]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/ddprod/dbf
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_archive_log]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/ddprod/archive
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_online_redo1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/ddprod/online01
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_online_redo2]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /oradata/ddprod/online02
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_eth0]=/usr/local/nagios/libexec/check_network_device.bsh -E 0
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_messages_err]=/usr/local/nagios/libexec/check_log -F /var/log/messages -O /usr/local/nagios/libexec/messages.err -q "error"
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_messages_prob]=/usr/local/nagios/libexec/check_log -F /var/log/messages -O /usr/local/nagios/libexec/messages.problem -q "problem"
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_messages_fail]=/usr/local/nagios/libexec/check_log -F /var/log/messages -O /usr/local/nagios/libexec/messages.fail -q "fail"
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_messages_down]=/usr/local/nagios/libexec/check_log -F /var/log/messages -O /usr/local/nagios/libexec/messages.down -q "down"
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_qc]=/usr/local/nagios/libexec/check_oracle.bsh --db qcprod
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_QC_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/qcprod/qcprod/trace/alert_qcprod.log -O /usr/local/nagios/libexec/alert_QC.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_QC_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/qcprod/qcprod/trace/alert_qcprod.log -O /usr/local/nagios/libexec/alert_QC_cp.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARIS]=/usr/local/nagios/libexec/check_oracle.bsh --db ARIS
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARIS_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/aris/ARIS/trace/alert_ARIS.log -O /usr/local/nagios/libexec/alert_ARIS.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARIS_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/aris/ARIS/trace/alert_ARIS.log -O /usr/local/nagios/libexec/alert_ARIS_cp.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARISBP]=/usr/local/nagios/libexec/check_oracle.bsh --db ARISBP
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARISBP_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/arisbp/ARISBP/trace/alert_ARISBP.log -O /usr/local/nagios/libexec/alert_ARISBP.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_ARISBP_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/arisbp/ARISBP/trace/alert_ARISBP.log -O /usr/local/nagios/libexec/alert_ARISBP_cp.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_sfkarte]=/usr/local/nagios/libexec/check_oracle.bsh --db sfkarteprod
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_sfk_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/sfkarteprod/sfkarteprod/trace/alert_sfkarteprod.log -O /usr/local/nagios/libexec/alert_sfk.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_sfk_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/sfkarteprod/sfkarteprod/trace/alert_sfkarteprod.log -O /usr/local/nagios/libexec/alert_sfk_cp.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd]=/usr/local/nagios/libexec/check_oracle.bsh --db ddprod
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/ddprod/ddprod/trace/alert_ddprod.log -O /usr/local/nagios/libexec/alert_dd.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_dd_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/ddprod/ddprod/trace/alert_ddprod.log -O /usr/local/nagios/libexec/alert_dd_cp.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfsdb]=/usr/local/nagios/libexec/check_oracle.bsh --db KFSDB01
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfs_alert]=/usr/local/nagios/libexec/check_alertlog -F /opt/oracle/base/diag/rdbms/kfsdb01/KFSDB01/trace/alert_KFSDB01.log -O /usr/local/nagios/libexec/alert_kfs.log
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_kfs_alert_cp]=/usr/local/nagios/libexec/check_alertlog_checkpoint -F /opt/oracle/base/diag/rdbms/kfsdb01/KFSDB01/trace/alert_KFSDB01.log -O /usr/local/nagios/libexec/alert_kfs_cp.log
[b][color=#0000FF]Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_lsnr]=/usr/local/nagios/libexec/check_listener.bsh[/color][/b]
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_load2]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20 -r
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 200 -c 250
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_time]=/usr/local/nagios/libexec/check_ntp_time -H ntp.dpma.de -w ~0.4:0.4 -c ~0.5:0.5
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_cores]=/usr/local/nagios/libexec/check_cores.bsh
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20% -c 10%
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: INFO: SSL/TLS initialized. All network traffic will be encrypted.
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Handling the connection...
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Host is asking for command 'check_lsnr' to be run...
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Running command: /usr/local/nagios/libexec/check_listener.bsh
Dec 18 14:31:26 vbgmadb11 nrpe[25880]: Command completed with return code 0 and output: Oracle Listener is working fine.
Dec 18 14:31:26 vbgmadb11 nrpe[25880]: Return Code: 0, Output: Oracle Listener is working fine.
Dec 18 14:31:26 vbgmadb11 xinetd[25407]: EXIT: nrpe status=0 pid=25880 duration=1(sec)
I even can see the the command check_lsnr was loaded!
A few minutes later in the nagios server's /usr/local/nagios/var/nagios.log:

Code: Select all

...
[1387373516] SERVICE ALERT: vbgmadb11;Check Listener;CRITICAL;SOFT;1;NRPE: Command 'check_lsnr' not defined
[1387373636] SERVICE ALERT: vbgmadb11;Check Listener;CRITICAL;SOFT;2;NRPE: Command 'check_lsnr' not defined
[1387373756] SERVICE ALERT: vbgmadb11;Check Listener;CRITICAL;HARD;3;NRPE: Command 'check_lsnr' not defined
[1387373756] SERVICE NOTIFICATION: nagiosadmin;vbgmadb11;Check Listener;CRITICAL;notify-service-by-email;NRPE: Command check_lsnr not defined
...
I don't know what to say. Can you see anything interesting in the loggings?

Re: command not defined

Posted: Wed Dec 18, 2013 10:57 am
by abrist
Dec 18 14:31:25 vbgmadb11 nrpe[25880]: Added command[check_lsnr]=/usr/local/nagios/libexec/check_listener.bsh
This is the important line. It looks fine, as does the other configs and logs. Could you pm me the nrpe.cfg, the script, and the relevant nagios configs? I want to try to reproduce your environment.

Re: command not defined

Posted: Wed Jan 29, 2014 2:50 am
by arenist
Hi abrist,

several days have gone by since I sent you my config files . Have you been able to find anything important?

Regards arenist