define contact{
contact_name usuario2
use generic-contact
alias Nagios usuario2
email usuario2@email.com
service_notifications_enabled 1
host_notifications_enabled 1
service_notification_period 24×7
host_notification_period 24×7
service_notification_options c,w,r
host_notification_options d,u,r
}
define contactgroup{
contactgroup_name usuarios2Admins
alias Grupo usuarios 2
members usuario2
}
Ahora en los objetos que nos haga falta que puedan consultar….
define host {
use generic-router
host_name dispositivoX
alias dispositivoX
contact_groups usuarios2Admins
address ip.del.dispositivo.2
icon_image router.gif
statusmap_image router.gd2
hostgroups rLan
}
define service{
use generic-service
host_name dispositivoX
contact_groups nagiosadmin,usuarios2Admins
service_description PING
check_command check_ping!200.0,20%!600.0,60%
normal_check_interval 4
retry_check_interval 3
max_check_attempts 4
notification_interval 1
notifications_enabled 1
}
Y ahora, que sea sólo lectura ;-)
en el fichero cgi.cfg de nuestro nagios:
# READ-ONLY USERS
# A comma-delimited list of usernames that have read-only rights in
# the CGIs. This will block any service or host commands normally shown
# on the extinfo CGI pages. It will also block comments from being shown
# to read-only users.
authorized_for_read_only=usuario2
Y por último, añadimos el user para auth en el webinterface:
# htpasswd2 -c /usr/local/nagios/etc/htpasswd.users usuario2
Esto añade usuario2 y le ponemos el password.
Y con estos sencillos pasos, ya tenemos listo el nuevo user ;-)
]]>
Hi, thanks for sharing. I’m wondering if it’s OK to copy some of the text in my site?
Yes, any problem…. all is free