locked
Is it possible to have a man pack invoke a method of a custom cim provider during discovery? RRS feed

  • Question

  • I already have a working man pack that discovers custom cim providers.  I assume the man pack or SCOM is calling enumInstances or enumerate to get all the instances of a certain cim class.  However, I now have a cim provider that has a custom method I need to call to enumerate any instances of the cim class.  Can I do this?  Would I have to modify the TimedEnumerator DataSource?  Is there another TimedX DataSource that I can use to invoke another method?
    Friday, July 29, 2011 4:42 AM

Answers

  • Here's a blog posting about using a shell script on UNIX/Linux as the basis for an OpsMgr monitor:  http://blogs.msdn.com/b/scxplat/archive/2010/04/02/a-simple-3-value-opsmgr-script-monitor-for-unix-and-linux.aspx.   This blog has other entries that you might find useful as well.

    Also, you might look at http://www.operatingquadrant.com.   This blog has entries with more advanced techniques and examples.

    To answer a couple of your specific questions, yes, all communication with the OpsMgr agent on UNIX/Linux is via WS-Man.   'ssh' is also used, but only for agent maintenance functions such as installing the agent, upgrading the agent, stopping/restarting the agent.  In other words, the operations that are "performed on" the agent are done via ssh.  The operations that are "performed by" the agent are done via WS-Man.


    Michael Kelley, Lead Program Manager, System Center Cross Platform
    • Marked as answer by Yog Li Friday, August 5, 2011 8:48 AM
    Wednesday, August 3, 2011 7:16 PM

All replies

  • Script, son, script :)
    Microsoft Corporation
    Monday, August 1, 2011 3:15 PM
  • Is there a resource (book or website) you can point me to to learn scripting for these Man Packs?  If you are referring to scripting that I would invoke via a local command on the monitored client, I am unable to do this.  The platforms being monitored have very restrictive SELinux policy.  I had to jump through alot of hoops to just discover and monitor the platform without root access, ssh access, or any manual process for signing scx certificates. 

    I did find a TimedGetter method in the WSManagement.Library.  I think I might be able to use this like a getInstance method call.  Is all communication from the man pack to the linux client going through winrm?  If so, am I limited to what I can do via the command prompt? (get, set, create, delete, enumerate, invoke, etc)

     

    Either way, I would like to learn how to do scripting within a Man Pack.  I would like to learn to enumerate a CIM class, parse the data that comes back, and then issue other enumerate or get commands based on the data that got parsed.

    Wednesday, August 3, 2011 3:07 PM
  • Here's a blog posting about using a shell script on UNIX/Linux as the basis for an OpsMgr monitor:  http://blogs.msdn.com/b/scxplat/archive/2010/04/02/a-simple-3-value-opsmgr-script-monitor-for-unix-and-linux.aspx.   This blog has other entries that you might find useful as well.

    Also, you might look at http://www.operatingquadrant.com.   This blog has entries with more advanced techniques and examples.

    To answer a couple of your specific questions, yes, all communication with the OpsMgr agent on UNIX/Linux is via WS-Man.   'ssh' is also used, but only for agent maintenance functions such as installing the agent, upgrading the agent, stopping/restarting the agent.  In other words, the operations that are "performed on" the agent are done via ssh.  The operations that are "performed by" the agent are done via WS-Man.


    Michael Kelley, Lead Program Manager, System Center Cross Platform
    • Marked as answer by Yog Li Friday, August 5, 2011 8:48 AM
    Wednesday, August 3, 2011 7:16 PM