cancel
Showing results for 
Search instead for 
Did you mean: 

helpdesk ticket creation

helpdesk ticket creation

troy_alan
New Contributor II

Can SiteEngine use JSONs to create tickets for alerts in a 3rd party helpdesk ticket solution?

1 ACCEPTED SOLUTION

Zdeněk_Pala
Extreme Employee

Alarm can also run a workflow/script. The script/workflow can make an API call to a third-party helpdesk system in JSON format.

Regards Zdeněk Pala

View solution in original post

3 REPLIES 3

Markus_Nikulski
Extreme Employee

So far, you are using Workflows with activity based on Python, which will work. We have already used it many times. Below is an example of how to log in to our XIQ cloud.

import json, logging, requests, urllib3, __future__
from xmcbase import emc_vars, emc_results
urllib3.disable_warnings()

accessToken = None
session     = requests.Session()

##############################################################
def login (userName, passwd😞
    global accessToken
    try:
        response = requests.post(
            headers = {
                'Accept':'application/json',
                'Content-type':'application/json'
            },
            json    = {
                'username':userName,
                'password':passwd
            },
            verify  = False,
            timeout = 10
        )
       
        if response.status_code == requests.codes.ok:
            try:
                result    = response.json()
                accessToken = result[u'access_token']
                log.debug("login user %s passed" % userName)
                return True
            except:
                log.error("JSON decoding failed,\n%s" % response.text)
        elif response.status_code == requests.codes.unauthorized:
            log.error("authentication failed")
            emc_results.put("workflowMessage", "XIQ authentication failed")
        else:
            log.error("HTTP-" + str(response.status_code))
    except requests.Timeout as error:
        log.error("timeout reached, host not responding")
        emc_results.put("workflowMessage", "XIQ not responding")
    return False

Zdeněk_Pala
Extreme Employee

Alarm can also run a workflow/script. The script/workflow can make an API call to a third-party helpdesk system in JSON format.

Regards Zdeněk Pala

Robert_Haynes
Extreme Employee

Need more info.

Site Engine Alarm Actions can be configured to sent Emails, Traps and execute local scripts on the file system. If a script could be developed to do whatever is necessary with that JSON data to inject it / report it to the 3rd party solution - it seems plausible.

GTM-P2G8KFN