
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Checking the status of Qlik Web Connectors
May 28, 2021 1:28:25 PM
Jul 1, 2016 8:58:45 AM
The following end point added allows you to check that QVSource is up and running by making a request to:
http://localhost:5555/QVSource?format=xml
Note that a html human readable version of this page can be found at:
http://localhost:5555/QVSource
Both the above assume that you have not changed the default port number.
This should return something like the following:
Which you can then load as the first step in your QlikView or Qlik Sense application, performing steps such as:
- Ensuring Qlik Web Connectors is up and running at all.
- Ensuring Qlik Web Connectors is licensed and any specific non beta Connectors you are using are licensed.
- Ensuring that the correct version of Qlik Web Connectors (or individual connectors) are present.
If any of these steps fail, you can exit your QlikView or Qlik Sense script, perhaps utilizing the Notification Connector to send an email (which could be converted to a Tweet or SMS message using a number of online services) to the relevant person to look into the issue.
Resolution:
Sample Script
The following sample script shows how we could use this end point to check Qlik Web Connectors is up and running before proceeding to load the rest of the application.
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
sub CheckQVSourceStatus set errormode = 0; QVSourceStatus: LOAD Version, SubField(Version, '.', 1) as Version_Major, SubField(Version, '.', 2) as Version_Minor, SubField(Version, '.', 3) as Version_Build, SubField(Version, '.', 4) as Version_Revision, ServerMode, Path, Licensed, LicenceExpires, IsLicensedAsServer FROM [http://localhost:5555/QVSource?format=xml] (XmlSimple, Table is [QVSource]); if(ScriptError <> '') then // // Looks like QVSOurce is not even running. // // Log message here or send email using QVSource Notifier Connector // trace 'QVSource is not running or not running on the requested port number.'; exit script; endif if(peek( 'Licensed', 0, 'QVSourceStatus') <> 'true') then // // QVSource is running but not licensed. // // Log message here or send email using QVSource Notifier Connector // trace 'QVSource is running but not licensed.'; exit script; endif if(peek( 'ServerMode', 0, 'QVSourceStatus') = 'true' and peek('IsLicensedAsServer', 0, 'QVSourceStatus') = 'false') then // // QVSource is running but not licensed to run in server mode. // // Log message here or send email using QVSource Notifier Connector // trace 'QVSource is running but not licensed to run in server mode.'; exit script; endif let currentVersionAsInt = (peek( 'Version_Major', 0, 'QVSourceStatus') * 1000) + (peek('Version_Minor', 0, 'QVSourceStatus') * 100) + (peek('Version_Build', 0, 'QVSourceStatus') * 10) + peek('Version_Revision', 0, 'QVSourceStatus'); // Let 's pretend we need QVSource 1.4.2.6 or later.... if(currentVersionAsInt < 1426) then // Log message here or send email using QVSource Notifier Connector trace 'Version too low. Please update QVSource.'; exit script; endif QVSourceConnectorStatus: LOAD Name as ConnectorName, Version as ConnectorVersion, Licensed as ConnectorLicensed FROM [http://localhost:5555/QVSource?format=xml] (XmlSimple, Table is [QVSource/Connectors/Connector]); // // Run other QVSource or connector specific tests here before deciding whether // to proceed and load the rest of the application. // set errormode = 1; endsub call CheckQVSourceStatus; |