Easy way to monitor Services

Started by theyareseven, November 27, 2017, 10:21:45 AM

Previous topic - Next topic

theyareseven

Is there an easy way to setup discovery (like with HDD for free space ect) on a node so the system will auto scan / check services, in an ideal world I would like the system to scan for all automatic services and add them, then the standard alerts if not running ect

Thank you

Victor Kirhenshtein

Hi,

most likely instance discovery for DCI creation should help (maybe with script a s a source).

Best regards,
Victor

Tursiops

Hi,

Without providing a full guide (the Admin Guide, Wiki and Forum should be able to help with the details), you could use a PowerShell script to generate an ExternalList. Something like this:
$wmiServiceNames = (Get-WmiObject Win32_Service -Filter "StartMode='Auto'").Name
foreach ($wmiServiceName in $wmiServiceNames) {
    $serviceDisplayName = (Get-Service $wmiServiceName).DisplayName
    $wmiServiceName + "," + $serviceDisplayName
}

Note, the above will provide a list of Service Names and Service Display Names, separated by commas.
That way you can use instance discovery to split the two, then use DCI the parameter
System.ServiceState{instance}
while being able to use the more readable {instance-name} for the DCI description.

Going a step further, you can create an event, action and event processing rule to automatically attempt to restart a service should it not be running.

Cheers

dmna007

i'm trying to do the exact same thing to make the dci creation process for services marked as 'auto start up' a less manual undertaking.  did you get anywhere with this?  if so some screenshots would be lovely to make my life easier!  thanks