Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. READ MORE

Task Monitoring with PRTG

cancel
Showing results for 
Search instead for 
Did you mean: 
generalfinance
Contributor III
Contributor III

Task Monitoring with PRTG

Last Update:

Aug 23, 2023 8:59:02 AM

Updated By:

generalfinance

Created date:

Aug 23, 2023 8:59:02 AM

Attachments

Monitoring of Tasks that reload Apps in Qlik Sense.
One or more tasks are scheduled on the Qlik server that automatically load the Apps,
The goal is to be able to query the status of a task with the help of REST API technology and integrate it with the PRTG monitoring system.

Step 1 -> Creation of a dedicated Virtual Proxy in Qlik QMC.

The documentation to be able to proceed is available from the following link:

https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-How-to-set-up-JWT-authentication/...

Step 2 -> API Query Mode and Test.

Once the JWT virtual proxy has been configured and the validity of the Token has been verified as per the official guide, it is possible to proceed with the desired query.

NB. In this case we validated the token using a Service user who also runs all the dedicated services including the Proxy Service.

In this case we will monitor the correct reload of the tasks on the QLIK server, the Tasks are scheduled on the server and allow the App data to be reloaded.
When one of these tasks fails via API call, it is possible to have a json result with the related details inside.
Below is an example of an API call:

generalfinance_13-1692794344480.jpeg

 

This is an example of a task we want to monitor:

generalfinance_14-1692794344238.jpeg

A quick method to test if the call was successful is from the browser using the Mode Header extension for google chrome described in step 1.

https://chrome.google.com/webstore/detail/modheader-modify-http-hea/idgpnmonknjnojddfkpgkljpfnnfcklj

So for the call to be successful you need to pass the following parameters:
Where Header name: Authorization and Header value: Bearer followed by the previously generated and tested Token and finally the Xrfkey key.

generalfinance_15-1692794344241.jpeg

 

This will be the result in Json format returned by the browser if the call is successful:
Specifically in PRTG what we are going to monitor is:

  1. The name of the Task in this case "test"
    The status in this case"status":7 = Success
  2. Task name "name": "Reload task of TEST TASK FAIL"
  3. Start and end time date:

        "startTime": "2022-05-04T07:46:34.100Z"
        "stopTime": "2022-05-04T07:46:37.636Z"

3. Other information that we may integrate and otherwise see in PRTG.

NB. A table with Qlik Sense reload task status codes and descriptions is available from the following link

https://help.qlik.com/en-US/alerting/July2023/Content/QlikAlerting/system-alerts.htm

This is an example of the string JSON with ok API call.

generalfinance_16-1692794344242.jpeg

 

Step 3 -> Task monitoring from PRTG.

Type of sensor used in PRTG.

generalfinance_17-1692794344242.jpeg

 

How to create a sensor.

generalfinance_18-1692794344254.jpeg

 

 

generalfinance_19-1692794344255.jpeg

 

 

generalfinance_20-1692794344256.jpeg

 

 

The path on the PRTG server where the template is to be uploaded is as follows:

C:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\rest

generalfinance_21-1692794344256.jpeg

 

 

In the following path, however, it is necessary to define a Lookups in order to allow the sensor to interpret the various states of the Qlik Tasks listed in Step 2.

C:\Program Files (x86)\PRTG Network Monitor\lookups\custom

generalfinance_22-1692794344258.jpeg

 

 

Result JSON query Task from Browser a part of this information will be used for the sensor in PRTG each task will correspond to a specific sensor.

The REST Custom Sensor was used in PRTG.
The REST Custom sensor queries a Representational State Transfer (REST) application programming interface (API) endpoint and maps the JavaScript Object Notation (JSON) or Extensible Markup Language (XML) result to the sensor values the mapping rule must be available as a REST configuration file in JSON template format (*.template) according to the PRTG API definition for custom sensors.

generalfinance_23-1692794344255.jpeg

 

 

                              Two files have been created on the PRTG server.

generalfinance_24-1692794344257.jpeg

 

 

                               Final integration flow monitoring Task PRTG -> QLIK.

 

generalfinance_25-1692794344333.jpeg

 

 

Contributors
Version history
Last update:
‎2023-08-23 08:59 AM
Updated by: