Page 1 of 1

HP IDOL Queries

Posted: Mon Dec 14, 2015 12:32 pm
by zovy
I would like to monitor specific XML output from IDOL content engines. I would like to both extract specific values to display when OK and alert when value is greater than X. How could I go about this? Values (lines 14 & 19) would be for directory and documents. An example content query would be sent via a web browser

Code: Select all

http://192.168.1.1:120/a=getstatus
and the browser results would produce XML output that looks like

Code: Select all

<autnresponse xmlns:autn="http://schemas.autonomy.com/aci/">
<action>GETSTATUS</action>
<response>SUCCESS</response>
<responsedata>
<product>IDOL Server</product>
<version>10.8.0</version>
<build>1187308</build>
<licensed_languages>UNLIMITED</licensed_languages>
<indexport>12</indexport>
<indexport_ssl_enabled>false</indexport_ssl_enabled>
<queryport>-1</queryport>
<aciport>122</aciport>
<serviceport>123</serviceport>
<directory>C:\content</directory>
<querythreads>0</querythreads>
<acithreads>8</acithreads>
<termsperdoc>50</termsperdoc>
<suggestterms>40</suggestterms>
<documents>4366568</documents>
<document_sections>4366568</document_sections>
<committed_documents>4660488</committed_documents>
<deleted_sections>293920</deleted_sections>
<full>false</full>

Re: HP IDOL Queries

Posted: Mon Dec 14, 2015 12:43 pm
by hsmith
You could pretty easily write a bash script to do this.

Something like:

curl the page
use head / tail /cut to get the information you want
use an if statement to exit 0 / 1 / 2 depending on the information you get.

Am I making sense?

Re: HP IDOL Queries

Posted: Mon Dec 14, 2015 12:59 pm
by zovy
Somewhat but not sure how I would get NAGIOS to interact with any of it would be the problem. I could sed/awk the results of the curl as well but I have no idea how I would have nagios initiate the script to run and then return the results and determine OK, WARN, CRIT.

Re: HP IDOL Queries

Posted: Mon Dec 14, 2015 1:07 pm
by hsmith
You would write the script to /usr/local/nagios/libexec/myscript.sh
Then you could set up a command in XI using CCM to run myscript.sh
Then set up a service check to use that check command

At least, I think that is what you are asking.