I was wondering if there is a way to create metric alert for services on a windows host, so that when any service is in stopped state, we will get an alert.
We can check the status of services from OEM that are running in a windows server.
Host -> Monitoring -> All Metrics -> Services
I got below command from this forum that was posted a long time ago,
nmefwmi "wbem_wql=select name, pathname, processid, Started, startmode, state, status from win32_service" "wbem_wql_column_order=name, pathname, processid, Started, startmode, state, status" "wbem_namespace=root\cimv2"
However, I am not sure where to run this command. Basically we want to get an alert when a windows service stops.
Ensure you are logged in as sysman user or any other super Admin user
Go to Host -> Monitoring -> All Metrics -> Services >
Next to Collection Schedule there is a modify button > click on that
It will show a new page having following options
Data Collection Enabled Disabled (Select Enabled here)
Default is 15 min , if you want then you can change it accordingly