/usr/share/munin/plugins/, mas apenas aquelas com uma ligação simbólica em /etc/munin/plugins/ são realmente usadas.
/etc/munin/plugins/ is therefore a good way of getting an idea of what each plugin is about and determining which should be removed. Similarly, enabling an interesting plugin found in /usr/share/munin/plugins/ is a simple matter of setting up a symbolic link with ln -sf /usr/share/munin/plugins/plugin /etc/munin/plugins/. Note that when a plugin name ends with an underscore “_”, the plugin requires a parameter. This parameter must be stored in the name of the symbolic link; for instance, the “if_” plugin must be enabled with a if_eth0 symbolic link, and it will monitor network traffic on the eth0 interface.
allow no arquivo /etc/munin/munin-node.conf. A configuração padão é allow ^127\.0\.0\.1$, e apenas permite acesso à máquina local. Um administrador geralmente irá adicionar uma linha similar contendo o endereço IP da máquina que gera o gráfico ("grapher host"), e então reiniciar o serviço com systemctl restart munin-node.
munin-cron (uma vez a cada 5 minutos), que reúne dados de todas as máquinas ("hosts") listados em /etc/munin/munin.conf (apenas a máquina ("host") local é listada por padrão), salva os dados históricos em arquivos RRD (Round Robin Database, um arquivo com formato desenvolvido par armazenar dados que variam com o tempo) armazenados em /var/lib/munin/ e gera uma página HTML com os gráficos em /var/cache/munin/www/.
/etc/munin/munin.conf. Cada máquina é listada como uma seção completa, com um nome correspondendo com a máquina e pelo menos uma entrada com endereço dando o endereço IP correspondente.
[ftp.falcot.com]
address 192.168.0.12
use_node_name yes/var/cache/munin/www/ seja disponibilizado em um site web. O acesso a esse site web geralmente será restrito, pelo uso de um mecanismo de autenticação ou controle de acesso baseado em IP. Veja Seção 11.2, “Servidor web (HTTP)” para os detalhes relevantes.
authz_groupfile e auth_digest devem estar habilitados Para isto execute:
#a2enmod authz_groupfileConsidering dependency authz_core for authz_groupfile: Module authz_core already enabled Module authz_core already enabled Enabling module authz_groupfile. To activate the new configuration, you need to run: systemctl restart apache2 #a2enmod auth_digestConsidering dependency authn_core for auth_digest: Module authn_core already enabled Enabling module auth_digest. To activate the new configuration, you need to run: systemctl restart apache2 #systemctl restart apache2
/etc/nagios4/hdigest.users.
http://servidor/nagios4/ exibe a interface web; em particular, note que o Nagios já monitora alguns parâmetros da máquina aonde ele roda. Contudo, algumas funcionalidades interativas, tais como adicionar comentários a uma máquina ("host") não funciona. Esses recursos estão desabilitados pela configuração padrão do Nagios, que é muito restritiva por razões de segurança.
/etc/nagios4/nagios.cfg. Nós também precisamos configurar permissões de escrita para o diretório usado pelo Nagios, através de comandos como os seguintes:
#systemctl stop nagios4#dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios4/rw#dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios4#systemctl start nagios4
/etc/nagios4/nagios.cfg.
/etc/nagios4/conf.d/ são uma boa fonte de informação sobre como eles funcionam.
Exemplo 12.5. Arquivo /etc/nagios4/conf.d/falcot.cfg
define contact{
name generic-contact
service_notification_period 24x7
host_notification_period 24x7
service_notification_options w,u,c,r
host_notification_options d,u,r
service_notification_commands notify-service-by-email
host_notification_commands notify-host-by-email
register 0 ; Template only
}
define contact{
use generic-contact
contact_name rhertzog
alias Raphael Hertzog
email hertzog@debian.org
}
define contact{
use generic-contact
contact_name rmas
alias Roland Mas
email lolando@debian.org
}
define contactgroup{
contactgroup_name falcot-admins
alias Falcot Administrators
members rhertzog,rmas
}
define host{
use generic-host ; Name of host template to use
host_name www-host
alias www.falcot.com
address 192.168.0.5
contact_groups falcot-admins
hostgroups debian-servers,ssh-servers
}
define host{
use generic-host ; Name of host template to use
host_name ftp-host
alias ftp.falcot.com
address 192.168.0.12
contact_groups falcot-admins
hostgroups debian-servers,ssh-servers
}
# 'check_ftp' command with custom parameters
define command{
command_name check_ftp2
command_line /usr/lib/nagios/plugins/check_ftp -H $HOSTADDRESS$ -w 20 -c 30 -t 35
}
# Generic Falcot service
define service{
name falcot-service
use generic-service
contact_groups falcot-admins
register 0
}
# Services to check on www-host
define service{
use falcot-service
host_name www-host
service_description HTTP
check_command check_http
}
define service{
use falcot-service
host_name www-host
service_description HTTPS
check_command check_https
}
define service{
use falcot-service
host_name www-host
service_description SMTP
check_command check_smtp
}
# Services to check on ftp-host
define service{
use falcot-service
host_name ftp-host
service_description FTP
check_command check_ftp2
}
ssh-servers. O serviço padrão correspondente é definido em /etc/nagios4/conf.d/services_nagios2.cfg.