DX Unified Infrastructure Management

 View Only
  • 1.  Need some guidance with Perl and UIM

    Posted May 02, 2019 05:23 AM

    Hi, I want to restart my cdm probe whenever there is change in one of my input files.
    The input file is simply setting up thresholds in cdm.

    Is there a particular callback that I could use to only restart my cdm whenever the input file changes.



  • 2.  Re: Need some guidance with Perl and UIM

    Broadcom Employee
    Posted May 02, 2019 07:44 AM

    hi,

    you should be able to use the Perl nimrequest to restart the cdm probe.

    https://docops.ca.com/ca-unified-infrastructure-management/8-5-1/en/files/373474819/434439320/2/1515433725745/PERL--Perl… 

     

    Also you could use a PU call back to the controller to restart the CDM probe:

    pu.exe -u <username> -p <password> /NMS/NMS-Server/NMS-Robot/cdm _restart

     

    Another possibility would be to use dirscan to monitor the file for changes then issue the PU command to restart the CDM probe.

     



  • 3.  Re: Need some guidance with Perl and UIM

    Posted May 02, 2019 10:57 AM

    I was thinking more on the lines of using pu callbacks 'probe_deactivate' and 'probe_activate'
    Then I encounter 2 more variables 'noforce' and 'waitforstop' with 'probe_deactivate'

    How would you suggest to incorporate those or even if it is possible.



  • 4.  Re: Need some guidance with Perl and UIM

    Posted May 02, 2019 01:37 PM

    probe_activate and deactivate are not intended for the purpose of restarting. They're intended for long term disabling and enabling.

     

    If you look at the pu help:

    Usage: \Program Files (x86)\Nimsoft\bin\pu.exe [options] <nim-address> [command] [data]
    -i interactive mode
    -u user user name
    -p password password to the NimBUS
    -t sec timeout in seconds
    -H host use probe host
    -P port use probe port
    -d level set debug level
    -L list commands on probe <default>
    -I show probe info
    -R restart probe
    -S stop probe

     

    You don't even need the _restart callback

     

    pu.exe -u <username> -p <password> -R /NMS/NMS-Server/NMS-Robot/cdm

     

    will do it.

     

    Note that -R is a soft restart - it won't end the probe process, just request it to reread whatever configuration it supports updating on the fly.

     

    -S will stop the probe. It is then subject to the rules in the controller about when the probe is supposed to be running. Since the default for those rules is always, the controller will start the probe back up for you and it will then be a new process and read the new configuration in its entirety.

     

    With regards to how to handle the additional parameters, the nimbus request function takes as one of its arguments a PDS structure. You populate this PDS structure with the named arguments and values.