check_http with regex

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_http with regex

Post by Box293 »

In $ARG3$ try:

Code: Select all

(&quot\;status&quot\;:\s&quot\;SUCCESS&quot\;,|<string>\[\]</string>)
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: check_http with regex

Post by haile711 »

hey Box,
I tried your suggestion too, the yield the same result.
You do not have the required permissions to view the files attached to this post.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: check_http with regex

Post by lmiltchev »

Leave the $ARG3$ wrapped in double quotes in your command:

Code: Select all

--regex="$ARG3$"
modify your service by placing the following in the $ARG3$ field in the CCM:

Code: Select all

("status":\s"SUCCESS",|<string>\[\]<string>)
save and apply configuration. Don't test the check in the CCM. Go to Service Detail-><your service>->Force an immediate check. Did this change anything?
Be sure to check out our Knowledgebase for helpful articles and solutions!
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: check_http with regex

Post by haile711 »

I did just as suggested, but got HTTP CRITICAL "pattern not match", but this string is there in the link
This is the output from the page

Code: Select all

<object-stream>
<map>
<entry>
<string>apollo.replication.status</string>
<string>
[ { "slaveReplicationRecords": [ { "status": "SUCCESS", "scope": "", "finished": "11/20/2015 04:42:37",
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: check_http with regex

Post by Box293 »

Is there any change that this is a publicly available URL that we can test against. It can be hard to test some of this regex stuff without being able to test it ourselves.

If that's not possible, I think we should take this into a support ticket so we can help you through a remote session.

Please send an email to [email protected] referencing this forum thread and we'll take it from there. Reply to this thread when you have done this so we can confirm we received the email.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Re: check_http with regex

Post by haile711 »

Good morning Box,
Unfortunately, this URL is not accessible publicly. Can I paste the whole strings here? or upload the page in a text file?
I have email to xisupport also. Thanks
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: check_http with regex

Post by rkennedy »

I see your ticket, as this has been received we will now move this into a ticket.
Former Nagios Employee
Locked