Hello Support,
We would like your assistance with the following:
To each alert received on Nagios, there is a notes button, that leads to a knowledge base article.
We would like to export a list of all alerts in NagiosXI that have a link to that knowledge base assigned.
We configure this by putting the URL to the KB, as seen in the attached screen shot, in the XI configuration page.
the URL in XI is: ipaddress/nagiosxi/includes/components/ccm/xi-index.php
Can you please assist?
Thanks!
Sharon Alper,
OPSsupport.
Misc Settings Page - Notes URL export
-
opssupport
- Posts: 5
- Joined: Wed Apr 23, 2014 4:28 am
Misc Settings Page - Notes URL export
You do not have the required permissions to view the files attached to this post.
-
Stuart Watts
- Posts: 40
- Joined: Wed Sep 25, 2013 7:01 am
Re: Misc Settings Page - Notes URL export
All of the service configurations for each host are contained in /usr/local/nagios/etc/services/"HOSTNAME".cfg - these are plain text files, so if you're okay with tools like grep, knock yourself out (something like "grep -hi -B5 notes_url /usr/local/nagios/etc/services/* | grep -e "host_name" -e "service_description" -e "notes_url"" worked for me, YMMV).
A more reliable way is to get it out of the MySQL DB (DB name is "nagios") with a query like:
I've not picked through the DB too much, so that might not be the most efficient way of getting that info, but it should work!
A more reliable way is to get it out of the MySQL DB (DB name is "nagios") with a query like:
Code: Select all
SELECT nagios_hosts.display_name AS hostname,nagios_services.display_name,nagios_services.notes_url FROM nagios_hosts,nagios_services WHERE (nagios_hosts.host_object_id = nagios_services.host_object_id) AND nagios_services.notes_url<>"";
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Misc Settings Page - Notes URL export
You can get these in XML from the Backend API Component as well
Admin -> Manage Components -> Backend API URL
Select URL for either
Hosts:
Services:
Admin -> Manage Components -> Backend API URL
Select URL for either
Hosts:
Services:
Re: Misc Settings Page - Notes URL export
If you know the specific URL you could use this
Just add the URL inside the quotes at the end.
If you want to search for wildcards
Code: Select all
select config_name,service_description from tbl_service where notes_url="";If you want to search for wildcards
Code: Select all
select config_name,service_description from tbl_service where notes_url like '%string%';----------------------
Nagios Jedi in training.
Nagios Jedi in training.
Re: Misc Settings Page - Notes URL export
@opssupport
Let us know if your issue has been resolved.
Let us know if your issue has been resolved.
Be sure to check out our Knowledgebase for helpful articles and solutions!