Hi,
In the Nagios XI web interface, we only see comments "test", can not see the comments "2019/03/18 ****"
(as below case)
But we can use mysql command to select them out as below:
[root@JB-NAGIOS01 ~]# mysql -u root -p -e "use nagios;SELECT t2.name1 AS host_name, t2.name2 AS service_description, t2.is_active AS is_active ,t1.author_name AS user, t1.comment_time AS time, t1.comment_data, t1.is_persistent AS is_persistent, t1.deletion_time_usec AS deletion_time_usec FROM nagios_commenthistory t1 LEFT JOIN nagios_objects t2 ON t1.object_id = t2.object_id where is_persistent=1 and deletion_time_usec = '0' and comment_data not like '%避免**********' and t2.name1 = 'vmjsrmsass01.jsidc.com' ORDER BY host_name, service_description DESC;"
Enter password:
+------------------------+-----------------------+-----------+---------+---------------------+------------------------------------------------------------------------+---------------+--------------------+
| host_name | service_description | is_active | user | time | comment_data | is_persistent | deletion_time_usec |
+------------------------+-----------------------+-----------+---------+---------------------+------------------------------------------------------------------------+---------------+--------------------+
| vmjsrmsass01.jsidc.com | Physical Memory Usage | 1 | buckhsu | 2019-08-14 13:28:43 | test | 1 | 0 |
| vmjsrmsass01.jsidc.com | Physical Memory Usage | 1 | buckhsu | 2019-03-29 10:18:17 | 2019/03/18********Warning:99%、Critical:100% | 1 | 0 |
+-
Any way to show all of them in Nagios XI web interface?
Is there a age-period for showing comments?
Thanks,
Eyck Lin
Can't see service comments in Nagios XI, but it is in mysql.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't see service comments in Nagios XI, but it is in my
The comments displayed are directly from Nagios Core and not out of the database.
If the comment didn't have the "Persistent" checked it will not last through Nagios restarts. Additionally they will not be displayed if someone chooses to delete them.
If the comment didn't have the "Persistent" checked it will not last through Nagios restarts. Additionally they will not be displayed if someone chooses to delete them.
Re: Can't see service comments in Nagios XI, but it is in my
Hi,
In previos post, you can see the mysql select results:
Both of them are "Persistent", and they are not deleted.
(if it is deleted, you can not see it in the mysql select result, right?).
So, it's really strange.
Because it is normal (can see both comments) as before, but
it(the comment begin with"2019/03/18") can not been seen recently.
In Nagios Core(behind Nagios XI), I can see the comment attibures.
There is a colume named "Expires", is it relative?
or any suggestions to troubleshooting this "unseen comments" problem?
Thanks,
Eyck Lin
In previos post, you can see the mysql select results:
Both of them are "Persistent", and they are not deleted.
(if it is deleted, you can not see it in the mysql select result, right?).
So, it's really strange.
Because it is normal (can see both comments) as before, but
it(the comment begin with"2019/03/18") can not been seen recently.
In Nagios Core(behind Nagios XI), I can see the comment attibures.
There is a colume named "Expires", is it relative?
or any suggestions to troubleshooting this "unseen comments" problem?
Thanks,
Eyck Lin
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't see service comments in Nagios XI, but it is in my
Incorrecteycklin wrote:(if it is deleted, you can not see it in the mysql select result, right?).
What is displayed in the UI comes directly out of the status.dat file from Nagios.scottwilkerson wrote:The comments displayed are directly from Nagios Core and not out of the database.
While NDO2DB does send the comment data to the DB (which is why you can see it in the DB), this DB table is not utilized by Nagios XI for display.
Re: Can't see service comments in Nagios XI, but it is in my
Hi,
which dated 2019-03-29 in mysql), but it dispeared from UI service comments now?
Will the service comments do dispear from NagiosXI UI after some months?
(Do the service comments have a age-period? How long is it?)
The old servcie comments are important for system manager,
is there any way to add it back to status.dat, then displayed in NagiosXI UI?
Thanks,
Eyck Lin
OK, I would like to know why it can be seen in UI about 1 month ago(the the comment begin with"2019/03/18"What is displayed in the UI comes directly out of the status.dat file from Nagios.
which dated 2019-03-29 in mysql), but it dispeared from UI service comments now?
Will the service comments do dispear from NagiosXI UI after some months?
(Do the service comments have a age-period? How long is it?)
The old servcie comments are important for system manager,
is there any way to add it back to status.dat, then displayed in NagiosXI UI?
Thanks,
Eyck Lin
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Can't see service comments in Nagios XI, but it is in my
The only way persistent comments that do not have an expiration date would disappear from the UI would be if someone accidentally deleted them, or if someone purposely removed the retention.dat while restarting nagios.
Services
https://assets.nagios.com/downloads/nag ... mmand_id=2
Hosts
https://assets.nagios.com/downloads/nag ... mmand_id=1
The only way to add the comments back in would be to create them the normal way, or you can do it programmatically using external commands like the following:eycklin wrote:is there any way to add it back to status.dat, then displayed in NagiosXI UI?
Services
https://assets.nagios.com/downloads/nag ... mmand_id=2
Hosts
https://assets.nagios.com/downloads/nag ... mmand_id=1