match string for check_http

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

match string for check_http

Post by amit.ahuja »

Code: Select all

<object-stream>
<map>
<entry>
<string>apollo.index.docNum.businessTotal</string>
<string>483907</string>
</entry>
<entry>
<string>apollo.index.docNum.trigger.businessTotal</string>
<string>3830</string>
</entry>
<entry>
<string>apollo.index.docNum.product.businessTotal</string>
<string>94073</string>
</entry>
<entry>
<string>apollo.index.diskSize</string>
<string>819.26</string>
</entry>
<entry>
<string>apollo.index.docNum.store.total</string>
<string>48</string>
</entry>
<entry>
<string>apollo.index.docNum.total</string>
<string>584400</string>
</entry>
<entry>
<string>apollo.index.docNum.upc.businessTotal</string>
<string>278698</string>
</entry>
<entry>
<string>apollo.index.docNum.store.businessTotal</string>
<string>48</string>
</entry>
<entry>
<string>apollo.index.docNum.price.businessTotal</string>
<string>94073</string>
</entry>
<entry>
<string>
apollo.index.docNum.category_instruction.businessTotal
</string>
<string>4338</string>
</entry>
<entry>
<string>apollo.index.docNum.suggest.businessTotal</string>
<string>0</string>
</entry>
<entry>
<string>apollo.index.docNum.master.businessTotal</string>
<string>8847</string>
</entry>
</map>
</object-stream>

i want to match any of the above strings, if it's value = 0 then alert.

[root@esu4v187 libexec]# ./check_http -H macyds430 -p 8080 -u /apollo/info?section=INDEX -r "<string>apollo.index.docNum.product.businessTotal<string>|<string>apollo.index.docNum.trigger.businessTotal</string>|<string>apollo.index.docNum.upc.businessTotal</string>|<string>apollo.index.docNum.price.businessTotal</string>|<string>apollo.index.docNum.master.businessTotal</string>|<string>apollo.index.docNum.master.businessTotal</string>\n <string>0</string>"
HTTP OK: HTTP/1.1 200 OK - 2724 bytes in 1.184 second response time |time=1.184243s;;;0.000000 size=2724B;;;0



apollo.index.docNum.suggest.businessTotal = 0 but it's not catching it. How do get this to work? Can anyone help please.
Last edited by hsmith on Wed Oct 07, 2015 11:12 am, edited 1 time in total.
Reason: Please wrap long outputs in code brackets. Thanks!
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: match string for check_http

Post by hsmith »

It may not be be the "intended use" but you should give the Website Defacement Wizard a shot. This can monitor a website for certain things, and alert based on that. The regular website wizard is kind of "opposite" in this regard, as it looks for a string and then alerts if that doesn't exist.

Try it out and let me know!

Thanks.
Former Nagios Employee.
me.
Locked