Page 1 of 1

Defining tables to extract information NagiosXI

Posted: Wed Oct 10, 2012 5:49 am
by cgrediaga
Hello, in our company we have already created some scripts to create reports with data about performance, disk space, availability and server name, that tables could get this information monitoring server is a NagiosXI

thanks

Re: Defining tables to extract information NagiosXI

Posted: Wed Oct 10, 2012 9:33 am
by mguthrie
Sorry, I'm not completely clear on your question. Are you looking to access performance data in Nagios XI to use for your reporting tools?

Would CSV data work for your reports?

Re: Defining tables to extract information NagiosXI

Posted: Thu Oct 11, 2012 10:54 am
by cgrediaga
Hi, I need to know that you have tables would host information, performance, disk space and availability because of a few select those tables, to extract such information.

Re: Defining tables to extract information NagiosXI

Posted: Thu Oct 11, 2012 11:05 am
by mguthrie
Most of that information is stored in the Mysql->nagios database. It depends on if you need status or state history information. However we do also have a backend API that presents the data in XML format. The API is documented in the below doc:
http://assets.nagios.com/downloads/nagi ... opment.pdf

Performance metrics are store in RRD files in the following directory: /usr/local/nagios/share/perfdata

If you need an export of that data in CSV you can fetch it using the following tool:

/usr/local/nagiosxi/tools/rrd2csv.php

Code: Select all

Usage: ./rrd2csv.php --host=<host> [--service='<service>'] [--start=<start>] [--end=<end>]

Options:
  <host>     = Host name [required]
  <service>  = Service description: Use single quotes if spaces in name
  <start>    = Start time. Defaults to 'today.' Accepts -12h, -3d, or YYYYMMDD format.
  <end>      = End time. Defaults to 'today.' Accepts -12h, -3d, or YYYYMMDD format.
Example (Grab perfdata for the last 7 days):

Code: Select all

./rrd2csv.php --host=localhost --service=PING --start=-7d 

Re: Defining tables to extract information NagiosXI

Posted: Thu Nov 08, 2012 12:58 pm
by cgrediaga
Hello
The first to apologize for not having answered before, but we walk with many follones, one thing about what you send me is not useful, because as said at the beginning, people already have some reporting scripts, to get information expecifica for confecionar reports as they ask why my question was / is the name of the table where you could get the names of hosts and availability.

thanks

Re: Defining tables to extract information NagiosXI

Posted: Thu Nov 08, 2012 1:06 pm
by scottwilkerson
As mguthrie pointed out
mguthrie wrote:Most of that information is stored in the Mysql->nagios database. It depends on if you need status or state history information. However we do also have a backend API that presents the data in XML format. The API is documented in the below doc:
http://assets.nagios.com/downloads/nagi ... opment.pdf
The information is in a bunch of different table in the mysql database, It would likely be easiest to use the backend API component to get the information you need in XML format. Here are a couple documents outlining how to use the component
http://library.nagios.com/component/sea ... phrase=all