Organizations that use both ServiceDesk Plus and PRTG can now integrate to automatically log incidents into ServiceDesk Plus for alerts raised on PRTG. The logged incidents will get closed when the alarm is reset.
Log incidents automatically when an alert is triggered.
Close tickets when the alert is reset.
Below screenshots show an incident being created for an alert and closed when the alert is cleared.


Once the alarm gets reset in PRTG, the incident will be closed in SDP with a note saying "The alert has been cleared in PRTG, hence closing the request"
Automatically log incidents for alerts
To automatically log an incident into ServiceDesk Plus every time an alarm is triggered in PRTG, you need to configure the following in PRTG once.
Create a notification template from Setup > Account Settings > Notification Templates and associate the notification template with the appropriate device > Notification Triggers section.
Below is a sample notification template where the Send Email action is selected. The Email Commands feature from ServiceDesk Plus is used to capture the alert details.


Under Format > Custom text section, copy the given text below and save the notification template.
@@SUBJECT=[%sitename] %device %name %status %down (%message)@@
@@UDF_CHAR153=%sensorid@@
@@REQUESTTEMPLATE=PRTG Incidents@@
Enter the template name in which the alert ticket has to be created. In the particular template please add an additional field say 'PRTG alert identification number' as this additional field will be used to store the alert sensor IDs. Use the additional field's key value under PRTG >Custom Text section. (Field Key can be identified under Setup > Customization > Additional Field)
Now associate this notification template with the appropriate root/device under the Notification Triggers section as shown below.

To close an incident in ServiceDesk Plus when the corresponding alarm is closed in PRTG, configure the settings below in ServiceDesk Plus and PRTG.
Configure two business rules which will process ticket closure when the alert clears.
In ServiceDesk Plus, go to Settings > Automations > Business Rules > New Business Rule.
Please configure the name, conditions, and other options as shown in the screenshot below.

Under Actions, select Custom Actions and choose Custom Function and copy the code mentioned below and save the page. This custom function closes the incident with a note.
/*Please provide the udf key of the alert identification number*/ alertIdentificationUdfKey = "udf_char153"; /*Please provide the description of the note content*/ noteDescription = "The alert has been cleared in PRTG, hence closing the request"; deviceId = requestObj.get("udf_fields").get(alertIdentificationUdfKey); requests = zoho.sdp.invokeurl [ url :"/app/" + context.get("instance") + "/api/v3/requests" type :GET parameters:{"input_data":{"list_info":{"search_criteria":{{"field":"udf_fields." + alertIdentificationUdfKey,"condition":"contains","values":{deviceId},"logical_operator":"AND"},{"field":"status.in_progress","condition":"is","value":true,"logical_operator":"AND"}},"row_count":1,"sort_fields":{{"field":"display_id","order":"desc"}}}}} ]; info requests; if(requests.get("requests") != null && requests.get("requests").size() > 0) { requestId = requests.get("requests").get(0).get("id"); closeRequest = zoho.sdp.invokeurl [ url :"/app/" + context.get("instance") + "/api/v3/requests/" + requestId type :PUT parameters:{"input_data":{"request":{"status":{"name":"Closed"}}}} ]; if(closeRequest.get("request") != null) { addNote = zoho.sdp.invokeurl [ url :"/app/" + context.get("instance") + "/api/v3/requests/" + requestId + "/notes" type :POST parameters:{"input_data":{"request_note":{"description":noteDescription}}} ]; } } return requestObj;
Now configure another business rule as shown below and save the page.

In PRTG, create a notification template for closure of alarm tickets from Setup > Account Settings > Notification Templates and associate the notification template to the appropriate device > Notification Trigger section.
Below is a sample notification template where Send Email action is selected. The Email Commands feature from ServiceDesk Plus is used to capture the alert details.


Under Format > Custom text section, copy the text mentioned below and save the notification template.
@@SUBJECT=[%sitename] %device %name %status %down (%message)CLOSURE@@
@@UDF_CHAR153=%sensorid@@
@@REQUESTTEMPLATE=PRTG Incidents@@
Now associate this notification template with the appropriate root or device > Notification Trigger section as shown below:
