Definicoes de nome, ip, alias, grupo# Define the switch that we'll be monitoringdefine host{use generic-switch ; Inherit default values from a templatehost_name roteador_espanha ; The name we're giving to this switchalias Roteador espanha ; A longer name associated with the switchaddress 192.168.75.5 ; IP address of the switchhostgroups roteadores ; Host groups this switch is associated with}# HOST GROUP DEFINITIONS - Definicoes de grupo, nome.# Create a new hostgroup for switchesdefine hostgroup{hostgroup_name roteadores ; The name of the hostgroupalias Roteadores ; Long name of the group}# SERVICE DEFINITIONS - Definicao de servicos# Create a service to PING to switchdefine service{use generic-service ; Inherit values from a templatehost_name roteador_botafogo ; The name of the host the service is associated withservice_description PING ; The service descriptioncheck_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the servicenormal_check_interval 5 ; Check the service every 5 minutes under normal conditionsretry_check_interval 1 ; Re-check the service every minute until its final/hard state is determinedArquivo switch.cfg google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_Neste arquivo voce configura para monitorar roteadores, switches na rede, a sintaxe e identica ao arquivo anterior, com suas devidas secoes. # HOST DEFINITIONS - Definicoes de nome, ip, alias, grupo# Define the switch that we'll be monitoringdefine host{use generic-switch ; Inherit default values from a templatehost_name roteador_espanha ; The name we're giving to this switchalias Roteador espanha ; A longer name associated with the switchaddress 192.168.75.5 ; IP address of the switchhostgroups roteadores ; Host groups this switch is associated with}# HOST GROUP DEFINITIONS - Definicoes de grupo, nome.# Create a new hostgroup for switchesdefine hostgroup{hostgroup_name roteadores ; The name of the hostgroupalias Roteadores ; Long name of the group}# SERVICE DEFINITIONS - Definicao de servicos# Create a service to PING to switchdefine service{use generic-service ; Inherit values from a templatehost_name roteador_botafogo ; The name of the host the service is associated withservice_description PING ; The service descriptioncheck_command check_ping!200.0,20%!600.0,60% ; The command used to monitor the servicenormal_check_interval 5 ; Check the service every 5 minutes under normal conditionsretry_check_interval 1 ; Re-check the service every minute until its final/hard state is determinedArquivo contacts.cfg google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); Este arquivo e de extrema importancia, pois ele define quem sera avisado caso aconteca algo com alguma maquina, servidor, impressora e roteadores.E um arquivo pequeno que contem e-mail do administrador. # CONTACTS# Just one contact defined by default - the Nagios admin (that's you)# This contact definition inherits a lot of default values from the 'generic-contact'# template which is defined elsewhere.define contact{contact_name nagiosadmin ; Short name of useruse generic-contact ; Inherit default values from generic-contact template (defined above)alias Administrador do Nagios ; Full name of useremail email@empresa.gov.br, cemail2@empresa.com.br ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******}# CONTACT GROUPS - Define o nome do grupo bem como seus contatos do grupo.# We only have one contact in this simple configuration file, so there is# no need to create more than one contact group.define contactgroup{contactgroup_name adminsalias Nagios Administratorsmembers nagiosadmin}Extra google_protectAndRun("ads_core.google_render_ad", google_handleError, google_render_ad); Apos tudo configurado, como fazer que o Nagios monitore maquinas Windows? Existem diversos programas e exemplos que permitem esta facilidade, vou mostrar a que utilizo