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
Running reports external to the GUI
-
Fred Kroeger
- Posts: 588
- Joined: Wed Oct 19, 2011 11:36 pm
- Location: Perth, Western Australia
- Contact:
Re: Running reports external to the GUI
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:
Does this help?
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.pdfBe 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
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
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
Re: Running reports external to the GUI
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.
"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
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
regards... Fred
Re: Running reports external to the GUI
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
Thanks Ludmil - much appreciated
Fred
Fred
Re: Running reports external to the GUI
Going to close this since a feature request has been made.
Former Nagios employee