Nagios Multi-user Rights management---specific users to access specific hosts or services
1.nagios Installation
???????????? ------------
2. Add Users and Passwords
Htpasswd?/usr/local/nagios/etc/htpasswd.users?eddy
3. Modify the Configuration
Vim?/usr/local/nagios/etc/cgi.cfg
Use_authentication=1
Authorized_for_read_only=eddy
4. Add a Contact
Vi?/usr/local/nagios/etc/objects/contacts.cfg
efine?contact{
???????????????????? Contact_name?eddy
???????????????????? Use?generic-contact
???????????????????? Alias?eddy
????????????}
5. Add a Contact Group
define?contactgroup{
???????? Contactgroup_name??????? Eddy
???????? Alias??????????????????? Eddy
???????? Members????????????????? Eddy
}
6. Add a contact group for a host or service
Add eddy to the contacts that belong to the Eddy Host, service profile:
define?host{
???????? Use????????????????????? Linux-server
???????? HOST_NAME??????????????? Gfs5
???????? Alias??????????????????? Gfs5
???????? Address????????????????? 192.168.6.196
???????? Contact_groups?????????? Eddy
???????????}
Add this contact group to the host to view all services for this host
define?service{
???????? Use????????????????????????????? Local-service?????????;? Name?of?service?template?to?use
???????? HOST_NAME??????????????????????? Gfs5
???????? Service_description????????????? Ping
???????? Check_command??????????????????? check_ping!100.0,20%!500.0,60%
???????? Contact_groups?????????????????? Eddy
????????}
To add this contact group to the service, you can only view this server, and other services of this host cannot be viewed
Nagios Multi-user Rights management---specific users to access specific hosts or services