how to change the channel of incidents coming in
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 04:18 AM - edited ‎11-10-2022 04:20 AM
Hello Everyone,
I am working on configuring notifications from CheckMk into servicenow.
The plugin sends the alerts successfully into servicenow and the incident is getting created successfully.but the channel is phone.However i want it to be channel as email or monitoring.
How do i change this.
I have also some assignment rule which i have set up but inbound actions does not.please find the code below and let me know if there are any issues in the code.The watchlist does not get updated
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
current.caller_id = gs.getUserID();
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.description=email.body_text;
current.state = IncidentState.NEW;
current.urgency = 1;
current.impact = 1;
current.contact_type = "phone";
current.u_security_incident.setValue("true");
//var groupIds =gs.getProperty('ats.group.security_officer') + ',' + gs.getProperty('ats.group.security_operations');
var groupIds = gs.getProperty('ats.group.security_operations');
var gr = new GlideRecord('sys_user_grmember');
var nameString = '';
gr.addQuery('group','IN',groupIds);
gr.query();
while(gr.next())
{
nameString += gr.user + ',';
}
//nameString = nameString.substring(0, nameString.length-1);
current.watch_list = nameString + 'IT_Ops_Connectivity@ats.net';
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high")
current.priority = 1;
}
if (email.body.priority != undefined)
current.priority = email.body.priority;
current.insert();
//
})(current, event, email, logger, classifier);
.
Please note the checkmk user had a dummy email address.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 05:26 AM
How is the plugin sending the alerts to ServiceNow? Is it by REST API or email?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-10-2022 09:41 PM
Hi Mike,
It sends via Rest API.
https://docs.checkmk.com/latest/en/notifications_servicenow.html
Configured according to this above link.
What should i be doing in servicenow to assign the tickets to a particular group and assign people in watchlist.