I’m trying to setup nagios where it monitors a website with a port. This website in on a Windows 2003 Server.
When I try the command manually to test - check_http -H “WinSrv IP” -p xxxx
I get an error message “check_http -H: Invalid option -SSL in not available”
When I try it with out the -p command - check_http -H “WinSrv IP” -S
I get an error message “check_http -H: Invalid option -SSL in not available”
What am I missing with the syntax - could it be that I need an something to monitor Windows based server or I need additional plugins.
I know I’m no expert, but help is greatly appreciated.
Check the output of the configure step when compiling the plugins…
a) You are not using ssl so i don’t see why you would need SSL libraries, if check_http required the libs it wouldn’t have compiled.
b) Your syntax is wrong -H does not want an IP, and you don’t need to use the switch twice for sure.
The syntax is definitely correct. I’ve just confirmed it using a colleague of mine nagios system.
check_http -H 'servername' or 'server_ip' -S -p 'port#'
HTTP OK: HTTP/1.1 302 Found -129 bytes in 0.029 seconds response time |time ....blah, blah...
I think, that I need to install some sort of SSL software. Unfortunately, I’m pretty new to Linux/UNIX. What SSL would I need though? I’ve installed openssl-devel, openssl, pyOpenSSL, perl-Cryp-OpenSSL.
Yes, you are right my syntax is wrong. I’ve inadvertently added an extra -H after the IP address. -H will accept either hostname or IP address with the ‘check_http’ command - just verified it.
[quote=“luca”]usage syntax says the opposite… and it mainly depends id you are using vhosts or not.
as i sadi above check the errors and warnings you may get during the configure step. (it should be libssl something )[/quote]
Sorry, kind-a new to Linux. Could you elaborate when you said “check the errors and warnings you may get during the configure step. (it should be libssl something )”?
did you install from source or RPM?
If you went from RPM, the package *****, compile from source following the docs: nagios.sourceforge.net/docs/3_0/quickstart.html
If you already did from source, re-read the docs
define service{
use basic-http-service
service_description Server Web Login
contact_groups admintest
host_name server hostname
check_command check_nrpe!check_https_port
}
I’m so, so, sure that my code is correct - actually it’s not correct! Cause, I’m getting two types of error - cause I have two test website.
The first error - Connection refused by host
The second error - CHECK-NRPE: Socket timeout after 10 seconds.
Can you point me out to the right syntax?
Your help has been greatly appreciated -BIG TIME!
I’m not sure I understand the question, but, the nrpe comes from the same directory - I guess.
No, I only have one nagios server. What I’m trying to accomplish with nagios is to check a webserver and make sure that it’s webpage is up.
So, when I manually run the command:/usr/local/nagios/libexec/check_http -H serverhostname.com -S -p 7773 -u /folder/webpage.jsp
I get a positive response of OK.
I think I’ve got the nrpe.cfg command line configured. But, having a little trouble in getting the services.cfg arguments for the nrpe to work.
For instance, here is my nrpe.cfg command line to check for https with port check:command[check_https_port]=/usr/local/nagios/libexec/check_http -H $ARG1$ -S -p $ARG2$ -u $ARG3$
It has 3 arguments, one for the webpage, one for the port no., and one for the actual folder and file/page.
Here’s my services.cfg for checking the https site define service{
use basic-http-service
service_description Login
contact_groups Web-test
host_name webserver
check_command check_nrpe!check_https_port!https://serverhostname.com!9999!/user/signin.jsp
}
Are my inputs for the arguments correct - nope. I guess I need to see a sample or a proper syntax on how to provide the right arguments.
I’m really sorry for not getting it - chalk this one up for being a nub!
This is what I have for services define service{
use basic-http-service
service_description Web Login Test
contact_groups webtest
host_name serverhostname
check_command check_https_portx!https://serverhostname.com
}
and here’s what I have for nrpe config command[check_https_portx]=/usr/local/nagios/libexec/check_http -H $ARG1$ -S -p 7773 -u /user/signin.jsp
Now, I get an error message when running a -v test.
Checking services…
Error: Service check command ‘check_https_portx’ specified in service ‘Web Login Test’ for host ‘serverhostname’ not defined anywhere!
Also, the link doens’t have sample of using check_http with -S, -p, and a -u. Using check_http is an nrpe command or part of the nagios plugins?
Again, why are you trying to get NRPE into play? NRPE is for checking services on REMOTE hosts. You don’t even want to know that name now!
you need a simple CHECK_HTTP as defined in the example i gave you, and THEN you need to add two parameters. and you almost got that right, except for the fact you insist on adding nrpe configs somewhere…
define a host in hosts.cfg
define a service in services.cfg
define a command in command.cfg