Defining tables to extract information NagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
cgrediaga
Posts: 14
Joined: Wed Jul 11, 2012 1:40 am

Defining tables to extract information NagiosXI

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Defining tables to extract information NagiosXI

Post 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?
cgrediaga
Posts: 14
Joined: Wed Jul 11, 2012 1:40 am

Re: Defining tables to extract information NagiosXI

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

Re: Defining tables to extract information NagiosXI

Post 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 
cgrediaga
Posts: 14
Joined: Wed Jul 11, 2012 1:40 am

Re: Defining tables to extract information NagiosXI

Post 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
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Defining tables to extract information NagiosXI

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked