Can't see service comments in Nagios XI, but it is in mysql.
Posted: Thu Aug 15, 2019 12:44 am
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
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