/usr/share/munin/plugins/
, pero realmente sólo se utilizan aquellos con un enlace simbólico en /etc/munin/plugins/
.
/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
directives in the /etc/munin/munin-node.conf
file. The default configuration is allow ^127\.0\.0\.1$
, and only allows access to the local host. An administrator will usually add a similar line containing the IP address of the grapher host, then restart the daemon with systemctl restart munin-node
.
munin-cron
(una vez cada 5 minutos), mediante el que obtiene datos de todos los equipos enumerados en /etc/munin/munin.conf
(de forma predeterminada sólo incluye al equipo local), guarda los datos históricos en archivos RRD (base de datos Round Robin: «Round Robin Database», un formato de archivo diseñado para almacenar datos que varían en el tiempo) almacenados en /var/lib/munin/
y genera una página HTML con los gráficos en /var/cache/munin/www/
.
/etc/munin/munin.conf
. Cada máquina es enumerada como una sección completa con el nombre que coincide con el equipo y al menos un elemento address
que provee la dirección IP correspondiente.
[ftp.falcot.com] address 192.168.0.12 use_node_name yes
/var/cache/munin/www/
esté disponible en un sitio web. Generalmente restringirá el acceso a este sitio web, ya sea con un mecanismo de autenticación o un control de acceso basado en IP. Revise la Sección 11.2, “Servidor web (HTTP)” para los detalles relevantes.
authz_groupfile
and auth_digest
Apache modules must be enabled, for that execute:
#
a2enmod authz_groupfile
Considering dependency authz_core for authz_groupfile: Module authz_core already enabled Enabling module authz_groupfile. To activate the new configuration, you need to run: systemctl restart apache2 #
a2enmod auth_digest Considering 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
file.
http://server/nagios4/
displays the web interface; in particular, note that Nagios already monitors some parameters of the machine where it runs. However, some interactive features such as adding comments to a host do not work. These features are disabled in the default configuration for Nagios, which is very restrictive for security reasons.
/etc/nagios4/nagios.cfg
. We also need to set up write permissions for the directory used by Nagios, with commands such as the following:
#
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/
are a good source of information on how they work.
Ejemplo 12.3. /etc/nagios4/conf.d/falcot.cfg
file
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 ; Sólo plantilla } 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 ; Nombre de la plantilla de host a utilizar 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 ; Nombre de la plantilla de host a utilizar host_name ftp-host alias ftp.falcot.com address 192.168.0.6 contact_groups falcot-admins hostgroups debian-servers,ssh-servers } # orden 'check_ftp' con parámetros personalizados define command{ command_name check_ftp2 command_line /usr/lib/nagios/plugins/check_ftp -H $HOSTADDRESS$ -w 20 -c 30 -t 35 } # Servicio genérico de Falcot define service{ name falcot-service use generic-service contact_groups falcot-admins register 0 } # Servicios a chequear en 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 } # Servicios a chequear en ftp-host define service{ use falcot-service host_name ftp-host service_description FTP check_command check_ftp2 }
ssh-servers
hostgroup. The matching standard service is defined in /etc/nagios4/conf.d/services_nagios2.cfg
.