Versions Compared

Key

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

UI Button
colormagenta
titleFluorine
urlhttp://doc.perspectium.com/display/fluorine


Custom flags can be posted to Observer to mark an integration event such as success or failure. These flags can be used to alert as well. 

Procedure


The following steps describe how to create a method that will post your custom flag to Observer using Python and the AMQP Python client:

1. Create a method that will post the flag to Observer.

Code Block
languagepy
#!/usr/bin/env python

import pika
import sys
import socket
import os
import time

def postFlag():
	credentials = pika.PlainCredentials('username','password')
	connection = pika.BlockingConnection(pika.ConnectionParameters('instance-amqp.perspectium.net',5672,'/',credentials))
	channel = connection.channel()
	channel.queue_declare()
	channel.basic_publish(exchange='',routing_key='psp.in.servicenow',body='{ topic:"monitor", type:"label", key:"perspectiumdemo1", name:"integration.failed", value: "1"}')
	connection.close()

2. Call the postFlag() method in a try/catch block.

Code Block
languagejava
try:
    soapMethodToServiceNow();
except Exception e:
    print "Integration failed, posting integration flag to Observer"
    postFlag()

3. Log into Observer.

4. Click the cog icon. Click Alert Configurations. Then, click the Events tab.

5. Enter the name for your custom alert under the Name heading and select a Type from the dropdown.

6. Click Save.



Similar topics


Content by Label
showLabelsfalse
max5
showSpacefalse
sortmodified
cqllabel = in ("observer-for-servicenow","advanced-config") and parent = "327838"space = currentSpace()


Contact Perspectium Support


US: 1 888 620 8880

UK: 44 208 068 5953

support@perspectium.com