When I acknowledge a service I type in a comment.
Later down the track when the service state returns to normal the comment dissapears.
Is it possible to display a report of comments for a service (or host) or are they lost forever?
Nagios XI 2009R1.4B running on a VMware VM on an ESXi 4.1 host.
How can I see historic comments
- Box293
- Too Basu
- Posts: 5126
- Joined: Sun Feb 07, 2010 10:55 pm
- Location: Deniliquin, Australia
- Contact:
How can I see historic comments
You do not have the required permissions to view the files attached to this post.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
-
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: How can I see historic comments
There are two MySQL tables (in the 'nagios' database) that appear to retain it after the service returns to OK:
Code: Select all
mysql> select * from nagios_acknowledgements\G
*************************** 1. row ***************************
acknowledgement_id: 1
instance_id: 1
entry_time: 2011-01-26 12:14:37
entry_time_usec: 684438
acknowledgement_type: 1
object_id: 140
state: 1
author_name: Nagios Administrator
comment_data: asd
is_sticky: 1
persistent_comment: 0
notify_contacts: 1
*************************** 2. row ***************************
acknowledgement_id: 2
instance_id: 1
entry_time: 2011-02-22 07:43:17
entry_time_usec: 301751
acknowledgement_type: 1
object_id: 165
state: 2
author_name: Nagios Administrator
comment_data: Testing for Box293
is_sticky: 1
persistent_comment: 0
notify_contacts: 1
2 rows in set (0.00 sec)
mysql> select * from nagios_commenthistory where commenthistory_id=102\G
*************************** 1. row ***************************
commenthistory_id: 102
instance_id: 1
entry_time: 2011-02-22 07:43:17
entry_time_usec: 482647
comment_type: 2
entry_type: 4
object_id: 165
comment_time: 2011-02-22 07:43:17
internal_comment_id: 102
author_name: Nagios Administrator
comment_data: Testing for Box293
is_persistent: 0
comment_source: 0
expires: 0
expiration_time: 1969-12-31 18:00:00
deletion_time: 2011-02-22 07:45:52
deletion_time_usec: 222997
1 row in set (0.00 sec)
Re: How can I see historic comments
Hmm...I'm not sure about the purging process for comments, or how to change that. Here's what I know about comment and where they're stored. We don't have a front-end tool for accessing comment history.
DB:
- In MySQL there's the nagios.nagios_comments table which seems to store current active comments
- nagios.nagios_commenthistory which might have what you need. It seems to have non-persistant comments
FILE:
- comments (while in existence) are stored in the status.dat file, defined as "hostcomment" or "servicecomment."
DB:
- In MySQL there's the nagios.nagios_comments table which seems to store current active comments
- nagios.nagios_commenthistory which might have what you need. It seems to have non-persistant comments
FILE:
- comments (while in existence) are stored in the status.dat file, defined as "hostcomment" or "servicecomment."