de... check_period 24x7 check_interval 5 retry_interval 1 max_check_attempts 10 check_command check-host-alive notification_period 24x7 notification_interval 30 notification_options d,r contact_groups admins register 0 ; NAO REGISTRAR - ISTO E UM MODELO}...Crie o Arquivo de ConfiguracaoNo diretorio /usr/local/nagios/etc/objects#para isso:# cd /usr/local/nagios/etc/objects## > servidor.cfgEdite o arquivo: e insira o que quer monitorar - abaixo um exemplo# vi servidor.cfg##################### Servico Monitoramento#####################define host{ use linux-nrpe host_name zeus alias debian server address IP_que_ira_monitorar}### CPU LOAD ###define service{ host_name zeus service_description CPU Load check_command check_nrpe!check_load max_check_attempts 2 normal_check_interval 1 retry_check_interval 1 check_period 24x7 notification_interval 30 notification_period 24x7 notification_options w,c,r contact_groups admins}salve o arquivo acima :wqroot@zeus:/usr/local/nagios/etc/linux# ls -ltotal 8-rw-r--r-- 1 root nagios 1952 Mai 29 23:31 servidor.cfgApos o processo acima acesse o diretorio onde se encontra o arquivo de configuracao do Nagios# cd /usr/local/nagios/etcedite o arquivo nagios.cfg e adicione o arquivo criado acima servidor.cfg como exemplo abaixo, para o nagios monitorar# vi nagios.cfgcfg_file=/usr/local/nagios/etc/objects/servidor.cfgsalve o arquivo acima :wqO comando abaixo testa as configuracoes do arquivo de configuracao# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfgChecking for circular paths between hosts...Checking for circular host and service dependencies...Checking global event handlers...Checking obsessive compulsive processor commands...Checking misc settings...Total Warnings: 13Total Errors: 0Apos terminar de testar as configuracoes acima reinicie o servico do nagios# /etc/init.d/nagios restartVisualizacao de telas de monitoramento:Tipos de monitoramento que podem ser usados# Local HDDdefine command{ command_name check_local_disk command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ }# LOADdefine command{ command_name check_local_load command_line $USER1$/check_load -w $ARG1$ -c $ARG2$ }# PROCESSdefine command{ command_name check_local_procs command_line $USER1$/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$ }# USERSdefine command{ command_name check_local_users command_line $USER1$/check_users -w $ARG1$ -c $ARG2$ }# SWAPdefine command{ command_name check_local_swap command_line $USER1$/check_swap -w $ARG1$ -c $ARG2$ }# MRTGTRAFdefine command{ command_name check_local_mrtgtraf command_line $USER1$/check_mrtgtraf -F $ARG1$ -a $ARG2$ -w $ARG3$ -c $ARG4$ -e $ARG5$ }# FTPdefine command{ command_name check_ftp command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$ }# HPJDdefine command{ command_name check_hpjd command_line $USER1$/check_hpjd -H $HOSTADDRESS$ $ARG1$ }# SNMPdefine command{ command_name check_snmp command_line $USER1$/check_snmp -H $HOSTADDRESS$ $ARG1$ }# HTTPdefine command{ command_name check_http command_line $USER1$/check_http -I $HOSTADDRESS$ $ARG1$ }# SSHdefine command{ command_name check_ssh command_line $USER1$/check_ssh $ARG1$ $HOSTADDRESS$ }# DHCPdefine command{ command_name check_dhcp command_line $USER1$/check_dhcp $ARG1$ }# PINGdefine command{ command_name check_ping command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5 }# PING GOOGLEdefine command{ command_name check_google command_line $USER1$/check_ping -H www.google.com.br -w 60,70% -c 80,90% }# POPdefine command{ command_name check_pop command_line $USER1$/check_pop -H $HOSTADDRESS$ $ARG1$ }# IMAPdefine command{ command_name check_imap command_line $USER1$/check_imap -H $HOSTADDRESS$ $ARG1$ }# SMTPdefine command{ command_name check_smtp command_line $USER1$/check_smtp -H $HOSTADDRESS$ $ARG1$ }# TCPdefine command{ command_name check_tcpcommand_line $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ }# UDPdefine command{ command_name check_udp command_line $USER1$/check_udp -H $HOSTADDRESS$ -p $ARG1$ $ARG2$ }# NTdefine command{ command_name check_nt command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$ }# SNMPdefine command{ command_name check_snmp_load_v1 command_line $USER1$/check_snmp_load.pl -H $HOSTADDRESS$ $USER7$ -T $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$ }define command{ command_name check_snmp_int_v1 command_line $USER1$/check_snmp_int.pl -H $HOSTADDRESS$ $USER7$ -n $ARG1$ $ARG2$ }define command{ command_name check_snmp_mem_v1 command_line $USER1$/check_snmp_mem.pl -H $HOSTADDRESS$ $USER7$ $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$ }define command{ command_name check_snmp_storage_v1 command_line $USER1$/check_snmp_storage.pl -H $HOSTADDRESS$ $USER7$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$ }define command{ command_name check_snmp_hpux_storage_v1 command_line $USER1$/check_snmp_hpux_storage.pl -H $HOSTADDRESS$ $USER7$ -m $ARG1$ -w $ARG2$ -c $ARG3$ $ARG4$