Nagios Core Traps

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
bsch16
Posts: 2
Joined: Thu Jan 21, 2016 4:38 am

Nagios Core Traps

Post 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 !
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: Nagios Core Traps

Post 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. :)
Former Nagios Employee.
me.
bsch16
Posts: 2
Joined: Thu Jan 21, 2016 4:38 am

Re: Nagios Core Traps

Post 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 ?
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: Nagios Core Traps

Post 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
Former Nagios Employee
Locked