Backend Write Access (xi)

This support forum board is for support questions relating to Nagios xi, our flagship commercial network monitoring solution.
dhruvaps
Posts: 3
Joined: Mon Aug 08, 2011 5:23 pm

Backend Write Access (xi)

Post by dhruvaps »

Hello,

We are evaluating Nagios xi, and need to be able to automate the addition of new hosts (this will be triggered by a web service).

Unlike Nagios Core, it is not clear how to do this in xi. I found the plugin for backend access, but this appears to be read-only.

The approaches that occur to me are:
  • Write a plugin which accomplishes this (is this possible with the API?)
  • Insert the data directly into the database (this seems quite complicated)
  • Create Nagios Core text configuration files
Any insights would be greatly appreciated.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Backend Write Access (xi)

Post by mguthrie »

A much simpler way would be this:

Use your automation to create a new text config file
Copy those configs to the /usr/local/nagios/etc/import directory
Run: /usr/local/nagiosxi/scripts/reconfigure_nagios.sh

At the moment we don't have a way to do this through the web api.
dhruvaps
Posts: 3
Joined: Mon Aug 08, 2011 5:23 pm

Re: Backend Write Access (xi)

Post by dhruvaps »

Thanks for your reply, mguthrie. That seems to work, but I noticed that reconfigure_nagios.sh actually restarts the server. As this solution will potentially be monitoring thousands of servers, we would prefer to update the configuration without taking down Nagios. Is there a way to update the configuration on the fly (whether by updating a database, or sending a SIGHUP signal)?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Backend Write Access (xi)

Post by mguthrie »

You can't apply any configuration changes in Nagios without restarting application. This is the normal process to make a change to the monitoring configuration.

(I'm going to move this thread to the Nagios xi General Forum, it will get more viewing traffic).
gabriel.giordano
Posts: 1
Joined: Wed Aug 24, 2011 1:39 pm

Re: Backend Write Access (xi)

Post by gabriel.giordano »

Hello,

I need something like the question dhruvaps posted. I use Nagios to monitor the network, but i need to take some action when the network has a fault.
For example: The Nagios sends data to the database when the network status changes. Or The nagios activates another system with wsdl.

Is this possible?'

Thanks
Last edited by gabriel.giordano on Thu Aug 25, 2011 9:19 am, edited 1 time in total.
No60MdiS
Posts: 1
Joined: Mon Sep 05, 2011 5:16 am

Re: Backend Write Access (xi)

Post by No60MdiS »

mguthrie wrote:A much simpler way would be this:

Use your automation to create a new text config file
Copy those configs to the /usr/local/nagios/etc/import directory
Run: /usr/local/nagiosxi/scripts/reconfigure_nagios.sh

At the moment we don't have a way to do this through the web api.
thanks for this..
User avatar
nscott
Posts: 1040
Joined: Wed May 11, 2011 8:54 am

Re: Backend Write Access (xi)

Post by nscott »

gabriel,

Thats an area of active development but there are some things that might help you. A good place to start is this document;

http://assets.nagios.com/downloads/nagi ... ndlers.pdf

It explains event handlers and how to use them, which sound exactly like what you're looking for.
Nicholas Scott
Former Nagios employee