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
Permissions to view services
Re: Permissions to view services
Code: Select all
define service{
use generic-service,srv-pnp
host_name equipo1
service_description Ping
check_command check_ping
}
https://assets.nagios.com/downloads/nag ... tions.html
Former Nagios Employee
Re: Permissions to view services
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
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!
}
Last edited by tmcdonald on Thu Apr 28, 2016 9:38 am, edited 1 time in total.
Reason: Please use [code][/code] tags around terminal output
Reason: Please use [code][/code] tags around terminal output
Re: Permissions to view services
Could you please rephrase what you're looking to accomplish? Not sure I'm understanding correctly.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! }
Former Nagios Employee
Re: Permissions to view services
You can try setting up service escalations for the services that only one of the contactgroups wants to receive notifications about. Example:
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
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,
}
To learn more about service escalations, please review our documentation here:
https://assets.nagios.com/downloads/nag ... tions.html
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Permissions to view services
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
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
lmiltchev thank you
I'll try what you tell me scaling services
I'll try what you tell me scaling services
Re: Permissions to view services
Sounds good, let us know how it turns out and if we can assist with anything.
Be sure to check out the Knowledgebase for helpful articles and solutions!