Hi,
Is it possible to download the performance graphs via the API, or is there a way of getting a direct link to the image itself?
I have Nagios auto logging tickets in our ITSM tool and would like the performce graph adding to the call when it is logged.
I've read the following article: https://support.nagios.com/kb/article.php?id=91 which details how to link directly to graph explorer graphs, but not how to link directly to a JPG or PNG image or how to automatically extract the graph from this page.
Thanks.
Downloading Graphs via API/Direct Link
Re: Downloading Graphs via API/Direct Link
I can file a feature request for accessing the graph images directly, but right now it isn't readily available. Raw data is available through the API though. See Help > REST API Docs > Objects Reference > Data Exporting, for examples and details.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Downloading Graphs via API/Direct Link
If you could, that would be great.cdienger wrote:I can file a feature request for accessing the graph images directly, but right now it isn't readily available. Raw data is available through the API though. See Help > REST API Docs > Objects Reference > Data Exporting, for examples and details.
I've done some digging and I'm able to extract the graphs I need using the depreciated backend API:
Code: Select all
https://nagios/nagiosxi/includes/components/perfdata/graphApi.php?host=THEHOST&view=2&username=APIUSERNAME&ticket=APIKEYEdit: Scrap that, the backend API only works if you're logged in to the UI.
It seems a recent upgrade has disabled the ability from editing the settings of the 'Backend API URL' in the 'Manage Components' section so my old token key from a few months back does not work.
https://nagios/nagiosxi/admin/component ... kendapiurl returns ' Component function does not exist.'
There's been quite a few REST API changes too recently which have not been docmented or mentioned in the change logs!
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Downloading Graphs via API/Direct Link
Under Admin -> System Settings -> Backwards Comparability Tab you can re-enable to old ticket system
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Downloading Graphs via API/Direct Link
With Backward Compatibility enabled, I still don't see "wrench and screwdriver" icon against Backend API URL to get the Ticket for users.
Any other steps to to performed?
Any other steps to to performed?
Re: Downloading Graphs via API/Direct Link
After you've enabled the Backward Compatibility, you can go to Admin > Manage Users > <any user> > Edit. On the right-hand side you should wee the Insecure Login Settings for your user, along with the ticket. Make sure that you select the box to ensure that insecure login is enabled for this user. You could also generate a new insecure ticket if needed.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
Sampath.Basireddy
- Posts: 252
- Joined: Wed Dec 14, 2016 12:30 pm
Re: Downloading Graphs via API/Direct Link
Perfect, that worked. Thank so much @lmiltchev
Re: Downloading Graphs via API/Direct Link
I am glad I could help! 
Be sure to check out our Knowledgebase for helpful articles and solutions!