Sidebar

Can I monitor the status of QIE from an external machine?

0 votes
1.3K views
asked Aug 8, 2013 by mike-r-7535 (13,830 points)
I would like to be able to monitor the QIE service to know if it is running or not.  Does QIE have a way to monitor the system as a whole or for individual channels?

2 Answers

0 votes
 
Best answer

As of the 3.0.44 release of QIE you can request additional information for a channel status by making the following call:

http://{qieServer}:{port}/channelStatus?channelId={channel ID}&responseType={JSON or XML}

This will return a JSON or XML message with more information about the current status of the channel.

 

As of the 4.0.48 release, a new probe has been introduced to allow load balancers to know if a specific receiver is listening or not.

http://{qieServer}:{port}/channelStatus?port={PORT}

This call causes the system to search for any receivers using the given port, if a channel is not found that is using this port, then an HTTP status 404 is returned, if the channel is found, but not running, then a status 503 is returned, if the channel is found and is running, then a status 200 is returned.  There is no payload with this probe.

answered Nov 29, 2017 by ben-s-7515 (12,640 points)
selected Aug 21, 2018 by ben-s-7515
commented Dec 22, 2017 by josh-c-1545 (120 points)
This works well for me from a browser, but when attempting to send a request to one of our URLs using javascript from our internal site, I'm running into issues that I'm guessing is based on CORS. Any tips for resolving either on our qvera server or client side?
commented Dec 22, 2017 by ben-s-7515 (12,640 points)
There is no Cross-Origin Resource Sharing (CORS) on this call.  This is a very basic call and response.  Are you able to do a wget from another server to the URL in question?
commented Dec 22, 2017 by josh-c-1545 (120 points)
I'm not sure how to use / interpret wget, but when I send a get request via python from a different server I get the appropriate json response.
commented Dec 22, 2017 by josh-c-1545 (120 points)
Here's the response I get in the browser console: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at <url here>. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).
commented Dec 22, 2017 by ben-s-7515 (12,640 points)
In this case is was not caused by the QIE application, but the Python application was loading a page from one URL and trying to allow the javascript to make a call to the QIE server on a different domain.  The Python application will need to be update to allow cross domain origins to the QIE server.
+1 vote

Yes. Since QIE is a web application, it allows external tools to query the status of the system and of individual channels via specified URLs.

For system monitoring, use the following URL after replacing the {qieServer} and {port} with the values for your server:

http://{qieServer}:{port}/appVersion

For channel specific monitoring, use the following URL after replacing the {qieServer}, {port}, and {channel ID}:

http://{qieServer}:{port}/channelStatus?{channel ID}

The channel ID can be found in the channel properties dialog.

The response from this call will be in the following format:

{STATUS} - {ChannelName} {ChannelState} ([inboundCount], [outboundCount], [inactivityAlert], [errorCount]) - QIE version {versionNumber}, build: {buildNumber}

The {STATUS} will be "OK", "WARNING", or "CRITICAL".  "CRITICAL" is triggered if you have any error messages, or if you have exceeded the critical threshold for the inbound or outbound counts, or exceeded the threshold for the inactivity timeout on the channel.

The {ChannelName} will be the name given in the channel properties dialog.

The {ChannelState} will be "Running", "Stopped", "Erred", "Paused" based on it's current state.

The [inboundCount], [outboundCount], [inactivityAlert], and [errorCount] values only show up if they are not zero.

answered Aug 8, 2013 by mike-r-7535 (13,830 points)
...