This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

Windows Services Monitoring

Hi All,

Not sure if anyone of you has encountered such a request before.

Basically, i got a bunch of workstations that needs to have a particular service but the issue is that the service name is not uniform.

What I mean by not uniform is that the same name would have the machine name behind.

E.g - abc-agent-computer01 , abc-agent-computer99

Is there anyway that we can use a powershell script to monitor all the servers using just the first few words. In this case, it's abc-agent*

Appreciate all the help.

regards,
Alex

  • alex81  wrote:

    Hi All,

    Not sure if anyone of you has encountered such a request before.

    Basically, i got a bunch of workstations that needs to have a particular service but the issue is that the service name is not uniform.

    What I mean by not uniform is that the same name would have the machine name behind.

    E.g - abc-agent-computer01 , abc-agent-computer99

    Is there anyway that we can use a powershell script to monitor all the servers using just the first few words. In this case, it's abc-agent*

    Appreciate all the help.

    regards,
    Alex

    Certainly! SAM provides the ability for you to use the powershell script monitor for monitoring, and by using the Get-Service command you can quickly grab the status of the windows servers. Get-Service  You could apply the application monitor across servers, by using a dynamic group and that would allow you to apply this across multiple non uniform monitored servers.

  • Hi Serena,

    Could you please share the script?

    I believe using get-service servicename would work on local machine but not via powershell.

    My understanding is that solarwinds require a error code / Exit Code for this.

    Do correct me if I am wrong on this aspect.

    regards,

    Alex

  • alex81  wrote:

    Hi Serena,

    Could you please share the script?

    I believe using get-service servicename would work on local machine but not via powershell.

    My understanding is that solarwinds require a error code / Exit Code for this.

    Do correct me if I am wrong on this aspect.

    regards,

    Alex

    Hi Alex,

    I don't have a script handy, but there are example powershell scripts that are available on your orion installation. If you navigate to: C:\Program Files (x86)\SolarWinds\Orion\APM\SampleScriptMonitors\PowerShellScripts, you'll see 2 examples that you can modify for your own use.

    pastedImage_2.png