Over a series of future posts, I intend to describe my efforts to build an OpsMgr SCX Management Pack for monitoring of Oracle running on UNIX/Linux platforms. In this initial post, I will describe the first step in building this MP: creating a custom shell command invoker probe action. As I had described in this previous post, the Microsoft.Unix.WSMan.Invoke.Probe in the Microsoft Unix Library MP provides a wrapped version of the Microsoft.SystemCenter.WSManagement.Invoker. However, I wanted a bit more granular control of the invoke action (e.g. modifying the command timeout) and felt it appropriate to create a custom Probe Action to wrap the Microsoft.SystemCenter.WSManagement.Invoker module and decided to create a similar, but custom probe action.
The creation of such a Probe Action is fairly straight-foward:
The configuration parameters are defined as follows:
The Probe Action consists only of a single Member Module: Microsoft.SystemCenter.WSManagement.Invoker. The configuration for this module is:
And lastly, the data type configuration for the Probe Action:
The next Probe Action module that I created in this management pack was one for easily invoking Shell commands. I knew that I would be using the ExecuteShellCommand action of the Invoker quite a bit, so I wanted to wrap that in a Probe Action that accepted just a target system, timeout, and shell command string as input.
Defining Configuration parameters:
This Probe Action has only one Member Module, the custom invoker probe action described above. The configuration of this module is thus:
In this case, the Uri is: http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx
The Input parameter wraps the ShellCommand parameter in the necessary XML block for the invoker probe action:
And the data type configuration for this Probe Action.
The obvious benefit of creating this Shell Command module as an independent Probe Action (instead of in a data source) is that the same module can then be used in both discovery and monitoring data sources, by simply pairing the Probe Action with a Scheduler or Discovery Scheduler data source module.
In the next post on this topic, I will describe the creation of a Probe Action for executing SQL queries with SQLPlus.