Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


HTML
<style>
.release-box {
	height: 30px; 
	width: 100px; 
	padding-top: 8px;
	text-align: center; 
	border-radius: 5px; 
	font-weight: bold; 
	background-color: #0ACA8B;  
	border-color: #FCE28A;
}

.release-box:hover {
  	cursor: hand;
    cursor: pointer;
    opacity: .9; 
}
</style>
<meta name="robots" content="noindex">

<div class="release-box">
<a href="https://docs.perspectium.com/display/fluorineplus" style="text-decoration: none; color: #FFFFFF; display: block;">
Fluorine+
</a>
</div>



Procedure


(warning) This is an advanced procedure that requires knowledge of scripting with ServiceNow APIs.

To create an event for slow transactions, follow these steps:

1. Log into ServiceNow. In the Filter Navigator on the upper left-hand side of the screen., type Scheduled Jobs and navigate to the Scheduled Jobs module under Perspectium > Observer.

2. At the top of the Scheduled Jobs form, click New to create a new Scheduled Job.

3. Type a name for your new Scheduled Job and make sure the Active box is checked. Then, scroll to the scripting section and type your script for the new job. Once you are done typing the script for your new Scheduled Job, click Submit

Below is an example of a script that could be used to create a new Scheduled Job for Observer called slow.transaction. For more information about creating scripts for Perspectium Jobs in ServiceNow, see the ServiceNow API Reference Guide.

Code Block
// Identify any instance within the last 15 minutes of the job "JOB: Perspectium MultiOutput Processing" running longer than 1000; output one event per instance found
var gr = new GlideRecord("syslog_transaction");
gr.addEncodedQuery("type=scheduler^url=JOB: Perspectium MultiOutput Processing^sys_created_onONLast 15 minutes@javascript:gs.minutesAgoStart(15)@javascript:gs.minutesAgoEnd(0)");
gr.addQuery("response_time", ">", 1000);
gr.query();
while(gr.next()){
    var msg = "Job " + gr.url + "(" + gr.sys_id + ") is taking too long: " + gr.response_time + " ms";
    gs.eventQueue('slow.transaction', current, msg);
}

4. In ServiceNow's left side navigation window, type Event Subscription and navigate to the Event Subscription module under Perspectium > Observer. Then, click New to create a new Event Subscription.

5. Type a name for your new Event Subscription next to Event. For the script section, add your script according to the example below. Then, click Submit.

Code Block
answer = event.param1 + "|" + event.param2

6. Log into Observer and click Image Removed > Image Removed > Alert ConfigurationsEvents. Your newly created event will appear in the table, and you can modify any of the fields for that event by clicking and typing directly into a field.




Similar topics


Content by Label
showLabelsfalse
max5
showSpacefalse
sortcreation
cqllabel in ("observer-for-servicenow","use") and space = currentSpace()



Contact Perspectium Support


US: 1 888 620 8880

UK: 44 208 068 5953

support@perspectium.com