assign define hosts to specific users
assign define hosts to specific users
i have 2 group in my organazaation ( server administration) and ( data base administration) now how can i assign some service and some hosts to these groups for example
i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
Best regards
i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
Best regards
Re: assign define hosts to specific users
Just assign the services to a host group rather then a host.i have 2 group in my organazaation ( server administration) and ( data base administration) now how can i assign some service and some hosts to these groups for example
If the user SS is a contact then yes.i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
I wrote a document up which helps explain the process for Nagios XI, but it has the text configurations through Core too. It might help explain it to you. (see attached)
- Attachments
-
- Nagios-Automating-with-Nagios-XI.zip
- (297.62 KiB) Downloaded 511 times
Former Nagios Employee
Re: assign define hosts to specific users
rkennedy wrote:Just assign the services to a host group rather then a host.i have 2 group in my organazaation ( server administration) and ( data base administration) now how can i assign some service and some hosts to these groups for example
If the user SS is a contact then yes.i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
I wrote a document up which helps explain the process for Nagios XI, but it has the text configurations through Core too. It might help explain it to you. (see attached)
thanks
but i will create a hostgroup and define services but i want when user TEST1 login to nagios web just see specific services or specific hosts in cgi.cfg file there is no authorized mehod for this user what do i have to do ?
BR
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: assign define hosts to specific users
If I understand you correctly, all the authentication information you need is at https://assets.nagios.com/downloads/nag ... iauth.html
If that does not help, could you explain what you are trying to do in more detail? Thanks!
If that does not help, could you explain what you are trying to do in more detail? Thanks!
Re: assign define hosts to specific users
i have create other user on nagios with name babak .dwhitfield wrote:If I understand you correctly, all the authentication information you need is at https://assets.nagios.com/downloads/nag ... iauth.html
If that does not help, could you explain what you are trying to do in more detail? Thanks!
now i want when babak login to nagios web interface just see one host with services that i asign to babak
i have added this to
hostgroup.cfg file
Code: Select all
define hostgroup{
hostgroup_name babak ; The name of the hostgroup
alias KB ; Long name of the group
}
define servicegroup {
servicegroup_name babak
alias babak Group
}
Code: Select all
define host{
use bab-test ; Inherit default values from a template
host_name DB-Asisstant ; The name we're giving to this host
alias server DB-Asisstant ; A longer name associated with the host
address 10.10.10.10 ; IP address of the host
}
define service{
use babak-service
host_name DB-Asisstant
service_description Memory Usage
check_command check_nt!MEMUSE!-w 90 -c 95
servicegroup_name babak
}
define service{
use babak-service
host_name DB-Asisstant
service_description SqlServer
check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER
}
define service{
use babak-service
host_name DB-Asisstant
service_description Cpu Usage
check_command check_nrpe!alias_cpu
}
define service{
use babak-service
host_name DB-Asisstant
service_description Disk Space
check_command check_nrpe!alias_volumes
}
define service{
use babak-service
host_name DB-Asisstant
service_description Time
check_command check_nrpe!check_windows_time
}
and add these permision to babak in cgi.cfg file
Code: Select all
Authorization to view service status information=babak
Authorization to view host status information=babak
but when login can not see any service or host
what is problem ?
Re: assign define hosts to specific users
Please see my original comment, you need to add SS as a contact, not just as a name, or wherever you choose.
rkennedy wrote:Just assign the services to a host group rather then a host.i have 2 group in my organazaation ( server administration) and ( data base administration) now how can i assign some service and some hosts to these groups for example
If the user SS is a contact then yes.i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
Former Nagios Employee
Re: assign define hosts to specific users
realy i am confused can you please say where and what do i have to add in which file and where ?rkennedy wrote:Please see my original comment, you need to add SS as a contact, not just as a name, or wherever you choose.
rkennedy wrote:Just assign the services to a host group rather then a host.i have 2 group in my organazaation ( server administration) and ( data base administration) now how can i assign some service and some hosts to these groups for example
If the user SS is a contact then yes.i have host1 and host2 each of them has 5 service can i say to nagios just user SS can see host1 and specific alarms and just user BB can see host2 with specific service?
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: assign define hosts to specific users
You need a contact definition: https://assets.nagios.com/downloads/nag ... ml#contact
Your contacts will go in your contacts.cfg. You can see the correct location for that file in your nagios.cfg. On the install I'm looking at right now, it's in /usr/local/nagios/etc/contacts.cfg. Wherever your other configs are, that's likely where contacts.cfg should go.
Please let us know if you have any additional questions.
Your contacts will go in your contacts.cfg. You can see the correct location for that file in your nagios.cfg. On the install I'm looking at right now, it's in /usr/local/nagios/etc/contacts.cfg. Wherever your other configs are, that's likely where contacts.cfg should go.
Please let us know if you have any additional questions.
Re: assign define hosts to specific users
dwhitfield wrote:You need a contact definition: https://assets.nagios.com/downloads/nag ... ml#contact
Your contacts will go in your contacts.cfg. You can see the correct location for that file in your nagios.cfg. On the install I'm looking at right now, it's in /usr/local/nagios/etc/contacts.cfg. Wherever your other configs are, that's likely where contacts.cfg should go.
Please let us know if you have any additional questions.
i am very confused read document but that is complex please write an example
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: assign define hosts to specific users
For clarity, the anchor tag should have taken you directly to the contact section of the document.
Here is a contact example:
Please let us know if you need additional examples.
Can you show the output of ls -la /usr/local/nagios/etc?
Also, can you post your nagios.cfg and contacts.cfg?
Here is a contact example:
Code: Select all
define contact{
contact_name contact_name
minimum_value 0
host_notifications_enabled [0/1]
service_notifications_enabled [0/1]
host_notification_period timeperiod_name
service_notification_period timeperiod_name
host_notification_options [d,u,r,f,s,n]
service_notification_options [w,u,c,r,f,s,n]
host_notification_commands command_name
service_notification_commands command_name
}
Can you show the output of ls -la /usr/local/nagios/etc?
Also, can you post your nagios.cfg and contacts.cfg?