I’m building a mashup page on our enterprise Qlik server. I need the concurrent user numbers as a gatekeeper to determine whether to disable or enable the hyperlink embedded on the mashup page. I was trying to send HTTP request to get the Qlik engine health information using javascript. This approach should allow me to get real-time concurrent user numbers.
However, there are several servers configured. The one viewed by the end user is only a web proxy which does not have an engine. Only the central node hold the logs. As a result, I am not able to get the healthcheck results via direct URL because the request will hit the web server first and I cannot hit the central node.
It seems the only feasible approach is to read the concurrent user number from operation monitor app. Could I get your advice on this matter? Is it not recommended and not feasible to pin the central node to get the real-time current user for our case?
Reference from Qlik help:
https://help.qlik.com/en-US/sense-developer/April2018/Subsystems/EngineAPI/Content/GettingSystemInfo...
Below is the java script used in my landing page:
function gatekeeper_httpGet(){
var xmlHttp = new XMLHttpRequest();
- xmlHttp.open("GET",'http://server.domain.com/engine/healthcheck/',false);
- console.log(xmlHttp.responseText);
var healthcheck = JSON.parse(xmlHttp.responseText);
- console.log(healthcheck.users.active);
}