次の方法で共有


SCOM: Unix/Linux Shell Command Monitoring - Unique Requirement

When I was working with a customer recently, I came across an requirement, to execute a Shell Command and based on the results, the monitor state needs to be set for Target Server. One of the best example solution available in web is this.

THE PROBLEM:

But the uniqueness however  in this requirement is that the computer where the Shell Command needs to be executed and the Target Server are not the same.

5-14-2014 17-56-03

As Illustrated above, The monitor is targeted to a "Class A" which has several instances including "Server A". The Shell Command however needs to be executed on "Server B" and the results needs to be manipulated and the state of "Monitor A" needs to be set.

THE SOLUTION:

The "Microsoft.Unix.WSMan.Invoke.ProbeAction" probe based on which the Unix/Linux monitoring data sources are built in SCOM , has a parameter called "TargetSystem".

In normal scenarios, the value would always be "$Target/Property[Type="MicrosoftUnixLibrary!Microsoft.Unix.Computer"]/NetworkName$". Thus the Shell Command would be executed in "Server A" and the "Monitor A" would have a state based on results.

But the value of "TargetSystem" certainly need not to be Target Server' s name. This can be changed to any server which has a SCOM Unix Agent installed with valid certificate for authentication. Then the Shell Command will be executed in the "Server B" rather than in Target Server.

Additionally you can pass the Target Server' s name along with Shell Command as parameter if you have used the Promote Option for Shell Command

Find the XML code in PDF file here -- [View:~/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-34/1033.Example.Unix.ShellCommand.Monitoring.pdf:550:0]

Have great SCOMing!!!