Page 1 of 1

Where does oscp commands get logged?

Posted: Mon Feb 04, 2013 2:04 pm
by rsegebre
Good Afternoon,

I am currently in the process of testing a distributed monitoring solution using nsca/send_nsca which a NagiosXI box as a master and multiple Nagios Core boxes as slaves. The problem I've encountered so far is that Nagios Core doesn't seem to be executing the ocsp/ochp commands I specified for services or hosts.

The NagiosXI box does receive objects even if they are not configured when I run the my ocsp/ochp commands as the nagios or root user. But when I set Nagios Core to automatically submit results for a group of hosts nothing happens, and I cannot find where does it get logged.

After some searching I still couldn't figure out where does send_nsca and oscp get logged on a Nagios Core CentOS installation? I can see nsca getting logged in two places /var/log/messages and /etc/usr/local/nagios/var/nagios.debug with logging for everything at a detailed level.

I have the following configuration on the Nagios Core box:

Code: Select all

#nagios.cfg
obsess_over_services=1
ocsp_command=submit_service_check
obsess_over_hosts=1
ochp_command=submit_host_check

Code: Select all

#sql-host.cfg

define host{
        use                     windows-server
        host_name          sql-server001
        alias                   sql-server001
        address               123.4.6.7 
        obsess_over_host        1
}


define service{
        use                     generic-service
        obsess_over_service             1
        host_name          sql-server001
        service_description     PING
        check_command           check_ping!100.0,20%!500.0,60%
}
Summary:

* Where does ocsp and ochp log everytime they run?

Info:
* Master: Nagios XI: receives unconfigured objects properly through nsca, tested by running the ocsp/ochp commands manually from slave hosts as the nagios and root users.
* Slaves: Nagios Core boxes: sends data using send_nsca, and obsesses over a host only simply for testing purposes.


Thank you for your time!

Re: Where does oscp commands get logged?

Posted: Mon Feb 04, 2013 3:45 pm
by rsegebre
I actually figured this out. So I was simply logging to much information to nagios.debug to the point that it got rotated very quickly since it reached the size limit. So I reduced logging on debug to only log commands and did a very detailed info, and I did see it executing the ocsp/ochp commands and it complained about file permissions for send_nsca.cfg which is something I thought I had checked a couple times.

Anyways, sorry for the post.

Nagios debug logging is awesome! Helps you troubleshoot anything!!!

Re: Where does oscp commands get logged?

Posted: Tue Feb 05, 2013 1:55 pm
by slansing
Haha yes it is very useful! Glad to hear you got it all sorted out, thanks for letting us know!