Hello!
We use the field "Notes" in Nagios Services to keep important information. Some services are lacking this field and we would like to know which. Do you know how we could do that? If it's not possible via the interface, a database query could also be used.
List services without notes
Re: List services without notes
A quick way to do this if you don't mind hopping into the database would be to run this query (assuming MySQL/MariaDB),
You should only need display_name and notes, but I added host_object_id in case it makes it easier to tie down the service check to the host.
Code: Select all
connect nagios;
select host_object_id, display_name, notes from nagios_services where notes = "" or notes is null;As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: List services without notes
This was almost what I wanted, however finding hosts by ID is really hard. Would there be a way to get a similar output but with a "Host Name" Field?
Re: List services without notes
Sure, I should have made it this way to begin with. The original query is only viable in very small environments.
This should do what you need it to do.
Code: Select all
select h.display_name, s.display_name, s.notes
from nagios_services as s
left join nagios_hosts as h
on s.host_object_id = h.host_object_id
where s.notes = ""
or s.notes is null
order by h.display_name;
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: List services without notes
Perfect! That's exactly what I needed.
Re: List services without notes
Excellent, glad we could help! Closing thread.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!