Backend Write Access (XI)

This board serves as an open discussion and support collaboration point for Nagios XI. NOTE: Nagios XI customers should use the Customer Support forum to obtain expedited support.

Backend Write Access (XI)

Postby dhruvaps » Tue Aug 09, 2011 8:00 am

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:
[list=]
[*]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[/*]
[/list]

Any insights would be greatly appreciated.
dhruvaps
 
Posts: 3
Joined: Mon Aug 08, 2011 5:23 pm

Re: Backend Write Access (XI)

Postby mguthrie » Tue Aug 09, 2011 11:10 am

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.
User avatar
mguthrie
 
Posts: 4379
Joined: Mon Jun 14, 2010 10:21 am

Re: Backend Write Access (XI)

Postby dhruvaps » Wed Aug 10, 2011 1:02 pm

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)?
dhruvaps
 
Posts: 3
Joined: Mon Aug 08, 2011 5:23 pm

Re: Backend Write Access (XI)

Postby mguthrie » Wed Aug 10, 2011 4:25 pm

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).
User avatar
mguthrie
 
Posts: 4379
Joined: Mon Jun 14, 2010 10:21 am

Re: Backend Write Access (XI)

Postby gabriel.giordano » Wed Aug 24, 2011 2:22 pm

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.
gabriel.giordano
 
Posts: 1
Joined: Wed Aug 24, 2011 1:39 pm

Re: Backend Write Access (XI)

Postby No60MdiS » Mon Sep 05, 2011 5:25 am

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..
No60MdiS
 
Posts: 1
Joined: Mon Sep 05, 2011 5:16 am

Re: Backend Write Access (XI)

Postby nscott » Tue Sep 06, 2011 1:02 pm

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
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
User avatar
nscott
 
Posts: 971
Joined: Wed May 11, 2011 8:54 am


Return to Nagios XI

Who is online

Users browsing this forum: 455157, jj23, slansing and 2 guests