Website monitoring issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Website monitoring issue

Post by kbauma01 »

Hi all,

I'm trying to monitor a web page and I want to search for the word "Summary" but I am getting an error. "(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'"

Service Status Duration Attempt Last Check Status Information
HTTP Warning 1h 1m 29s 5/5 2024-06-06 14:04:13
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

Ping Ok 1h 5m 6s 1/5 2024-06-06 14:00:53
OK -

Web Page Regex Match Warning 59m 48s 5/5 2024-06-06 13:56:56
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

Web Page Content Warning 1h 0m 26s 5/5 2024-06-06 13:56:49
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'

I've tried both Regex and Web Page Content. What am I doing wrong?
User avatar
lgute
Posts: 411
Joined: Mon Apr 06, 2020 2:49 pm

Re: Website monitoring issue

Post by lgute »

Hi @kbauma01, thanks for reaching out.

We could use a little more information, to try and help you sort this out. What version of XI are you using and what OS distro & version?

Also, what Wizard or plugin (check_) are you using?
Please let us know if you have any other questions or concerns.

-Laura
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Re: Website monitoring issue

Post by kbauma01 »

DOH! I should have added more info.

XI 20241.1.3
Red Hat 8.9

I'm using the Website Configuration Wizard. Ping works, but https checks and searching for a word does not.

But if I run it manually in the CCM, I get this:

[nagios@nagserver ~]$ /usr/local/nagios/libexec/check_http -H myserver1.domain -f follow -I 192.1.1.1 -u "/" -S --sni -p 443 -a "user:password"
HTTP OK: HTTP/1.1 200 OK - 18629 bytes in 0.084 second response time |time=0.083907s;;;0.000000 size=18629B;;;0
irfansst
Posts: 8
Joined: Fri Jun 12, 2020 11:10 am

Re: Website monitoring issue

Post by irfansst »

It looks like there might be a problem with how the quotes are being used in your command. Make sure the quotes are properly matched and any special characters are escaped. For example, if you're searching for the word "Summary" with quotes, your command might look like grep "\"Summary\"". If you can provide more details about your command, I can help you troubleshoot further.
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Re: Website monitoring issue

Post by kbauma01 »

I ran both the Website and Website URL wizard. I put "Summary" in the Web Page Content field and for the Web Page Regular Expression field I have "\"Summary\""

They still fail.
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Re: Website monitoring issue

Post by kbauma01 »

OK, I deleted the services checks and the host and ran the website wizard again. Everything but the regex check is OK. The word I am looking for is Orion, is this the correct regex?

-r ""\"Orion\"""
kbauma01
Posts: 54
Joined: Wed May 25, 2022 6:39 am

Re: Website monitoring issue

Post by kbauma01 »

And it's working. I removed the two \'s and it is good.

-r """Orion"""

Thanks for the help!
sgardil
Posts: 350
Joined: Wed Aug 09, 2023 9:58 am

Re: Website monitoring issue

Post by sgardil »

Glad the solution has been found and the fix is in the regex. I'm going to go ahead and lock this issue since the solution has been found. If you run into anything else feel free to reach out.
Locked