Alert
Posted: Wed Sep 14, 2016 10:02 am
I need to setup custom alert for CPU and Memory usage for a server.
when at 50% - Email specific set of people.
when at 60% - email everyone on the team
when at 70% - email every and SMS on call staff.
Below is my setup, but I think i made it complicated.
$ cat _WindowsAppProxy.cfg
#######################################################################
#AppProxy Special Notification Services
######################################################################
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 50percent
check_command check_nt!CPULOAD!-l 5,50,50
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups AppProxyContacts
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 60percent
check_command check_nt!CPULOAD!-l 5,60,60
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOEscalation
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 70percent
check_command check_nt!CPULOAD!-l 5,70,70
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOsms
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 50percent
check_command check_nt!MEMUSE!-w 50
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups AppProxyContacts
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 60percent
check_command check_nt!MEMUSE!-w 60
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOEscalation
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 70percent
check_command check_nt!MEMUSE!-c 70
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOsms
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
when at 50% - Email specific set of people.
when at 60% - email everyone on the team
when at 70% - email every and SMS on call staff.
Below is my setup, but I think i made it complicated.
$ cat _WindowsAppProxy.cfg
#######################################################################
#AppProxy Special Notification Services
######################################################################
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 50percent
check_command check_nt!CPULOAD!-l 5,50,50
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups AppProxyContacts
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 60percent
check_command check_nt!CPULOAD!-l 5,60,60
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOEscalation
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy CPU Usage 70percent
check_command check_nt!CPULOAD!-l 5,70,70
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOsms
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 50percent
check_command check_nt!MEMUSE!-w 50
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups AppProxyContacts
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 60percent
check_command check_nt!MEMUSE!-w 60
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOEscalation
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}
define service{
host_name !CWWAPP923, !TWWAPP630
hostgroup_name ds-webproxy-servers-prod
service_description Monitor App Proxy Memory Usage 70percent
check_command check_nt!MEMUSE!-c 70
active_checks_enabled 1
passive_checks_enabled 1
parallelize_check 1
obsess_over_service 1
check_freshness 0
notifications_enabled 1
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
is_volatile 0
check_period 24x7
max_check_attempts 7
normal_check_interval 5
retry_check_interval 1
contact_groups CSGDS, BOsms
notification_options w,u,c,r
notification_interval 15
notification_period 24x7
}