Running reports external to the GUI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Running reports external to the GUI

Post by Fred Kroeger »

I was wondering if it was possible to run a report such as the SLA report from the command line?
The SLA Report is perfect for what I need in that I can report on a hostgroup over business hours, but I would like to access the raw output rather than generate a PDF. This is so that I can upload the info into a Data Warehouse.
Any ideas ?

regards... Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Running reports external to the GUI

Post by lmiltchev »

Fred, I am not sure what you mean by "...I would like to access the raw output...". In the GUI, you can view the SLA report, schedule it/email it, save it as PDF or JPG... You can still save it as PDF from the command line by doing the following:

1. Grab the report URL (right click on the "PDF" button and open in a new tab)
2. Get the "username" and the "ticket" from the "Backend API URL" component and append it to the end of the report URL
3. Run, something like this from the CLI:

Code: Select all

curl "http://192.168.x.x/nagiosxi/reports/sla.php?1&mode=pdf&username=nagiosadmin&ticket=pkus66xx" > /tmp/sla.pdf
Does this help?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Running reports external to the GUI

Post by Fred Kroeger »

Yes thanks - this is a great help.
When I asked about raw output it was really about what other formats I could export the report in. On the GUI, only PDF is supported.
I tried using mode=csv but got a message saying that it is not supported. What other modes can I use?
Basically all I need to do is to extract the Uptime SLA for a hostgroup and send it to a Data Warehouse for reporting

regards.. Fred
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Running reports external to the GUI

Post by abrist »

Only JPGs and PDFs are currently supported. We will add csv sometime in the future.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Running reports external to the GUI

Post by Fred Kroeger »

Thanks - it would be really good to have these features so that we can use the great data in Nagios to feed into other reporting systems in an enterprise environment.

regards... Fred
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Running reports external to the GUI

Post by lmiltchev »

Fred, I just posted an internal feature request (TASK ID 5717).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Fred Kroeger
Posts: 588
Joined: Wed Oct 19, 2011 11:36 pm
Location: Perth, Western Australia
Contact:

Re: Running reports external to the GUI

Post by Fred Kroeger »

Thanks Ludmil - much appreciated

Fred
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Running reports external to the GUI

Post by tmcdonald »

Going to close this since a feature request has been made.
Former Nagios employee
Locked