cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 9

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

0 Kudos
3 Replies
Product Manager
Product Manager

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.

0 Kudos
Level 9

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

0 Kudos
Product Manager
Product Manager

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

0 Kudos