Page 1 of 1
Display comment field on dashboard with alert
Posted: Thu Jan 30, 2020 10:47 pm
by oskargaboda
We've recently implemented Nagios XI and are using notifications to create tickets in ServiceNow using the below method.
https://support.nagios.com/kb/article/n ... w-552.html
Our issue is we want to display the comment contents (ServiceNow Incident number) on a dashboard as another column for our 24x7 team to monitor the ticketing interface is operational, is this possible? We're posted the ticket number in using the corecommand API with ADD_SVC_COMMENT.
Re: Display comment field on dashboard with alert
Posted: Fri Jan 31, 2020 3:28 pm
by mbellerue
Just to make sure I understand properly, you've got the interface between Nagios and ServiceNow hooked up and working properly. You just need a field on a dashboard that shows recent tickets that were created by Nagios?
This might be doable, depending on a number of factors. We would need ServiceNow to have an API where we could see ticket numbers based on a certain criteria, and also be able to identify tickets as having been created by Nagios.
Re: Display comment field on dashboard with alert
Posted: Fri Jan 31, 2020 4:28 pm
by oskargaboda
Hi mbellerue, thanks for your quick response.
Yes that's correct, we've modified the perl script to capture the ticket number from the insertResponse from the ServiceNow SOAP API.It updates both the ticket_tracker table and the comment_data ( via the Nagios corecommand API ). We would like to show that value in a dashboard if the comment_data contains "INC" for example.We can see the comment speech bubble but would like to display it's contents as a column beside the alert.
MariaDB [nagsntv2]> select servicename,number from tbl_sn_ticket_tracker where number like '%INC0584415%';
+------------------+------------+
| servicename | number |
+------------------+------------+
| /apps Disk Space | INC0584415 |
+------------------+------------+
1 row in set (0.00 sec)
MariaDB [nagsntv2]>
MariaDB [nagios]> select entry_time,comment_data from nagios_comments where comment_data like '%INC0584415%';
+---------------------+----------------------+
| entry_time | comment_data |
+---------------------+----------------------+
| 2020-02-01 00:00:08 | SN INC is INC0584415 |
+---------------------+----------------------+
1 row in set (0.00 sec)
MariaDB [nagios]>
Re: Display comment field on dashboard with alert
Posted: Mon Feb 03, 2020 3:01 pm
by mbellerue
Alright, I thought this was going to be easier since the data was already in the database. But I started going down that route and it became pretty involved.
Let's look at another potential approach to this. Would it be possible to get those ticket numbers from the ServiceNow API on demand? What I'm thinking here is you could potentially make a dashlet that just calls the ServiceNow API to get the tickets that were created by Nagios.