Page 1 of 1
Permissions to view services
Posted: Thu Apr 21, 2016 4:01 am
by nagiosjam
Hi. I have a group of users who want to see alerts for a host , but do not want to see all alerts . I just want to see some alerts .
define contactgroup{
contactgroup_name grupocontacto1
alias grupocontacto1
members usuario1
}
define host{
use linux-server
host_name equipo1
alias equipo1
check_command check-host-alive
check_interval 5
retry_interval 1
max_check_attempts 5
contact_groups grupo1
hostgroups LINUX1
notification_interval 1440
notification_period workhours
notification_options d,u,r
}
I want to see only this alert
define service{
use generic-service
host_name equipo1
service_description CPU
check_command check_ssh_cpu!10!5
contact_groups grupocontacto1
}
And this other service not want to see
define service{
use generic-service,srv-pnp
host_name equipo1
service_description Ping
check_command check_ping
}
But I see two alerts .. please help , I feel speak so little English
I hope they understand me
Thank you
Re: Permissions to view services
Posted: Thu Apr 21, 2016 1:10 pm
by rkennedy
Code: Select all
define service{
use generic-service,srv-pnp
host_name equipo1
service_description Ping
check_command check_ping
}
You should be able to add
notifications_enabled 0 to disable notifications here. My guess is that one of your templates has them enabled. See this page for more information, and the options you can include in your definitions -
https://assets.nagios.com/downloads/nag ... tions.html
Re: Permissions to view services
Posted: Thu Apr 28, 2016 12:48 am
by nagiosjam
Hello, thanks for the answer.
I have several contact groups and a contact group if you want to receive email notifications and have another contact group that does not receive all alerts .
For example group1 contact 10 alerts you want to receive mail services grupo2 contact host1 and only wants to receive 5 of these email alerts. Not if I explain well, my English is not very good . Thank you
Template generic-service
Code: Select all
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups group1,group2 ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 120 ; Re-notify about service problems every day (hour por defecto)
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
Re: Permissions to view services
Posted: Thu Apr 28, 2016 1:43 pm
by rkennedy
nagiosjam wrote:Hello, thanks for the answer.
I have several contact groups and a contact group if you want to receive email notifications and have another contact group that does not receive all alerts .
For example group1 contact 10 alerts you want to receive mail services grupo2 contact host1 and only wants to receive 5 of these email alerts. Not if I explain well, my English is not very good . Thank you
Template generic-service
Code: Select all
define service{
name generic-service ; The 'name' of this service template
active_checks_enabled 1 ; Active service checks are enabled
passive_checks_enabled 1 ; Passive service checks are enabled/accepted
parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems)
obsess_over_service 1 ; We should obsess over this service (if necessary)
check_freshness 0 ; Default is to NOT check service 'freshness'
notifications_enabled 1 ; Service notifications are enabled
event_handler_enabled 1 ; Service event handler is enabled
flap_detection_enabled 1 ; Flap detection is enabled
process_perf_data 1 ; Process performance data
retain_status_information 1 ; Retain status information across program restarts
retain_nonstatus_information 1 ; Retain non-status information across program restarts
is_volatile 0 ; The service is not volatile
check_period 24x7 ; The service can be checked at any time of the day
max_check_attempts 3 ; Re-check the service up to 3 times in order to determine its final (hard) state
normal_check_interval 10 ; Check the service every 10 minutes under normal conditions
retry_check_interval 2 ; Re-check the service every two minutes until a hard state can be determined
contact_groups group1,group2 ; Notifications get sent out to everyone in the 'admins' group
notification_options w,u,c,r ; Send notifications about warning, unknown, critical, and recovery events
notification_interval 120 ; Re-notify about service problems every day (hour por defecto)
notification_period 24x7 ; Notifications can be sent out at any time
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!
}
Could you please rephrase what you're looking to accomplish? Not sure I'm understanding correctly.
Re: Permissions to view services
Posted: Thu Apr 28, 2016 2:10 pm
by lmiltchev
You can try setting up service escalations for the services that only one of the contactgroups wants to receive notifications about. Example:
Code: Select all
define serviceescalation {
host_name equipo1
service_description Ping
contact_groups grupocontacto1
first_notification 0
last_notification 5
notification_interval 60
escalation_period 24x7
escalation_options w,u,c,
}
In this case, if the service "Ping" on host "equipo1" is in one of the following states (WARNING, UNKNOWN or CRITICAL), the notifications will be escalated to the "grupocontacto1" contactgroup. The other contactgroup ("grupocontacto2") shouldn't be receiving any notifications.
To learn more about service escalations, please review our documentation here:
https://assets.nagios.com/downloads/nag ... tions.html
Re: Permissions to view services
Posted: Fri Apr 29, 2016 1:38 am
by nagiosjam
rkennedy
I have a host and this host has 10 services. and I have a group of contacts you want to receive email notification alerts only 5 and not 10 .
and I have another group that if I want to receive the 10 services
Thank you
Re: Permissions to view services
Posted: Fri Apr 29, 2016 1:40 am
by nagiosjam
lmiltchev thank you
I'll try what you tell me scaling services
Re: Permissions to view services
Posted: Fri Apr 29, 2016 11:13 am
by bwallace
Sounds good, let us know how it turns out and if we can assist with anything.