DX Unified Infrastructure Management

  • 1.  Is there a way to programmatically activate a monitor ?

    Posted Sep 12, 2017 11:38 AM

    Hi,

     

      I have created a probe using the Java SDK 2.5.0. 

     

      In my scenario, a deployed probe should always have a default profile. To have the profile "auto-created", I edited the ".cfx" file in the probe´s maven project to declare it (under "resources"). It works.

      

      This default profile, by its turn, should have some elements. Which elements depend on the environment and are created by the probe itself (class ProbeMain, method "getUpdatedInventory(...)"). It also works just fine.

     

      However, I could not find a way for the probe to activate the monitors associated with each element. They must be enabled manually (through AC or IM, option "publish data") or using the "pu" utility. I would like to have the probe decide on its own whether or not a specific qos data should be published.

     

      Is it possible ?  If not, is it by desgn (as I suspect) ?

     

      I am new to UIM so any input would be welcomed.

     

      Regards,

      Sergio



  • 2.  Re: Is there a way to programmatically activate a monitor ?

    Broadcom Employee
    Posted Sep 12, 2017 01:12 PM

    Can you provide more details on how you want the probe to "decide" what to publish?

    your code can decide what QOS to publish .

    There is as a rule no samples or OOTB code to auto enable monitoring.



  • 3.  Re: Is there a way to programmatically activate a monitor ?

    Posted Sep 12, 2017 02:41 PM

    Hi Gene,

     

    Can you provide more details on how you want the probe to "decide" what to publish?

     

      An example to illustrate what I want: a probe to collect filesystem usage data (yes, I know about cdm, this is just a simple example).

     

      My goal is to make a probe that can completely self-configure after deployment.  

     

      To have a "profile" created automatically, I edit the ".cfx" file in the maven project. This way, the "getUpdatedInventory" method will be called and will proceed to enumerate the existing file systems, create a FileElement (or a subclass) object for each one, collect the usage data and return it all. 

     

      However, for the data to be actually published (sent to a hub), I need to perform an extra step. I can check the "publish data" checkbox on AC, for example. Or, to automate the task, I could call "pu" and add a "<monitor>" element to the config file and then restart the probe (tried that and it works, by the way).

      

      At this point I wondered if that last bit could be done by the probe itself, avoiding the need for manual intervention or running a script. However, as you said, I found nothing in the sample code. Browsing the api javadocs, there is no obvious way to set a MonitorDef active.

        

      Maybe I am just not thinking the way uim wants me to ...

     

      Thank you for the prompt response and best regards !

     

      Sergio



  • 4.  Re: Is there a way to programmatically activate a monitor ?
    Best Answer

    Broadcom Employee
    Posted Sep 12, 2017 02:49 PM

    Sorry, I think you are correct.

    there is nothing that is going to OOTB let you configure the probe after deployment

    I supposed you could code the probe main section to on the initial load scan the system for the information you want

    make calls to the controller to add sections into the .cfg file

    and make calls to restart the probe and then continue on.

     

    This seems lot a lot of work for the probe to do.

    Usually clients look to create a custom probe to do something specific UIM can not do.

    it sounds like you are trying to do something more generic possibly as a test that the product has really not been designed to accommodate.



  • 5.  Re: Is there a way to programmatically activate a monitor ?

    Posted Sep 12, 2017 04:27 PM

    Gene,

     

      I agree with you. That doesn´t seem to be the way to go.

     

      Anyway, the effort was valid to learn more about the product.

     

      Thank you very much!

      

      Regards,

      Sergio