check_memory nrpe Unable to read output

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
calcazar
Posts: 8
Joined: Wed Jul 08, 2015 3:47 pm

Re: check_memory nrpe Unable to read output

Post by calcazar »

Code: Select all

Jul  9 12:24:48 api ntpd[23603]: Listen normally on 2 lo 127.0.0.1 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 3 eth0 192.168.0.19 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 4 lo ::1 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 5 eth0 fe80::20c:29ff:fecd:fd69 UDP 123
Jul  9 12:24:48 api ntpd[23603]: peers refreshed
Jul  9 12:24:48 api ntpd[23603]: Listening on routing socket on fd #22 for interface updates
Jul  9 12:24:48 api ntpd[23603]: 0.0.0.0 c016 06 restart
Jul  9 12:24:48 api ntpd[23603]: 0.0.0.0 c012 02 freq_set kernel 16.078 PPM
Jul  9 12:24:55 api ntpd[23603]: 0.0.0.0 c615 05 clock_sync
Jul  9 13:16:58 api nagios: Auto-save of retention data completed successfully.
^C
[root@api ~]# tail -n 50 /var/log/messages
Jul  9 02:00:26 api nagios: CURRENT HOST STATE: localhost;UP;HARD;1;PING OK - Packet loss = 0%, RTA = 0.06 ms
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;Current Load;OK;HARD;1;OK - load average: 0.01, 0.01, 0.00
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;Current Users;OK;HARD;1;USERS OK - 0 users currently logged in
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;HTTP;OK;HARD;1;HTTP OK: HTTP/1.1 301 Moved Permanently - 537 bytes in 0.001 second response time
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;PING;OK;HARD;1;PING OK - Packet loss = 0%, RTA = 0.08 ms
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;Root Partition;OK;HARD;1;DISK OK - free space: / 11466 MB (86% inode=94%):
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;SSH;OK;HARD;1;SSH OK - OpenSSH_5.3 (protocol 2.0)
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;Swap Usage;OK;HARD;1;SWAP OK - 100% free (1635 MB out of 1635 MB)
Jul  9 02:00:26 api nagios: CURRENT SERVICE STATE: localhost;Total Processes;OK;HARD;1;PROCS OK: 238 processes with STATE = RSZDT
Jul  9 02:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 03:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 04:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 05:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 06:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 07:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 08:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 09:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 10:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 10:31:04 api nrpe[4061]: Caught SIGTERM - shutting down...
Jul  9 10:31:04 api nrpe[4061]: Cannot remove pidfile '/var/run/nrpe.pid' - check your privileges.
Jul  9 10:31:04 api nrpe[4061]: Daemon shutdown
Jul  9 10:31:04 api nrpe[21634]: Starting up daemon
Jul  9 10:31:04 api nrpe[21634]: Server listening on 0.0.0.0 port 5666.
Jul  9 10:31:04 api nrpe[21634]: Server listening on :: port 5666.
Jul  9 10:31:04 api nrpe[21634]: Warning: Daemon is configured to accept command arguments from clients!
Jul  9 10:31:04 api nrpe[21634]: Listening for connections on port 0
Jul  9 10:31:04 api nrpe[21634]: Allowing connections from: 192.168.0.26
Jul  9 11:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 11:58:18 api xinetd[718]: Exiting...
Jul  9 11:58:19 api xinetd[22999]: xinetd Version 2.3.14 started with libwrap loadavg labeled-networking options compiled in.
Jul  9 11:58:19 api xinetd[22999]: Started working: 0 available services
Jul  9 11:59:25 api xinetd[22999]: Exiting...
Jul  9 11:59:26 api yum[23050]: Erased: xinetd
Jul  9 12:16:58 api nagios: Auto-save of retention data completed successfully.
Jul  9 12:24:48 api ntpd[1304]: ntpd exiting on signal 15
Jul  9 12:24:48 api ntpd[23602]: ntpd 4.2.6p5@1.2349-o Mon Mar 16 14:53:03 UTC 2015 (1)
Jul  9 12:24:48 api ntpd[23603]: proto: precision = 0.516 usec
Jul  9 12:24:48 api ntpd[23603]: 0.0.0.0 c01d 0d kern kernel time sync enabled
Jul  9 12:24:48 api ntpd[23603]: Listen and drop on 0 v4wildcard 0.0.0.0 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen and drop on 1 v6wildcard :: UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 2 lo 127.0.0.1 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 3 eth0 192.168.0.19 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 4 lo ::1 UDP 123
Jul  9 12:24:48 api ntpd[23603]: Listen normally on 5 eth0 fe80::20c:29ff:fecd:fd69 UDP 123
Jul  9 12:24:48 api ntpd[23603]: peers refreshed
Jul  9 12:24:48 api ntpd[23603]: Listening on routing socket on fd #22 for interface updates
Jul  9 12:24:48 api ntpd[23603]: 0.0.0.0 c016 06 restart
Jul  9 12:24:48 api ntpd[23603]: 0.0.0.0 c012 02 freq_set kernel 16.078 PPM
Jul  9 12:24:55 api ntpd[23603]: 0.0.0.0 c615 05 clock_sync
Jul  9 13:16:58 api nagios: Auto-save of retention data completed successfully.
At this point, if you have another script or way to monitor the memory, I'll take it....!
calcazar
Posts: 8
Joined: Wed Jul 08, 2015 3:47 pm

Re: check_memory nrpe Unable to read output

Post by calcazar »

Update... So looking closely at the command.cfg, at the bottom there is the "Sample Performance Data Commands". If I understand it right, the perfdata or "performance data" is written out to /var/nagios/host-perfdata.out, is this data that is written from an executed command into that file and then sent to the server? If so, looking at the server that is working and the server that isn't, one of the differences I found was that /var/nagios/ exists with a ton other files inside " for the server that it's working for " and it doesn't exist in the other.

The question here is, why isn't it in there? and I doubt that just simply copying that working directory from one of the servers that isn't having the issue to the one that is, would resolve it.... Any insight on this?

Files in /var/nagios/:

Code: Select all

archives  nagios.pid  objects.cache  retention.dat  rw  spool  status.dat
And one in particular that I was having an issue finding when I read one of the multiple articles is actually in the directory of the server that's working

Code: Select all

[root@webserver ~]# ls -l /var/nagios/rw/
total 0
prw-rw---- 1 nagios apache 0 Jun 18 16:02 nagios.cmd
calcazar
Posts: 8
Joined: Wed Jul 08, 2015 3:47 pm

Re: check_memory nrpe Unable to read output

Post by calcazar »

Please mark this issue as RESOLVED!! It was Selinux the ENTIRE TIME!!

To help anyone that might be pulling out their hairs, after you disable selinux:

Code: Select all

vi //etc/sysconfig/selinux
change to --> SELINUX=disabled and "RESTART" the server.... I forgot to do that, and after that it worked!!!!!!!!!!!!!!!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: check_memory nrpe Unable to read output

Post by abrist »

Fantastic. Locking 'er up!
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked