Ola Galera,

Fiz o seguinte script em shelll funciona e me da o resultado
esperado so que nao consigo fazer ele aparecer no campo
Status information


#!/bin/sh
# check_snmp_win_ip.sh - Mostra ip de rede
# 2006-01-07 Leandro Costa
#
#

#set -x
HOST=$1
serial=`date +%d%m%Y%H%M%S`
snmpwalk -v1 -c public $HOST -Cp 1.3.6.1.2.1.4.20.1.1 | grep
IP-MIB | cut -f4 -d: >> pesquisaip-$serial.txt

BANCO1=pesquisaip-$serial.txt           # arquivo onde
estão os dados
IFS=:                                   # defina aqui o
separador, padrão é :

  ### INICIO PESQUISA IPS ###
       rm -f ip.txt
       cat $BANCO1 | while read LINHA; do
               set - $LINHA
               ip=`echo $1 | tr -d ' '`
               #printf '%s ' $ip
               echo "$ip " >> ip.txt
       done
      rm -f  pesquisaip-$serial.txt
  ### FIM PESQUISA IPS  ###
    cat ip.txt

=====
para executa-lo basta digitar ./check_snmp_win_ip.sh
<<nomedohost>>
fiz as seguintes configuracoes
arquivo checkcommands.cfg

define command {
        command_name    check_snmp_win_ip
        command_line    $USER1$/check_snmp_win_ip.sh
$HOSTADDRESS$
        }

arquivo  services.cfg

define service{
        use                             generic-service
   ; Name of service template to use
        host_name                       maquina1
        service_description             Endereco IP
        is_volatile                     0
        check_period                    8x5
        max_check_attempts              4
        normal_check_interval           1
        retry_check_interval            1
        contact_groups                  admins
        notification_options            w,u,c,r
        notification_interval           960
        notification_period             8x5
        check_command                   check_snmp_win_ip
        }


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Nagios-users-br mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nagios-users-br
Archives: http://www.mail-archive.com/[email protected]/
http://news.gmane.org/gmane.network.nagios.user.brazil

Responder a