Harlei,

Pode ser feito da seguinte forma:

-------------------------------------------------------------------------------------------------------------------------------------
commands.cfg
-------------------------------------------------------------------------------------------------------------------------------------
       command_name                          check_http
       command_line                          $USER1$/check_http -I
$HOSTADDRESS$ $ARG1$
-------------------------------------------------------------------------------------------------------------------------------------
services.cfg
-------------------------------------------------------------------------------------------------------------------------------------
define service {
        host_name                       teste.com
        service_description             URL : teste.com
        use                             service-check-interval-5min
        check_command                   check_http!-u / -f follow -t 5
        max_check_attempts              3
        check_period                    24x7
        register                        1
        }

-------------------------------------------------------------------------------------------------------------------------------------


 [image: Nagios] <http://www.nagios.org/>

 <http://www.globo.com/>
Everton Pestana
Monitorações | DataCenter
(21) 2125-2088
everton.ta...@corp.globo.com*
*



Em 18 de maio de 2011 11:25, Harlei Liguori Marcelino
<hligu...@gmail.com>escreveu:

> Olá amigos,
>
> estou com uma dúvida de utilização do check_http ... utilizando o comando
> abaixo na linha de comando, funciona corretamente:
>
> # ./check_http -H teste.com -s "teste" -u '/new/'
>
> HTTP OK: HTTP/1.1 200 OK - 21723 bytes in 0.143 second response time
> |time=0.142836s;;;0.000000 size=21723B;;;0
>
> Como faço para fazer essa checagem utilizando o services.cfg?
>
> O problema é que tenho que monitorar varios sites assim, cada um com um
> host, então não posso inserir um host para cada site, colocando o IP para
> cada um e tal. Teria que conseguir utilizar o -H no services ou algo assim.
> Alguém pode me ajudar a fazer essa checagem como a de cima pelo
> services.cfg?
>
> agradeço desde já
>
> att
>
> Harlei
>
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its
> next-generation tools to help Windows* and Linux* C/C++ and Fortran
> developers boost performance applications - including clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> --
> Nagios-users-br@lists.sourceforge.net mailing list
> https://lists.sourceforge.net/lists/listinfo/nagios-users-br
> Wiki: http://nagios-br.sf.net/wiki
>
------------------------------------------------------------------------------
Simplify data backup and recovery for your virtual environment with vRanger. 
Installation's a snap, and flexible recovery options mean your data is safe,
secure and there when you need it. Data protection magic?
Nope - It's vRanger. Get your free trial download today. 
http://p.sf.net/sfu/quest-sfdev2dev
-- 
Nagios-users-br@lists.sourceforge.net mailing list
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Wiki: http://nagios-br.sf.net/wiki

Responder a