Galera,
 Como já postei antes, estou tendo problemas com o NAGIOS! eu não consigo
fazer ele checar os hosts remotos :) eu coloquei no meu NRPE.CFG

allowed_hosts=10.10.0.0/16

No meu CGI.CFG

main_config_file=/etc/nagios/nagios.cfg
use_authentication=0

No meu NAGIOS.CFG
cfg_file=/etc/nagios/commands.cfg
cfg_file=/usr/local/nagios/etc/localhost.cfg

#cfg_file=/usr/local/nagios/etc/contactgroups.cfg
cfg_file=/etc/nagios/contacts.cfg
#cfg_file=/usr/local/nagios/etc/dependencies.cfg
#cfg_file=/usr/local/nagios/etc/escalations.cfg
#cfg_file=/usr/local/nagios/etc/hostgroups.cfg
cfg_file=/etc/nagios/hosts.cfg
cfg_file=/etc/nagios/services.cfg
#cfg_file=/etc/nagios/timeperiods.cfg
#cfg_dir=/usr/local/nagios/etc/servers
#cfg_dir=/usr/local/nagios/etc/printers
#cfg_dir=/usr/local/nagios/etc/switches
#cfg_dir=/usr/local/nagios/etc/routers
cfg_dir=/etc/nagios/hosts
cfg_dir=/etc/nagios/services
resource_file=/etc/nagios/resource.cfg
check_external_commands=1

Dentro do /ETC/NAGIOS/SERVICES
tem o arquivo "davinci.cfg" que é uma das minhas máquinas e o conteúdo:

define  service {
        host_name                       davinci.meudominio.local
        service_description             service-ad
        is_volatile                     0
        check_command                   check_dhcp
        max_check_attempts              2
        normal_check_interval           5
        retry_check_interval            30
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        parallelize_check               1
        obsess_over_service             1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               0
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  suporte
        notification_interval           60
        notification_period             24x7
        notification_options            w,u,f
        notifications_enabled           1
        register                        1


E dentro do /ETC/NAGIOS/HOSTS
tem o arquivo davinci.meudominio.local

define  host {
        host_name                       davinci.castmeta.local
        alias                           Servidor AD
        address                         10.10.50.9
        hostgroups                      servidores
        check_command                   check_dhcp
        max_check_attempts              2
        check_interval                  5
        active_checks_enabled           1
        passive_checks_enabled          1
        check_period                    24x7
        obsess_over_host                1
        check_freshness                 0
        event_handler_enabled           1
        flap_detection_enabled          1
        process_perf_data               0
        retain_status_information       1
        retain_nonstatus_information    1
        contact_groups                  suporte
        notification_interval           60
        notification_period             24x7
        notification_options            d,u,f
        notifications_enabled           1
        register                        1


o meu "localhost.cfg"  tá default do Nagios :)

Quando eu rodo o nagios dá este erro

freud:/etc/nagios# /usr/local/nagios/bin/nagios -v /etc/nagios/nagios.cfg

Nagios 2.9
Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
Last Modified: 04-10-2007
License: GPL

Reading configuration data...

Warning: Duplicate definition found for host 'generic-host' (config file
'/etc/nagios/hosts.cfg', starting on line 2)
Warning: Duplicate definition found for service 'local-service' (config file
'/etc/nagios/services.cfg', starting on line 1)
Warning: Duplicate definition found for host 'generic-host' (config file
'/etc/nagios/hosts/hosts.cfg', starting on line 2)
Running pre-flight check on configuration data...

Checking services...
Error: Service check command 'check_dhcp' specified in service 'service-ad'
for host 'davinci.castmeta.local' not defined anywhere!
Error: Contact group 'suporte' specified in service 'service-ad' for host '
davinci.castmeta.local' is not defined anywhere!
Error: Service check command 'check_nrpe' specified in service
'someremoteservice' for host 'davinci.castmeta.local' not defined anywhere!
Error: Contact group 'suporte' specified in service 'someremoteservice' for
host 'davinci.castmeta.local' is not defined anywhere!
Error: Contact group '<nome_do_grupo>' specified in service 'Current Load'
for host 'localhost' is not defined anywhere!
Error: Contact group '<nome_do_grupo>' specified in service 'Current Users'
for host 'localhost' is not defined anywhere!
Error: Contact group '<nome_do_grupo>' specified in service 'PING' for host
'localhost' is not defined anywhere!
Error: Contact group '<nome_do_grupo>' specified in service 'Root Partition'
for host 'localhost' is not defined anywhere!
Error: Contact group '<nome_do_grupo>' specified in service 'Total
Processes' for host 'localhost' is not defined anywhere!
        Checked 7 services.
Checking hosts...
Error: Host check command 'check_dhcp' specified for host '
davinci.meudominio.local' is not defined anywhere!
Error: Contact group 'suporte' specified in host 'davinci.meudominio.local'
is not defined anywhere!
Warning: Host 'freud.meudominio.local' has no services associated with it!
Error: Host 'freud.castmeta.local'  has no default contact group(s) defined!
        Checked 3 hosts.
Checking host groups...
        Checked 2 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
Error: Contact 'augusto' has no service notification commands defined!
Error: Contact 'augusto' has no host notification commands defined!
Warning: Contact 'augusto' is not a member of any contact groups!
Error: Contact 'leonardo' has no service notification commands defined!
Error: Contact 'leonardo' has no host notification commands defined!
Warning: Contact 'leonardo' is not a member of any contact groups!



Alguém pode me passar algum modelo do services.cfg e de um host remoto sendo
monitorado???

Abs[]
Augusto
-- 
------------------------------
"Segurança da Informação se faz com tecnologia, processos e pessoas, e a
formação destas exige mais que uma seqüência de treinamentos. Porque você
treina macacos. Pessoas,você educa."

"Se a gente se lança sem vigor, sete de dez ações tomadas não dão certo. É
extremamente difícil tomar decisões num estado de agitação. Por outro lado,
se sem se preocupar com as conseqüências menores, abordamos os problemas com
o espíito afiado como uma lâmina, sempre encontramos a solução em menos
tempo do que é necessáio para respirar sete vezes."  Nabeshima Naoshige
(1538-1618)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
-- 
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