Help with check_http string not found

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
stepper
Posts: 4
Joined: Thu Sep 03, 2020 1:47 am

Help with check_http string not found

Post by stepper »

Hello, I am a newbie to Nagios and am having issues getting the string check to work on my sites, I am using Nagios XI version 5.7.2 and trying to use check_http as detailed below


My site http://www.blahblahblah.com redirects to https://www.blahblahblah.com/xx/yy/register.asp

$USER1$/check_http -H $ARG1$ $ARG2$
$ARG1$
blahblahblah.com
$ARG2$
-s "stringiamtesting" -f ok -u /xx/register.asp?f5=true -S --sni -p 443

When I run the test url on nagios xi
/usr/local/nagios/libexec/check_http -H http://www.blahblahblah.com -s "stringiamtesting" -f ok -u /xx/register.asp?f5=true -S --sni -p 443

I receive the error below
HTTP CRITICAL: HTTP/1.1 404 Not Found - string 'stringiamtesting' not found on 'https://www.blahblahblah.com/xx/yy/regi ... p\?f5=true' - 1503 bytes in 0.013 second response time |time=0.012899s;;;0.000000 size=1503B;;;0

When I run the same command directly on the server via ssh it returns an http 200 ok both as the nagios user and as root as below
HTTP OK: HTTP/1.1 200 OK - 8908 bytes in 0.025 second response time |time=0.025099s;;;0.000000 size=8908B;;;0
Locked