Where does oscp commands get logged?

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
rsegebre
Posts: 7
Joined: Tue Nov 20, 2012 3:03 pm

Where does oscp commands get logged?

Post 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!
Last edited by rsegebre on Mon Feb 04, 2013 3:45 pm, edited 1 time in total.
rsegebre
Posts: 7
Joined: Tue Nov 20, 2012 3:03 pm

Re: Where does oscp commands get logged?

Post 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!!!
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Where does oscp commands get logged?

Post by slansing »

Haha yes it is very useful! Glad to hear you got it all sorted out, thanks for letting us know!
Locked