Nagios webui do not update passive checks

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.
Locked
JoseD!
Posts: 5
Joined: Thu Aug 28, 2014 1:54 pm

Nagios webui do not update passive checks

Post by JoseD! »

Hi, I have configured Nagios and I have a remote host, so I want to send passive checks with nsca, I have configured NSCA on server as localhost and is working good, but if I try to send passive check from external host it says "1 data packet(s) sent to host successfully." but when I checked the Nagios server it doesnt update the status, the server always says"Critical" on its status.

Also I disabled Selinux, Iptables and I have connectivity between pc's (I can test that via ping).

The log client says:
Aug 20 06:16:09 gbnagios nsca[10992]: Handling the connection...
Aug 20 06:16:09 gbnagios nsca[10992]: Time difference in packet: 0 seconds for host localhost
Aug 20 06:16:09 gbnagios nsca[10992]: SERVICE CHECK -> Host Name: 'localhost', Service Description: 'TestMessage', Return Code: '0', Output: 'This is a test message.'
Aug 20 06:16:09 gbnagios nsca[10992]: Attempting to write to nagios command pipe
Aug 20 06:16:09 gbnagios nsca[10992]: End of connection...

Note: I have created /nagios/var/rw/nagios.cmd manually. Also I commented password and encyption lines on both servers.

What am I doing wrong :?:

Any help will be appreciated.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios webui do not update passive checks

Post by slansing »

Hmm... nagios.cmd should always be started by nagios when it starts, you should not need to create one, nor will it work the way you expect if you do. I'd remove it, if you created it, and try to re init nagios to see if you have one. What distro is this? What version of Nagios, and how was it installed? If you followed a guide please share it.
JoseD!
Posts: 5
Joined: Thu Aug 28, 2014 1:54 pm

Re: Nagios webui do not update passive checks

Post by JoseD! »

Thanks for your answer, I have Centos 7, Nagios Core 4.8.0.

I followed this guide: http://nagios.sourceforge.net/download/ ... _Setup.pdf

Also if I do not create manually the nagios.cmd, the log says:

Aug 20 06:30:58 gbnagios nsca[10992]: Handling the connection...
Aug 20 06:30:58 gbnagios nsca[10992]: Time difference in packet: 0 seconds for host 10.1.4.110
Aug 20 06:30:58 gbnagios nsca[10992]: SERVICE CHECK -> Host Name: '10.1.4.110', Service Description: 'TestMessage', Return Code: '0', Output: 'This is a test message.'
Aug 20 06:30:58 gbnagios nsca[10992]: Attempting to write to nagios command pipe
Aug 20 06:30:58 gbnagios nsca[10992]: Command file '/usr/local/nagios/var/rw/nagios.cmd' does not exist, attempting to use alternate dump file '/usr/local/nagios/var/rw/nsca.dump' for output
Aug 20 06:30:58 gbnagios nsca[10992]: Could not open alternate dump file '/usr/local/nagios/var/rw/nsca.dump' for appending
Aug 20 06:30:58 gbnagios nsca[10992]: End of connection...

In the nagios server the file exist because nagios created, and nsca is working good the problem is with the remote host.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios webui do not update passive checks

Post by tmcdonald »

Wait, are you trying to create the nagios.cmd on the *remote* machine? Are you installing NSCA on the remote machine or on Nagios?
Former Nagios employee
JoseD!
Posts: 5
Joined: Thu Aug 28, 2014 1:54 pm

Re: Nagios webui do not update passive checks

Post by JoseD! »

Yes, I'm trying to create the nagios.cmd on my remote machine, i tried with "scp" linux command but I wasn't effective, so I created the file.

Nsca is installed in both pc's (server and remote host). Nsca is running very good on nagios server and when I send a passive command the status become to "OK" in webui, but if I tried to send a command with my remote host the Nagios status never change it says "Critical" and never becomes to "OK".

My problem is because I need to monitor the nagios server remotely.

Thanks for your help! ;)
JoseD!
Posts: 5
Joined: Thu Aug 28, 2014 1:54 pm

Re: Nagios webui do not update passive checks

Post by JoseD! »

Any suggestions? am I wrong or missing some command or step?

Thks
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios webui do not update passive checks

Post by abrist »

Are you trying to run the NSCA server on the remote host? If so, that is incorrect. You should just be using a send_nsca binary to push teh checks to the core server.
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.
JoseD!
Posts: 5
Joined: Thu Aug 28, 2014 1:54 pm

Re: Nagios webui do not update passive checks

Post by JoseD! »

thanks for your answer, so "send_nsca binary" is the only way to monitor my server via remote? do you have any recommendation about monitor my server with a external host?

Thanks!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Nagios webui do not update passive checks

Post by abrist »

Well, if your remote host is unreachable from the outside, you need to configure a cron job, etc, that will run your checks on an interval and then send them (with send_nsca) from the remote host to the nagios server.
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