Page 1 of 1

Nagios Core Traps

Posted: Thu Jan 21, 2016 5:10 am
by bsch16
Hi Guys,

I have installed Nagios Core 4.1.1 on a virtual machine (debian) and an agent (also on on a debian virtual machine), it works perfectly but i have one question.

I would like to have a primary core (the debian server) and a secondary core (raspberry pi 2). Is it possible to receive traps (from computers or servers) on the secondary core and to send all those traps to the primary core ? It's like to supervise the server which supervise my equipments.

I don't know if i'm clear, so if you want more details, just ask :)

Thanks !

Re: Nagios Core Traps

Posted: Thu Jan 21, 2016 10:09 am
by hsmith
The Docs wrote:Format: ochp_command=<command>
Example: ochp_command=obsessive_host_handler

This option allows you to specify a command to be run after every host check, which can be useful in distributed monitoring. This command is executed after any event handler or notification commands. The command argument is the short name of a command definition that you define in your object configuration file. The maximum amount of time that this command can run is controlled by the ochp_timeout option. More information on distributed monitoring can be found here. This command is only executed if the obsess_over_hosts option is enabled globally and if the obsess_over_host directive in the host definition is enabled.
Obsessing is going to be your solution, however, I don't have a great guide I can link off the top of my head on how to do this. Obsessing is going to be your key though. :)

Re: Nagios Core Traps

Posted: Fri Jan 22, 2016 2:54 am
by bsch16
Thanks for your reply !

So, I just need to put those commands in my nagios.cfg on my debian server ? Or I need to do something else ?

Re: Nagios Core Traps

Posted: Fri Jan 22, 2016 11:17 am
by rkennedy
Yes, this would go in your Nagios.cfg on your Pi. You would then need to create a script that is executed to go with this, and that would relay the information from the Pi -> Nagios.

You will also need to turn obsess_over_hosts=1 on. See this document - https://assets.nagios.com/downloads/nag ... gmain.html