Making sure a sevice isn't running


#1

I received a request the other day. I need to make a service doesn’t start and to issue an alert when it does.

I’ve tried just monitoring for the the recovery of the service, but that doesn’t seem to generate an alert. this is what I used:

define service {
use generic-service ; Name of service template to use
host_name server name
service_description vmware_Virtual_Center_services
servicegroups Vmware
is_volatile 0
check_period 24x7
max_check_attempts 4
normal_check_interval 7
retry_check_interval 1
contact_groups nt-admins
notification_interval 120
notification_period 24x7
notification_options r
check_command check_nt_services!“vSphere Web Client”
}