Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
generalfinance
Contributor III
Contributor III

Task Monitoring with PRTG

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:

string API.jpg

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

Task.jpg

 

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.

mode.jpg

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.

json.jpg

 Step 3 -> Task monitoring from PRTG.

                                                                           Type of sensor used in PRTG.

Sensor Type.jpg

                                                                         How to create a sensor

Sensor1.jpg

 Sensor2.jpg

 Sensor3.jpg

 

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

template.jpg

 

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

lookups.jpg

 

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.

Task PRTG.jpg

 

                                                        Two files have been created on the PRTG server.

Task PRTG_2.jpg

 

                                                    Final integration flow monitoring Task PRTG -> QLIK.

 

Task PRTG_3.jpg

 

 

 

 

 

 

 

 

 

 

 

 

Labels (4)
5 Replies
Sonja_Bauernfeind
Digital Support
Digital Support

Hello!

This is a fantastic post, thank you! 

Would you consider reposting it over in our Members Articles section? That section is specifically designed to house more "how to" sort of posts by our community.

All the best,
Sonja 

Don't forget to Like posts and use the "Accept as Solution" button on content that answered your question! Thanks 🙂
Federico_Rizzello
Partner - Contributor III
Partner - Contributor III

Hello @generalfinance ,

this is a great article that summarizes very well how to automatically monitor a QSEoW environment. Thanks for sharing your effort! Best regards.  

generalfinance
Contributor III
Contributor III
Author

Hi Sonya,
Thank you very much, I will certainly do it, I'm not very expert in posts, but I see that in the Member Articles section it is possible to do it with Create a Document, right? But maybe I need to subscribe to the correct channel first?
If you give me two indications I will proceed.

Thank you.

Marco

Sonja_Bauernfeind
Digital Support
Digital Support

Hello @generalfinance 

The Create a Document button is the right one, yes! Then all you have to do is follow the instructions on screen. There are even templates you can follow, but you can use Freeform (the first template in the list) and copy paste your current post into the editor.

 

Don't forget to Like posts and use the "Accept as Solution" button on content that answered your question! Thanks 🙂
generalfinance
Contributor III
Contributor III
Author

Thanks Sonya, I proceeded to publish it where you indicated me.
I hope everything is clear.
Good work.

Marco Team Generalfinance IT.