New Install PHP Warnings

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

New Install PHP Warnings

Post by hul1 »

We just installed Nagios XI on the boxes and was able to verify all the system components are valid green but when trying to add the service for
website monitoring "Web Page Content" that's suppose to check for a string in the website, it returns a warning and under status information it shows
"(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'"
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: New Install PHP Warnings

Post by scottwilkerson »

Can you share your configuration in the CCM for the service "Web Page Content"?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

Re: New Install PHP Warnings

Post by hul1 »

Hi Scott,

It should match the content on the page, but it returns a syntax error.
I tried with another site, and it doesn't return this error.

_URL Content redcap.chop.edu

Warning
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file

Specify the parameters that determine how the service should be monitored.

Under normal circumstances:
Monitor the service every
5
minutes.
When a potential problem is first detected:
Re-check the service every
3
minutes up to
3
times before generating an alert.
Monitor the service with this command: (Advanced users only)

check_xi_service_http!-s "Welcome to REDCap!" -f ok -I 159.14.198.10 -u '/' -p 80

If there's some way I can test or debug this, please let me know.
Thanks,
Leonard
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: New Install PHP Warnings

Post by scottwilkerson »

Code: Select all

check_xi_service_http!-s "Welcome to REDCap!" -f ok -I 159.14.198.10 -u '/' -p 80
You are going to need to escape the ! in your string, or remove it, perhaps

Code: Select all

check_xi_service_http!-s "Welcome to REDCap" -f ok -I 159.14.198.10 -u '/' -p 80
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
hul1
Posts: 50
Joined: Mon Jan 14, 2019 12:58 pm

Re: New Install PHP Warnings

Post by hul1 »

Thanks Scott I got it!
I had to change it a little bit to follow the 301 redirects we had from http to https, but I removed the ! and add the following and it worked.

Code: Select all

check_xi_service_http!-s "Welcome to REDCap" -f follow -I 159.14.198.10 -u '/' -p 80
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: New Install PHP Warnings

Post by scottwilkerson »

hul1 wrote:Thanks Scott I got it!
I had to change it a little bit to follow the 301 redirects we had from http to https, but I removed the ! and add the following and it worked.

Code: Select all

check_xi_service_http!-s "Welcome to REDCap" -f follow -I 159.14.198.10 -u '/' -p 80
Great! Glad you got it working to your liking!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked