Page 1 of 1
Adding plugin to Nagios
Posted: Tue Jul 21, 2015 8:56 pm
by Apurv
Hello People,
I am here again with a new query....
I need to add a few domains to nagios and check there response(uptime/downtime). I could find a plugin named "check_website_response.sh"
Also found the command definition to be inserted in commands.cfg....
Any idea how to get this displayed on web-interface..... Could you please provide me the info on how to get this implemented ??
Also Box293, if possible could u lemme know what all new things u have tried and implemented?? So that I can try them on my end too
Re: Adding plugin to Nagios
Posted: Wed Jul 22, 2015 9:35 am
by jdalrymple
I think the check_http from the nagios plugins package does what you want:
Code: Select all
[jdalrymple@localhost ~]$ /usr/local/nagios/libexec/check_http www.google.com
HTTP OK: HTTP/1.0 200 OK - 19316 bytes in 0.148 second response time |time=0.148163s;;;0.000000 size=19316B;;;0
You could have a command for this that looks something like:
Code: Select all
define command {
command_name check_http
command_line $USER1$/check_http $ARG1$
}
Re: Adding plugin to Nagios
Posted: Thu Jul 23, 2015 3:21 am
by Apurv
Hello jdalrymple,
Thanks for your reply.
The website is hosted on a windows server. Hence I need to check the domain using some check on windows machine. Is there any command in nsclient++ that can check website??
Re: Adding plugin to Nagios
Posted: Thu Jul 23, 2015 9:14 am
by tmcdonald
It doesn't matter what OS is hosting the website, check_http just cares about the HTTP connection itself, the web page contents, etc. It will work just fine against your Windows-based website. It runs on the Nagios machine and you don't need to use NSClient++ unless there is something blocking requests from the Nagios server.
Re: Adding plugin to Nagios
Posted: Fri Jul 24, 2015 5:41 am
by Apurv
Hi tmcdonald,
Thanks for your reply!
When I try to check using "check_http" I am getting time out errors. Could you please let me know.. what I could be missing out?
Should I open any ports on that windows server? OR Anything else that I need to do??
Re: Adding plugin to Nagios
Posted: Fri Jul 24, 2015 9:18 am
by tgriep
Could you post how you are running the check?
Can you run the check from the command line and post back the output?
Re: Adding plugin to Nagios
Posted: Thu Jul 30, 2015 12:18 am
by Apurv
Hello Guys,
Thanks for the help!
check_http plugin solved the issue as u guys had suggested me earlier. The silly mistake I was making is not adding "-H" while checking the same.
Once I added -H in the check command... I started getting the desired output.
Thanks alot.