Page 1 of 1

how can monitor url website with check_ping on windows clien

Posted: Thu Nov 24, 2016 4:43 am
by baber
Dear all

i have a website and many virtual machine that just via one of my virtual machine (vm1) that host have to open and vm1 is windows os now i want to know
can i use this script :

https://github.com/catinello/nagios-check-website

can this script run on nagios server and first connect to vm1(windows os) and then via that chk my website can be open or not?


BR

Re: how can monitor url website from nagios via other VM

Posted: Mon Nov 28, 2016 2:03 pm
by rkennedy
As it's a third party plugin, it's hard to say. At a quick glance though it appears to be bash which I don't think will run properly on Windows yet.

Re: how can monitor url website from nagios via other VM

Posted: Mon Nov 28, 2016 2:25 pm
by baber
rkennedy wrote:As it's a third party plugin, it's hard to say. At a quick glance though it appears to be bash which I don't think will run properly on Windows yet.
This is my plan

I have a server that os is windows server2008 now i can this server completely from nagios such as disk space cpu memory and .... now i have a website that this server just can access to that now i want just check http or check website url that sure website is ok and that server has access that i thought perhaps nagios server can connect to that server and then check url or check website that is ok or not now can i do this with nagios or if can not use this way what solution do you have for monitor that website url from a server??

BR

Re: how can monitor url website from nagios via other VM

Posted: Mon Nov 28, 2016 4:42 pm
by tgriep
Take a look at this link to see if this would work for you.
https://exchange.nagios.org/directory/P ... pe/details

Re: how can monitor url website from nagios via other VM

Posted: Mon Nov 28, 2016 4:45 pm
by avandemore
See example 2b. https://assets.nagios.com/downloads/nag ... e/NRPE.pdf

You would need to find some Windows equivalent of check_http so that NSClient can run it, or install a Unix/Linux VM on the 2008 server and run it from there.

Re: how can monitor url website from nagios via other VM

Posted: Mon Nov 28, 2016 11:14 pm
by baber
So thanks

check_ping.bat is ok for me but when i run this plugin on windows client it is ok

check_ping.bat google.com

OK: Ping succeded

but now i want it chk automatically from nagios

i have added this line to nsclient.ini file :
i have attached nasclient.ini file

Code: Select all

check_web_up = check_ping.bat google.com
and on that server.cfg file add this service

Code: Select all

define service{
use          		 generic-service
host_name      		 Topup-Service
service_description      website
check_command       	 check_nrpe!check_ping 
}


but not work and appear this message on nagios

Unknown command(s): check_ping

Re: how can monitor url website with check_ping on windows c

Posted: Tue Nov 29, 2016 12:04 pm
by avandemore
We don't write or maintain NSClient, nor do we support custom plugins. That being said, here are some pointers:

You defined a command check_web_up. Then you called a command check_nrpe!check_ping. This most likely should be check_nrpe!check_web_up along with ensuring NSClient has been restarted after the configuration change. For further assistance with this topic, please consult the document I linked to previously and the NSClient website https://www.nsclient.org/.

Re: how can monitor url website with check_ping on windows c

Posted: Tue Nov 29, 2016 12:59 pm
by baber
avandemore wrote:We don't write or maintain NSClient, nor do we support custom plugins. That being said, here are some pointers:

You defined a command check_web_up. Then you called a command check_nrpe!check_ping. This most likely should be check_nrpe!check_web_up along with ensuring NSClient has been restarted after the configuration change. For further assistance with this topic, please consult the document I linked to previously and the NSClient website https://www.nsclient.org/.

so thanks
my problem has been solved

BR