Manual completo de instalação e configuração do Nagios 3 no Linux Debian 4.0 Etch

Esse artigo se propõe a auxiliar aos que querem uma solução de monitoramento de rede. O Nagios é uma popular aplicação de monitoração de rede de código aberto e licenciado pelo sistema GPL. Ele pode monitorar tanto hosts quanto serviços, alertando-o quando ocorrerem problemas e também quando os problemas forem resolvidos.

[ Hits: 316.805 ]

Por: Eduardo Carneiro em 16/09/2008


Instalação dos plugins em máquinas Windows



Atenção! Assim como nos plugins do Linux esses comandos deverão ser passados na máquina Windows a ser monitorada.

Primeiro baixe o NsClient++ do endereço abaixo:
A partir de agora siga os seguinte passos:
  1. Descompacte-o em um diretório qualquer (exemplo C:) da máquina a ser monitorada.
  2. Descomente todas as DLLs na seção modules do arquivo NSC.ini que se encontra dentro da pasta NSClient++ com exceção da CheckWMI.dll e da RemoteConfiguration.dll.
  3. Em allowed_host na seção Settings descomente a linha e coloque o IP do servidor Nagios. Exemplo: allowed_hosts=192.168.0.5/32.
  4. Na seção NSClient descomente a diretiva allowed_hosts e coloque também o IP do servidor Nagios como no item acima.
Obs.: Se houver algum tipo de firewall entre a comunicação do servidor Nagios e o host a ser monitorado será necessário liberar a porta 12489 e descomentar a diretiva port na seção NSClient.

Agora instalaremos o plugin para rodar como serviço nas máquinas Windows que serão monitoradas. Após descompactar o arquivo baixado anteriormente, encontraremos dentro da pasta NSClient++ um executável chamado NSClient++.exe.

Precisaremos rodar esse executável via linha de comando pelo prompt de comando. A linha de comando para instalar o NSClient++ como serviço via prompt de comando é a seguinte:

NSClient++.exe -install

A partir de agora ele estará instalado como serviço. Agora abra a console de serviços do Windows em "Painel de Controle" e dê um clique duplo no serviço "NSClientpp". Na aba General certifique-se de que o serviço esteja marcado como automático, se não tiver marque-o.

Na aba "log On" marque a opção "Allow Service to interact with desktop" para interagir com o desktop.

Após a configuração do serviço descrito acima temos que iniciá-lo com o seguinte comando no prompt do Windows:

# NSClient++.exe -start

Obs.: Esse comando terá que ser passado de dentro da pasta do NSClient++ baixada anteriormente.

Pronto, depois desses passos temos o plugin do Nagios instalado e iniciado na máquina Windows e podemos monitorar os recursos locais da máquina tais como CPU, processos, memória etc.

Página anterior     Próxima página

Páginas do artigo
   1. Preparando o ambiente para a instalação
   2. Instalando o Nagios
   3. Instalando os plugins do Nagios
   4. Software para envio de notificações por e-mail
   5. Instalação dos plugins em máquinas Linux
   6. Instalação dos plugins em máquinas Windows
   7. Arquivos de configuração do Nagios
   8. Conclusão
Outros artigos deste autor
Nenhum artigo encontrado.
Leitura recomendada

Instalando MPlayer + GUI-GMPlayer + Skin + Codecs + fonts para Linux

Gerenciamento remoto de servidores VMWare via SSH

CruxPorts4Slack - O ports para Slackware

MainActor: Edição de vídeo profissional (Adobe Premiere) em Linux

Autorando DVDs com Qdvdauthor usando menus animados

  
Comentários
[1] Comentário enviado por senomar em 16/09/2008 - 19:20h

Muito bom o artigo amigo, parabéns.

Eu utilizo o Nagios com o Debian Etch tbm, combinação perfeita.

[2] Comentário enviado por Telli em 17/09/2008 - 11:25h

Opa,
Estou com uma dúvida. Para cada servidor eu vou ter que criar um arquivo de configuração
Por exemplo:

Windows.cfg
Windows1.cfg
windows2.cfg

E depois

command.cfg
command2.cfg

Estou com essa dúvida, poderiam me ajudar por favor
Obrigado

[3] Comentário enviado por andre9b em 17/09/2008 - 11:29h

Voce pode tanto criar varios arquivos um para cada maquina como pode fazer tudo isso em um unico arquivo.
Eu configurei tudo em unico arquivo pois fica mais facil para mim de fazer qualquer alteração.

Se for usar varios arquivos esses deverão estar definidos dentro do nagios.cfg

[4] Comentário enviado por eduardoocarneiro em 17/09/2008 - 11:58h

Bom, eu prefiro criar um arquivo para cada host. Acho que assim eu separo melhor os serviços que rodam em cada um. É uma questão pessoal de cada um.

Quanto ao commands.cfg, esse sim basta existir um. Nele você passa todos os comandos necesários. conforme a parte 7 desse artigo.

Se você quiser monitorar FTP terá que configurar esse comando no commands.cfg. Veja um exemplo abaixo:

define command{
command_name check_ftp
command_line $USER1$/check_ftp -H $HOSTADDRESS$ $ARG1$
}

Se você quiser monitorar a porta 1433 (SQL Server):

define command{
command_name Porta_SQL
command_line $USER1$/check_tcp -H $HOSTADDRESS$ -p 1433
}

Sendo assim, basta ter um arquivo commands.cfg. Nele você configura todos os comandos de acordo com a sua necessidade.

O mesmo acontece para os demais arquivos de configuração (timeperiods.cfg, misccommands.cfg, etc.).

Espero ter ajudado! Até mais!!

[5] Comentário enviado por Telli em 17/09/2008 - 14:20h

Certo, vou criar um por um que acho que também fica mais fácil.
No caso eu crio dentro de /usr/local/nagios/etc/objects > server1.cfg > server2.cfg

Isto é meio distante ainda para mim, mas vamos lá, o command lê sozinho os arquivos do server1.cfg por exemplo
uma vez em que eu definir o nome do serviço dentro do arquivo. Digamos que eu crie um servidor de DNS ai eu crio
com os parametros abaixo, e declaro o parametro DNS no command ?

### DNS ###
define service{
use generic-service
host_name servidor3
service_description DNS
check_command Porta_dns
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
}


Valeu a ajuda

[6] Comentário enviado por eduardoocarneiro em 17/09/2008 - 14:44h

É mais ou menos isso Telli. O parâmetro "check_command" que está em cada arquivo de host checa exatamente o nome do comando, no seu caso, Porta_DNS, declarado no commands.cfg

[7] Comentário enviado por junior em 17/09/2008 - 18:51h

Aqui ele não criou o nagios dentro do /etc/init.d/ me impossibilitando de startar o serviço.

[8] Comentário enviado por grandmaster em 17/09/2008 - 23:01h

show de bola o artigo.

Parabéns.

Renato de Castro Henriques
CobiT Foundation 4.1 Certified ID: 90391725
http://www.renato.henriques.nom.br

[9] Comentário enviado por wemersonrsouza em 18/09/2008 - 00:09h

fera como eu faço para add som no nagios2 assim poderei deixa a page do nagios sempre aberto sem ter ficar olhando para ela o tempo todo com o som ficaria mais facil

[10] Comentário enviado por eduardoocarneiro em 18/09/2008 - 07:55h

Junior.rocha,

É estranho ele não ter criado. Eu sugiro que você refaça a instalação começando do zero. em todo caso se ainda ssim não der certo crie um arquivo chamado nagios dentro do /etc/init.d com o conteúdo abaixo:

status_nagios ()
{
if test -x $NagiosCGI/daemonchk.cgi; then
if $NagiosCGI/daemonchk.cgi -l $NagiosRunFile; then
return 0
else
return 1
fi
else
if ps -p $NagiosPID > /dev/null 2>&1; then
return 0
else
return 1
fi
fi
return 1
}
printstatus_nagios()
{
if status_nagios $1 $2; then
echo "nagios (pid $NagiosPID) is running..."
else
echo "nagios is not running"
fi
}
killproc_nagios ()
{
kill $2 $NagiosPID
}
pid_nagios ()
{
if test ! -f $NagiosRunFile; then
echo "No lock file found in $NagiosRunFile"
exit 1
fi
NagiosPID=`head -n 1 $NagiosRunFile`
}
# Source function library
# Solaris doesn't have an rc.d directory, so do a test first
if [ -f /etc/rc.d/init.d/functions ]; then
. /etc/rc.d/init.d/functions
elif [ -f /etc/init.d/functions ]; then
. /etc/init.d/functions
fi
prefix=/usr/local/nagios
exec_prefix=${prefix}
NagiosBin=${exec_prefix}/bin/nagios
NagiosCfgFile=${prefix}/etc/nagios.cfg
NagiosStatusFile=${prefix}/var/status.dat
NagiosRetentionFile=${prefix}/var/retention.dat
NagiosCommandFile=${prefix}/var/rw/nagios.cmd
NagiosVarDir=${prefix}/var
NagiosRunFile=${prefix}/var/nagios.lock
NagiosLockDir=/var/lock/subsys
NagiosLockFile=nagios
NagiosCGIDir=${exec_prefix}/sbin
NagiosUser=nagios
NagiosGroup=nagios
# Check that nagios exists.
if [ ! -f $NagiosBin ]; then
echo "Executable file $NagiosBin not found. Exiting."
exit 1
fi
# Check that nagios.cfg exists.
if [ ! -f $NagiosCfgFile ]; then
echo "Configuration file $NagiosCfgFile not found. Exiting."
exit 1
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting nagios:"
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
su - $NagiosUser -c "touch $NagiosVarDir/nagios.log $NagiosRetentionFile"
rm -f $NagiosCommandFile
touch $NagiosRunFile
chown $NagiosUser:$NagiosGroup $NagiosRunFile
$NagiosBin -d $NagiosCfgFile
if [ -d $NagiosLockDir ]; then touch $NagiosLockDir/$NagiosLockFile; fi
echo " done."
exit 0
else
echo "CONFIG ERROR! Start aborted. Check your Nagios configuration."
exit 1
fi
;;
stop)
echo -n "Stopping nagios: "
pid_nagios
killproc_nagios nagios
# now we have to wait for nagios to exit and remove its
# own NagiosRunFile, otherwise a following "start" could
# happen, and then the exiting nagios will remove the
# new NagiosRunFile, allowing multiple nagios daemons
# to (sooner or later) run - John Sellens
#echo -n 'Waiting for nagios to exit .'
for i in 1 2 3 4 5 6 7 8 9 10 ; do
if status_nagios > /dev/null; then
echo -n '.'
sleep 1
else
break
fi
done
if status_nagios > /dev/null; then
echo ''
echo 'Warning - nagios did not exit in a timely manner'
else
echo 'done.'
fi
rm -f $NagiosStatusFile $NagiosRunFile $NagiosLockDir/$NagiosLockFile $NagiosCommandFile
;;
status)
pid_nagios
printstatus_nagios nagios
;;
checkconfig)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo " OK."
else
echo " CONFIG ERROR! Check your Nagios configuration."
exit 1
fi
;;
restart)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done."
$0 stop
$0 start
else
echo " CONFIG ERROR! Restart aborted. Check your Nagios configuration."
exit 1
fi
;;
reload|force-reload)
printf "Running configuration check..."
$NagiosBin -v $NagiosCfgFile > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "done."
if test ! -f $NagiosRunFile; then
$0 start
else
pid_nagios
if status_nagios > /dev/null; then
printf "Reloading nagios configuration..."
killproc_nagios nagios -HUP
echo "done"
else
$0 stop
$0 start
fi
fi
else
echo " CONFIG ERROR! Reload aborted. Check your Nagios configuration."
exit 1
fi
;;
*)
echo "Usage: nagios {start|stop|restart|reload|force-reload|status|checkconfig}"
exit 1
;;
esac

[11] Comentário enviado por eduardoocarneiro em 18/09/2008 - 08:04h

wemersonrsouza,

Dentro do arquivo cgi.cfg que se encontra em /usr/local/nagios/etc existem as opções para som no nagios. São arquivos .wav

Veja abaixo como está no meu caso a parte de som do nagios no meu arquivo cgi.cfg:

##########################################
# <varname>=<sound_file>
#
# Note: All audio files must be placed in the /media subdirectory
# under the HTML path (i.e. /usr/local/nagios/share/media/).

host_unreachable_sound=hostdown.wav
host_down_sound=hostdown.wav
service_critical_sound=critical.wav
service_warning_sound=warning.wav
service_unknown_sound=warning.wav
normal_sound=noproblem.wav
##########################################

Obs: Todos esses arquivos, hostdown.wav, critical.wav, etc. tem de ser colocados em /usr/local/nagios/share/media/.

[12] Comentário enviado por Telli em 19/09/2008 - 19:48h

Estou com um problema.
Estou querendo monitorar o meu serviço de DNS ( Windows ) configurei mas me aparece isso aqui

Usage:check_dns -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit]

Falta varios parâmetros pelo jeito, como posso solucionar ?

valeu

[13] Comentário enviado por vinicius.santoro em 19/11/2008 - 10:14h

Estou tendo um pequeno problema com os clients Windows.
Quando eu passo qualquer parâmetro de consulta que não seja o PING, eu obtenho a resposta Connection Refuse.
O que pode ser?

No client do Windows eu configurei o Allowed Hosts com o IP do servidor, ou seja, os parâmetros de conexão (teoricamente) estão corretos.

----SOLUCIONADO----
Reinstalei o client, porém utilizando o pNSClient e voltou a funcionar.

[14] Comentário enviado por marcelo_fmu em 12/03/2009 - 13:07h

Bom dia!

Srs,

Tenho um problema e ficarei muito agradecido se alguém puder me ajudar.

Atualmente possuo o Nagios 3 instalado no Debian 4. Possuo aproximadamente 40 servidores sendo monitorados perfeitamente por ele, com uma única excessão.

Não consigo monitorar o espaço em disco das unideds D:, E:, F:, etc... só consigo monitorar os drivers C: dos servidores.

Alguém sabe como resolver este problema?

[15] Comentário enviado por mario.sales em 21/04/2009 - 12:02h

eduardoocarneiro,
Parabéns pelo POST.

Pessoal,

Não estou conseguindo fazer o Nagios executar um alerta sonoro ao encontrar alertas.
já configurei o arquivo cgi.cfg como abaixo:
----------
CGI.CFG
----------------------------
host_unreachable_sound=hostdown.wav
host_down_sound=hostdown.wav
service_critical_sound=critical.wav
service_warning_sound=warning.wav
service_unknown_sound=warning.wav
----------------------------

-- Os arquivos estão localizaados na /usr/local/nagios/share/media/

No entanto o Nagios não consegue executar alertas sonoros.

Version - Nagios 3.0
Obs.: O Nagios está funcionando normalmente, apenas não executa alertas sonoros....

Abraços,
Fico no aguardo....


[16] Comentário enviado por donabuba em 16/06/2009 - 14:09h

Como eu faço pra monitorar mais de um hd nos servidores?

[17] Comentário enviado por ataol em 17/06/2009 - 14:17h

Colega Valew muito pelo Artigo, o Nagios está normal.

Eu não sabia que meu amigo tinha instalado o LAMP e depois que instalei o Apache2 acabei arrumando um problema, antes de instalar eu tinha um gerenciador via Web e um site q funcionava na hora que digitava o IP Valido do servidor tipo:

Acessar o site=> XXX.X.XX.XXX

Gerenciador Financeiro Web - SCUT=> XXX.X.XX.XXX/scut

MYSLQ=> XXX.X.XX.XXX/phpmysqladmin


Agora quando tento fazer qualquer uma dessas coisa pede é para salvar o arquivo index.php ao inves de abir os gerenciadores solicitados.

Como faço para corrigir o problema?

Se eu reinstalar o LAMP corre o risco de perder o banco de dados que já tenho no servidor?


Desde já obrigado.

[18] Comentário enviado por bdsr em 24/06/2009 - 16:17h

Cara parabéns pelo artigo.

Estou com o Nagios a todo vapor, aproveitei e instalei o nagiosql também, mas agora estou com uma dúvida, como instalar um plugin para monitorar bancos de dados Firebird/Interbase. Cheguei a achar um plugin neste site http://www.firebase.com.br/fb/downloads.php?busca=nagios , li o arquivo readme, adicionei no commands.cfg os comandos de monitoração, mas na parte de compilar o plugin eu travei. Caso alquém já tenha utilizado este plugin, ou tenha utilizado outra forma de monitorar Firebird/Interbase, e queria dar uma dica, ficarei muito agradecido.
Até a próxima.

[19] Comentário enviado por bruno.staff em 23/07/2009 - 23:09h

Parabens amigo pelo Post, porem como todo aprendiz, tenho uma duvida! Eu posso instala o Nagios na propria maquina aonde vai roda minha aplicação e realizar o monitoramento dela?


[20] Comentário enviado por andre4p em 16/10/2009 - 21:58h

dou um make all e nada acontece alguem pode me ajudar por favor





andre4p:/dados/nagios-3.2.0# ./configure --with-command-group=nagcmd
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether make sets $(MAKE)... no
checking for strip... /usr/bin/strip
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking ctype.h usability... yes
checking ctype.h presence... yes
checking for ctype.h... yes
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking grp.h usability... yes
checking grp.h presence... yes
checking for grp.h... yes
checking libgen.h usability... yes
checking libgen.h presence... yes
checking for libgen.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking math.h usability... yes
checking math.h presence... yes
checking for math.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking pthreads.h usability... no
checking pthreads.h presence... no
checking for pthreads.h... no
checking pwd.h usability... yes
checking pwd.h presence... yes
checking for pwd.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking stdarg.h usability... yes
checking stdarg.h presence... yes
checking for stdarg.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking for sys/types.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking for sys/wait.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for sys/stat.h... (cached) yes
checking sys/timeb.h usability... yes
checking sys/timeb.h presence... yes
checking for sys/timeb.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking sys/ipc.h usability... yes
checking sys/ipc.h presence... yes
checking for sys/ipc.h... yes
checking sys/msg.h usability... yes
checking sys/msg.h presence... yes
checking for sys/msg.h... yes
checking sys/poll.h usability... yes
checking sys/poll.h presence... yes
checking for sys/poll.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking uio.h usability... no
checking uio.h presence... no
checking for uio.h... no
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for struct tm.tm_zone... yes
checking for mode_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking for uid_t in sys/types.h... yes
checking type of array argument to getgroups... gid_t
checking for va_copy... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for asprintf... yes
checking for vasprintf... yes
checking for C99 vsnprintf... yes
checking for initgroups... yes
checking for setenv... yes
checking for strdup... yes
checking for strstr... yes
checking for strtoul... yes
checking for unsetenv... yes
checking for type of socket size... size_t
checking for pthread_create in -lcma... no
checking for pthread_create in -lpthread... yes
checking for library containing nanosleep... none required
checking for mail... /usr/bin/mail
We'll use default routines (in xdata/xsddefault.*) for status data I/O...
We'll use default routines (in xdata/xcddefault.*) for comment data I/O...
We'll use default routines (in xdata/xrddefault.*) for retention data I/O...
We'll use template-based routines (in xdata/xodtemplate.*) for object data I/O...
We'll use default routines (in xdata/xpddefault.*) for performance data I/O...
We'll use default routines (in xdata/xdddefault.*) for scheduled downtime data I/O...
checking for main in -liconv... no
checking for gdImagePng in -lgd (order 1)... no
checking for gdImagePng in -lgd (order 2)... yes
GD library was found!
checking for gdImageCreateTrueColor in -lgd... yes
checking ltdl.h usability... no
checking ltdl.h presence... no
checking for ltdl.h... no
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for dlopen in -ldl... yes
checking for extra flags needed to export symbols... -Wl,-export-dynamic
checking for linker flags for loadable modules... -shared
checking for traceroute... /usr/sbin/traceroute
checking for type va_list... yes
checking for perl... /usr/bin/perl
configure: creating ./config.status
config.status: creating Makefile
config.status: creating subst
config.status: creating pkginfo
config.status: creating base/Makefile
config.status: creating common/Makefile
config.status: creating contrib/Makefile
config.status: creating cgi/Makefile
config.status: creating html/Makefile
config.status: creating module/Makefile
config.status: creating xdata/Makefile
config.status: creating daemon-init
config.status: creating t-tap/Makefile
config.status: creating include/config.h
config.status: creating include/snprintf.h
config.status: creating include/cgiutils.h

Creating sample config files in sample-config/ ...


*** Configuration summary for nagios 3.2.0 08-12-2009 ***:

General Options:
-------------------------
Nagios executable: nagios
Nagios user/group: nagios,nagios
Command user/group: nagios,nagcmd
Embedded Perl: no
Event Broker: yes
Install ${prefix}: /usr/local/nagios
Lock file: ${prefix}/var/nagios.lock
Check result directory: ${prefix}/var/spool/checkresults
Init directory: /etc/init.d
Apache conf.d directory: /etc/apache2/conf.d
Mail program: /usr/bin/mail
Host OS: linux-gnu

Web Interface Options:
------------------------
HTML URL: http://localhost/nagios/
CGI URL: http://localhost/nagios/cgi-bin/
Traceroute (used by WAP): /usr/sbin/traceroute


Review the options above for accuracy. If they look okay,
type 'make all' to compile the main program and CGIs.

andre4p:/dados/nagios-3.2.0# make all
bash: make: command not found

[21] Comentário enviado por ricardoas30 em 24/10/2009 - 21:10h

Ola, gostei muito do tutorial ja instalei e esta rodando aqui nos servidores. Mais tenho uma duvida sobre os comandos externos no nagios. Ouvi dizer que o nagios pode RESTARTA ou START em servicos que cairem, eh verdade ? fico no aguardo !

[22] Comentário enviado por fernandogomes01 em 25/10/2009 - 01:32h

olá primeiramente parabens pelo post
tou com um problema durante a instalacao, quando eu executo
./configure --with-command-group=nagcmd
# make all

ele apresenta o seguinte erro
root@mk-auth_StellaNet:/dados/nagios-3.0.1# ./configure --with-command-group=nagcmd
checking for a BSD-compatible install... /usr/bin/install -c
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.

e daí pra frente nao consigo fazer mais nada
será que pode me ajudar

[23] Comentário enviado por cravo09 em 21/11/2009 - 18:24h

Agora quando tento fazer qualquer uma dessas coisa pede é para salvar o arquivo index.php ao inves de abir os gerenciadores solicitados.

Como faço para corrigir o problema?

Estou usando debian 5 e segui o artigo ate o final sem nenhum problema

[24] Comentário enviado por rogeroli em 18/12/2009 - 20:16h

Ola eduardoocarneiro,

Muito bom tutorial esse seu, vou começar a instalar seguindo o seu material só que antes gostaria de tirar algumas duvidas.

1º Não é necessario fazer a instalação do banco de dados ?
2º Ao inves de instalar na unha o nagios eu também posso instala-lo via apt-get daria no mesmo qual a diferença da instalação via comando e do apt-get alem da facilidade do apt-get ?

Att.

[25] Comentário enviado por jgama em 19/12/2009 - 22:26h

Rogerol, nos dois modos funcionam, mas se vc não quer ter trabalho usa o apt-get, que praticamnete vc já está como nagios funcionando.

A diferença, são os locais que o nagios e seus arquivos são instalado.

O nagios3 é bem diferente do nagios2 que usava outra modo de funcionamento, já começando com os arquivos. *.cfg

Abraços

[26] Comentário enviado por jgama em 19/12/2009 - 22:33h

Pessoal, só estou com um probela com o Nagios, estou tentando pegar alguma imformações do cliente Windows e na pagina web do nacio paracer todas as opções como criticas.

Instalei o cliente NSClient++ numa máquina Windows conforme os passo a passo do tutorial, mas não consegue exito nas informações.

Já verifiquei no cliente e o programinga do NSClient esta iniciando junto ao sistema e abrira 12489 no firewall no servidor e nada.

Tem mais alguma coisa a fazer?

Abraço

[27] Comentário enviado por mcaju em 22/01/2010 - 11:11h

Parabéns pelo artigo, muito bom!

Claro, objetivo e possibilita uma instalação sem demais problemas.

Att.

MCaju.

[28] Comentário enviado por pro.oliveira em 03/02/2010 - 10:46h

Eu não estou conseguindo enviar as notificações por e-mail.
fiz a configuração conforme indicado mais não esta funcionando.

alguem pode me ajudar por favor

[29] Comentário enviado por agimenez em 09/04/2010 - 09:05h

Para aqueles que tiverem problema ao compilar o nrpe-2.12.tar.gz (Instalação dos plugins em máquinas Linux)

Segue minha solução:

Debian 4.0

Ao compilar o NRPE (./configure) deu erro de SSL, solução:

apt-get install openssl-devel libcurl3-openssl-dev


CentOS 5.2

Ao compilar o NRPE (./configure) deu erro de SSL, solução:

yum install openssl-devel

[30] Comentário enviado por agimenez em 15/04/2010 - 15:56h

Solução de e-mail diferente pode usar:

SSMTP

CentOS:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm

yum install ssmtp

Debian-like:

apt-get install ssmtp

Como funciona, veja aqui:
http://softwarelivre.org/andre-ferraro/blog/linux-enviando-e-mail-do-gmail-pelo-bash-linha-de-comand...

[31] Comentário enviado por agimenez em 15/04/2010 - 15:57h

Alguém sabe quais locais devo me preocupar com backup?

Já que ele gera relatórios, caso perca a máquina, gostaria de manter um histórico de tudo que monitoro.

Agradeço!

[32] Comentário enviado por jacori em 11/08/2010 - 09:52h

Tutorial show de bola..

Mas não consegui fazer login no Nagios...

Estou utilizando o Suse 11, com apacha2..

Alguem pode me orientar?

Obrigado!

[33] Comentário enviado por jacori em 27/11/2010 - 11:46h

Parabéns pelo tutorial!!!

Show de bola!!

Me responde uma duvida?rs

Como faço para monitorar o estaço em disco? Quais parametros e em quais arquivos?

Obrigado.

[34] Comentário enviado por alyssonbrother em 12/01/2011 - 18:53h

show de bola essa tutorial, seguinte: onde eu vou criar essas pastas servidor1 , servidor2, servidor 3 ???? e qual e como será o nome do arquivo de configuração, por exemplo ???.cfg como vai se chamar o arquivo modelo e como eu vou fazer pra CHAMAR ESSE ARQUIVO DE CONFIGURAÇÃO?

senhores, me perdoe a ignorancia, Deus abençõe a todos, muito obrigado, tô apanhando pra caramba pra instalar isso + é uma questão de Honra no meu trabalho, por favor me ajudem queridos, valeu um abraço a todos


Alysson

[35] Comentário enviado por robson.cristovao em 24/03/2011 - 18:37h

Pessoal, sou bem leigo no Ubuntu e também no Nagios.
Estou seguindo passo a passo e ao instalar o arquivo web conf ocorreu o seguinte erro:

"Sem regra para processar o alvo 'install-webconf'. Pare.

Estou no diretorio: root@Nagios: /dados/nagios-3.0.1

tentei executar na dir /etc/apache2/conf.d e ocorreu o mesmo erro..poderiam auxiliar?

[36] Comentário enviado por jonathan.giga2 em 10/08/2011 - 17:02h

Cara seu tuto está muitooo maneiro...para mim só faltou o envio de e-mail. Esse link que vc colocou ai esta pedindo usuario e senha vc teria como passar?

Grato,

Sucesso!!!

[37] Comentário enviado por tiagoban em 02/09/2011 - 10:43h

Bom dia, estou com problema no nagios quanto tento: /etc/init.d/nagios start
#Starting nagios:CONFIG ERROR! Start aborted. Check your nagios configuration..


Alguem sabe como me ajudar neste caso?

[38] Comentário enviado por leandro.kate em 30/09/2011 - 11:50h

Bom dia Eduardo

seu artigo esta show de bola, mas preciso de um favor seu

envio de email pelo nagios !!!

esse link que vc postou esta pedindo uma senha é isso mesmo ???

se for qual é a senha do download ???

Obrigado

[39] Comentário enviado por rodrigolbarros em 18/10/2011 - 15:49h

Uma ajudinha por favor!

eu não sei o que está ocorrendo nos passos que eu segui deste tuto, meu problema está na hora de utilizar o browser para acessar o nagios e o usuario e senha não batem. e eu fiz exatamente como no tuto.

há algum ser humano que possa me ajudar?

sucesso para todos!

[40] Comentário enviado por danielpmorais em 20/12/2011 - 17:47h

Amigos, boa tarde.

Ja fis este passos.

Agora é o momento em que instalaremos de fato o Nagios. Descompacte o fonte do sistema e compile conforme os comandos abaixo:

# cd /dados
# tar xzvf nagios-3.0.1.tar.gz
# cd nagios-3.0.1
# ./configure --with-command-group=nagcmd

Porem quando vou tentar fazer este abaixo ele informa que bash:make:: comando não encontrado.

# make all
# make install
# make install-init
# make install-config
# make install-commandmode

Obs.: Não inicie o Nagios ainda.

Instalando o arquivo do Nagios web config no diretório conf.d do Apache:

# make install-webconf

[41] Comentário enviado por schiavopbi em 06/03/2012 - 18:45h

Amigos,


Localmente o Nagios está monitorando, só não estou conseguindo fazer ele enxergar minha rede windows, segue a configuração do NSC do meu NSClient



[modules]
;# NSCLIENT++ MODULES
;# A list with DLLs to load at startup.
; You will need to enable some of these for NSClient++ to work.
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
; * *
; * N O T I C E ! ! ! - Y O U H A V E T O E D I T T H I S *
; * *
; ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !
FileLogger.dll
CheckSystem.dll
CheckDisk.dll
NSClientListener.dll
NRPEListener.dll
SysTray.dll
CheckEventLog.dll
CheckHelpers.dll
;CheckWMI.dll
CheckNSCP.dll
;
; Script to check external scripts and/or internal aliases.
;CheckExternalScripts.dll
;
; NSCA Agent if you enable this NSClient++ will talk to NSCA hosts repeatedly (so dont enable unless you want to use NSCA)
;NSCAAgent.dll
;
; LUA script module used to write your own "check deamon".
;LUAScript.dll
;
; RemoteConfiguration IS AN EXTREM EARLY IDEA SO DONT USE FOR PRODUCTION ENVIROMNEMTS!
;RemoteConfiguration.dll
; Check other hosts through NRPE extreme beta and probably a bit dangerous! :)
;NRPEClient.dll
; Extreamly early beta of a task-schedule checker
;CheckTaskSched.dll

[crash]
; Archive crash dump files if a crash is detected
;archive=1

; Submit crash reports to a crash report server (this overrrides archive)
;submit=0

; Restart service if a crash is detected
;restart=1

[Settings]
;# OBFUSCATED PASSWORD
; This is the same as the password option but here you can store the password in an obfuscated manner.
; *NOTICE* obfuscation is *NOT* the same as encryption, someone with access to this file can still figure out the
; password. Its just a bit harder to do it at first glance.
;obfuscated_password=Jw0KAUUdXlAAUwASDAAB
;
;# PASSWORD
; This is the password (-s) that is required to access NSClient remotely. If you leave this blank everyone will be able to access the daemon remotly.
;password=secret-password
;
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to the all daemons.
; If leave this blank anyone can access the deamon remotly (NSClient still requires a valid password).
; The syntax is host or ip/mask so 192.168.0.0/24 will allow anyone on that subnet access
allowed_hosts=192.168.254.12/32
;
;# USE THIS FILE
; Use the INI file as opposed to the registry if this is 0 and the use_reg in the registry is set to 1
; the registry will be used instead.
use_file=1
;
; # USE SHARED MEMORY CHANNELS
; This is the "new" way for using the system tray based on an IPC framework on top shared memmory channels and events.
; It is brand new and (probably has bugs) so dont enable this unless for testing!
; If set to 1 shared channels will be created and system tray icons created and such and such...
;shared_session=0


[log]
;# LOG DEBUG
; Set to 1 if you want debug message printed in the log file (debug messages are always printed to stdout when run with -test)
;debug=1
;
;# LOG FILE
; The file to print log statements to
;file=nsclient.log
;
;# LOG DATE MASK
; The format to for the date/time part of the log entry written to file.
;date_mask=%Y-%m-%d %H:%M:%S
;
;# LOG ROOT FOLDER
; The root folder to use for logging.
; exe = the folder where the executable is located
; local-app-data = local application data (probably a better choice then the old default)
;root_folder=exe


[NSClient]
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to NSClient deamon.
; If you leave this blank the global version will be used instead.
allowed_hosts=192.168.254.12/32
;
;# NSCLIENT PORT NUMBER
; This is the port the NSClientListener.dll will listen to.
;port=12489
;
;# BIND TO ADDRESS
; Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
; Leaving this blank will bind to all avalible IP adresses.
;bind_to_address=
;
;# SOCKET TIMEOUT
; Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30

[NRPE]
;# NRPE PORT NUMBER
; This is the port the NRPEListener.dll will listen to.
;port=5666
;
;# COMMAND TIMEOUT
; This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
;allow_arguments=0
;
;# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0
;
;# USE SSL SOCKET
; This option controls if SSL should be used on the socket.
;use_ssl=1
;
;# BIND TO ADDRESS
; Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
; Leaving this blank will bind to all avalible IP adresses.
; bind_to_address=
;
;# ALLOWED HOST ADDRESSES
; This is a comma-delimited list of IP address of hosts that are allowed to talk to NRPE deamon.
; If you leave this blank the global version will be used instead.
;allowed_hosts=
;
;# SCRIPT DIRECTORY
; All files in this directory will become check commands.
; *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=scripts\
;
;# SOCKET TIMEOUT
; Timeout when reading packets on incoming sockets. If the data has not arrived withint this time we will bail out.
;socket_timeout=30

[Check System]
;# CPU BUFFER SIZE
; Can be anything ranging from 1s (for 1 second) to 10w for 10 weeks. Notice that a larger buffer will waste memory
; so don't use a larger buffer then you need (ie. the longest check you do +1).
;CPUBufferSize=1h
;
;# CHECK RESOLUTION
; The resolution to check values (currently only CPU).
; The value is entered in 1/10:th of a second and the default is 10 (which means ones every second)
;CheckResolution=10
;
;# CHECK ALL SERVICES
; Configure how to check services when a CheckAll is performed.
; ...=started means services in that class *has* to be running.
; ...=stopped means services in that class has to be stopped.
; ...=ignored means services in this class will be ignored.
;check_all_services[SERVICE_BOOT_START]=ignored
;check_all_services[SERVICE_SYSTEM_START]=ignored
;check_all_services[SERVICE_AUTO_START]=started
;check_all_services[SERVICE_DEMAND_START]=ignored
;check_all_services[SERVICE_DISABLED]=stopped

[External Script]
;# COMMAND TIMEOUT
; This specifies the maximum number of seconds that the NRPE daemon will allow plug-ins to finish executing before killing them off.
;command_timeout=60
;
;# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
;allow_arguments=0
;
;# COMMAND ALLOW NASTY META CHARS
; This option determines whether or not the NRPE daemon will allow clients to specify nasty (as in |`&><'"\[]{}) characters in arguments.
;allow_nasty_meta_chars=0
;
;# SCRIPT DIRECTORY
; All files in this directory will become check commands.
; *WARNING* This is undoubtedly dangerous so use with care!
;script_dir=c:\my\script\dir

[Script Wrappings]
vbs=cscript.exe //T:30 //NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%
ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -
bat=scripts\%SCRIPT% %ARGS%

[External Scripts]
;check_es_long=scripts\long.bat
;check_es_ok=scripts\ok.bat
;check_es_nok=scripts\nok.bat
;check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs
;check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -

[External Alias]
alias_cpu=checkCPU warn=80 crit=90 time=5m time=1m time=30s
alias_cpu_ex=checkCPU warn=$ARG1$ crit=$ARG2$ time=5m time=1m time=30s
alias_mem=checkMem MaxWarn=80% MaxCrit=90% ShowAll=long type=physical type=virtual type=paged type=page
alias_up=checkUpTime MinWarn=1d MinWarn=1h

alias_disk=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED
alias_disk_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll FilterType=FIXED ignore-unreadable
alias_volumes=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED
alias_volumes_loose=CheckDriveSize MinWarn=10% MinCrit=5% CheckAll=volumes FilterType=FIXED ignore-unreadable

alias_service=checkServiceState CheckAll
alias_service_ex=checkServiceState CheckAll "exclude=Net Driver HPZ12" "exclude=Pml Driver HPZ12" exclude=stisvc
alias_process=checkProcState "$ARG1$=started"
alias_process_stopped=checkProcState "$ARG1$=stopped"
alias_process_count=checkProcState MaxWarnCount=$ARG2$ MaxCritCount=$ARG3$ "$ARG1$=started"
alias_process_hung=checkProcState MaxWarnCount=1 MaxCritCount=1 "$ARG1$=hung"

alias_event_log=CheckEventLog file=application file=system MaxWarn=1 MaxCrit=1 "filter=generated gt -2d AND severity NOT IN ('success', 'informational') AND source != 'SideBySide'" truncate=800 unique descriptions "syntax=%severity%: %source%: %message% (%count%)"

alias_file_size=CheckFiles "filter=size > $ARG2$" "path=$ARG1$" MaxWarn=1 MaxCrit=1 "syntax=%filename% %size%" max-dir-depth=10
alias_file_age=checkFile2 filter=out "file=$ARG1$" filter-written=>1d MaxWarn=1 MaxCrit=1 "syntax=%filename% %write%"

alias_sched_all=CheckTaskSched "filter=exit_code ne 0" "syntax=%title%: %exit_code%" warn=>0
alias_sched_long=CheckTaskSched "filter=status = 'running' AND most_recent_run_time < -$ARG1$" "syntax=%title% (%most_recent_run_time%)" warn=>0
alias_sched_task=CheckTaskSched "filter=title eq '$ARG1$' AND exit_code ne 0" "syntax=%title% (%most_recent_run_time%)" warn=>0

alias_updates=check_updates -warning 0 -critical 0

check_ok=CheckOK Everything is fine!

[Wrapped Scripts]
;check_test_vbs=check_test.vbs /arg1:1 /arg2:1 /variable:1
;check_test_ps1=check_test.ps1 arg1 arg2
;check_test_bat=check_test.bat arg1 arg2
;check_battery=check_battery.vbs
;check_printer=check_printer.vbs
;check_updates=check_updates.vbs


; [includes]
;# The order when used is "reversed" thus the last included file will be "first"
;# Included files can include other files (be carefull only do basic recursive checking)
;
; myotherfile.ini
; real.ini


[NSCA Agent]
;# CHECK INTERVALL (in seconds)
; How often we should run the checks and submit the results.
;interval=5
;
;# ENCRYPTION METHOD
; This option determines the method by which the send_nsca client will encrypt the packets it sends
; to the nsca daemon. The encryption method you choose will be a balance between security and
; performance, as strong encryption methods consume more processor resources.
; You should evaluate your security needs when choosing an encryption method.
;
; Note: The encryption method you specify here must match the decryption method the nsca daemon uses
; (as specified in the nsca.cfg file)!!
; Values:
; 0 = None (Do NOT use this option)
; 1 = Simple XOR (No security, just obfuscation, but very fast)
; 2 = DES
; 3 = 3DES (Triple DES)
; 4 = CAST-128
; 6 = xTEA
; 8 = BLOWFISH
; 9 = TWOFISH
; 11 = RC2
; 14 = RIJNDAEL-128 (AES)
; 20 = SERPENT
;encryption_method=14
;
;# ENCRYPTION PASSWORD
; This is the password/passphrase that should be used to encrypt the sent packets.
;password=
;
;# BIND TO ADDRESS
; Allows you to bind server to a specific local address. This has to be a dotted ip adress not a hostname.
; Leaving this blank will bind to "one" local interface.
; -- not supported as of now --
;bind_to_address=
;
;# LOCAL HOST NAME
; The name of this host (if empty "computername" will be used.
;hostname=
;
;# NAGIOS SERVER ADDRESS
; The address to the nagios server to submit results to.
nsca_host=192.168.254.12
;
;# NAGIOS SERVER PORT
; The port to the nagios server to submit results to.
;nsca_port=5667
;

;# CHECK COMMAND LIST
; The checks to run everytime we submit results back to nagios
; Any command(alias/key) starting with a host_ is sent as HOST_COMMAND others are sent as SERVICE_COMMANDS
; where the alias/key is used as service name.
;
[NSCA Commands]
;my_cpu_check=checkCPU warn=80 crit=90 time=20m time=10s time=4
;my_mem_check=checkMem MaxWarn=80% MaxCrit=90% ShowAll type=page
;my_svc_check=checkServiceState CheckAll exclude=wampmysqld exclude=MpfService
;host_check=check_ok

;# REMOTE NRPE PROXY COMMANDS
; A list of commands that check other hosts.
; Used by the NRPECLient module
;[NRPE Client Handlers]
;check_other=-H 192.168.0.1 -p 5666 -c remote_command -a arguments

;# LUA SCRIPT SECTION
; A list of all Lua scripts to load.
;[LUA Scripts]
;scripts\test.lua


ALGUEM PODE ME AJUDAR?

[42] Comentário enviado por vlx em 08/03/2012 - 13:09h

schiavopbi

É windows 2008?
Bom primeiramente descomente os modulos:

CheckExternalScripts.dll
NSCAAgent.dll
LUAScript.dll
NRPEClient.dll
CheckTaskSched.dll

E em NSClient a port=12489

Verifica se o serviço está permissão para interagir com a área de trabalho do servidor.
Reinicie o serviço.

Se continuar o problema, você vai ter que liberar em seu firewall a porta 12489 entrada e saída =)
Faça um teste desativando o seu firewall, mais eu não recomendo.

Abs e boa sorte!

[43] Comentário enviado por removido em 03/05/2012 - 16:39h

Autorização falhou.

O que pode ser feito?

[44] Comentário enviado por pauloholiveria em 17/08/2012 - 11:28h

Bom dia!

para acrescentar uma máquina com windows 2003: Estou acrescentando uma linha de comando no arquivo:

#nano /etc/nagios3/nagios.cfg

cfg_file=/etc/nagios3/objects/jupter.cfg


Em seguida criei o arquivo:

:/etc/nagios3/objects#nano jupter.cfg

Dentro do arquivo coloqueio o script e estou reiniciando o serviço da o seguinte erro:

Warning: Duplicate definition found for command 'check_nt_disk' (config file '/etc/nagios3/objects/jupter.cfg', starting on line 54)
Error: Could not add object property in file '/etc/nagios3/objects/jupter.cfg' on line 55.
Error processing object config files!


***> One or more problems was encountered while processing the config files...


Este é o meu script:

### ------------ Definições de Host ---------------------------------###

define host{
name TemplateHostJupter
alias TemplateHostJupter
check_command check-host-alive
max_check_attempts 3
check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
retain_status_information 1
#contact_groups Admin
notification_interval 0
notification_period 24x7
notification_options d,u,r
register 0
}

define host{
host_name Jupter
use TemplateHostJupter
alias Servidor Jupter Local
address 10.50.101.8
}

### ----------- Definições de Serviço -------------------- ####
define service{
name ICMP-Jupter
service_description ICMP-Jupter
is_volatile 0
check_command check_ping!300,20%!900,52%!
max_check_attempts 3
normal_check_interval 5
retry_check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
retain_status_information 1
notification_interval 0
notification_period 24x7
notification_options u,c,r
register 0
}

define service{
host_name Jupter
service_description ICMP-Jupter
use ICMP-Jupter
#contact_groups Admin
}

### ---------- Definições do Plugin ----------- #### ### (OBS: Tudo junto e misturado no mesmo arquivo) ##
define command{
command_name check_nt_disk
command_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 \
-v USEDDISKSPACE -l $ARG1$ -w 80 -c 90
}

## Criando o template de monitoração para partições do Windows

define service{
name Particao
service_description Particao
is_volatile 0
max_check_attempts 3
normal_check_interval 5
retry_check_interval 5
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_options u,c,r
register 0
}

define service{
host_name Jupter
service_description Particao
use Particao
check_command check_nt_disk!C
#contact_groups Admin
}

[45] Comentário enviado por Eudes87 em 07/10/2019 - 11:10h

O PHP também não seria um pré requisito?

Fonte: http://nagios-br.com/configurando-o-nagios-pela-primeira-vez-para-iniciantes


Contribuir com comentário




Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts