Page 1 of 2
Export Open Problem Tab
Posted: Mon Dec 04, 2017 11:38 am
by davide.bonicelli
Hi, do you know if there is a way to export the 'Open Problems' page in the View Tab on Nagiosxi?
A csv would be cool..maybe without some data like 'Duration' 'Attempt' or 'Last Check'..
Re: Export Open Problem Tab
Posted: Mon Dec 04, 2017 1:20 pm
by npolovenko
Hello,
@davide.bonicelli . Are you referring to
Open Service Problems and
Open Host Problems in the Quick View menu? If so you can right-click them and select "Copy link address". Then Navigate to Views/Add New View, and add the link inside the URL field.
If you want to exclude some columns from the view you'd have to modify the component's source code. Or you may find a custom dashlet, maybe another component on Nagios Exchange:
https://exchange.nagios.org/
Re: Export Open Problem Tab
Posted: Wed Dec 06, 2017 10:29 am
by davide.bonicelli
i would like to export the content of the View-->My views-->Open Problem outside of NagiosXI, maybe in .csv format..
Re: Export Open Problem Tab
Posted: Wed Dec 06, 2017 11:24 am
by lmiltchev
Currently, there is no way to download the Views > My Views > Open Problems page (which I believe is the same as Home > Quick View > Open Service Problems) in a CSV format. You could schedule the page as a report if you had Nagios XI Enterprise Edition, but it would be in a PDF format.
I could file an internal feature request for adding this functionality in one of our future versions of Nagios XI if you want me to.
Re: Export Open Problem Tab
Posted: Wed Dec 06, 2017 11:41 am
by davide.bonicelli
It's an Enterprise Edition but with the maintenance expired, so no more Enterprise Feature...that's a shame..
btw i think it would be a nice feature to implement on a future release.
Re: Export Open Problem Tab
Posted: Wed Dec 06, 2017 1:18 pm
by lmiltchev
I added an internal feature request for the ability to export "Open Host Problems" and "Open Service Problems" to CSV format, which is pending approval.
You could probably achieve the same objective by using the REST API. You could run a query to pull the service status by running:
Code: Select all
http://x.x.x.x/nagiosxi/api/v1/objects/servicestatus?apikey=xxx¤t_state=1&pretty=1 # It will show services in a Warning state
http://x.x.x.x/nagiosxi/api/v1/objects/servicestatus?apikey=xxx¤t_state=2&pretty=1 # It will show services in a Critical state
http://x.x.x.x/nagiosxi/api/v1/objects/servicestatus?apikey=xxx¤t_state=3&pretty=1 # It will show services in a Unknown state
Then, to remove the clutter, you could filter the json results by entering a name in the search bar, e.g. "host_name". You can script a solution, based on the above queries. If you want to "combine" these queries (for example, show all three states), you could run:
Code: Select all
http://x.x.x.x/nagiosxi/api/v1/objects/servicestatus?apikey=xxx¤t_state=in:1,2,3&pretty=1
It you need to renew your maintenance, feel free to contact our sales team at
[email protected]
Hope this helps.
Re: Export Open Problem Tab
Posted: Thu Dec 07, 2017 3:22 am
by davide.bonicelli
with all the links i got this error:
error "Invalid API Key"
Re: Export Open Problem Tab
Posted: Thu Dec 07, 2017 10:09 am
by lmiltchev
Are you sure that you are using a correct API key? You can view your key when you click on the username in the upper-right corner. The API key would also "auto-populate" under the "REST API - Objects Reference" section (Help > REST API Docs > Objects Reference). See the highlighted text in the example below.
example01.PNG
Do you see any data when you click on the "Open URL in browser window" button?
Re: Export Open Problem Tab
Posted: Thu Dec 07, 2017 10:37 am
by davide.bonicelli
ok it works!
i did a typo on the API key!
thanks..i will did some dig on it..
Re: Export Open Problem Tab
Posted: Thu Dec 07, 2017 11:09 am
by lmiltchev
Great! I am glad we figured this out! Is it all right if we close this topic?