DX Unified Infrastructure Management

  • 1.  logmon: Execute command on Exit Code

    Posted Mar 22, 2017 09:19 AM

    Mode = Command

    Exit Code Monitoring box checked

     

    The command itself has no output--only an exit code.  On a certain exit code, the client wants to execute a separate command.  But I can't see a way to do that in IM or in the admin console.

     

    Is this possible, or do I need to find another way?  I could write a wrapper script, but I'd much rather not create new code.



  • 2.  Re: logmon: Execute command on Exit Code

    Broadcom Employee
    Posted Mar 22, 2017 10:44 AM

    Hi there,

     

    please have a look at this part of the documentation, I believe this should help here:

    logmon Advanced IM Configuration - CA Unified Infrastructure Management Probes - CA Technologies Documentation 

     

    This is the screen in Logmon this refers to (setting button becomes available after the checkbox is clicked) :

     

    Kind Regards,

    Martin Fink

    CA Tech Support



  • 3.  Re: logmon: Execute command on Exit Code

    Posted Mar 22, 2017 10:52 AM

    Hi Martin,


    Yes, I can set up the exit code and fire alarms based on them.  But notice there is no Command option among:

     

    Threshold Value
    Condition
    Severity
    ID

    Message

     

    How do I get it to execute a Command when it matches a certain exit code?



  • 4.  Re: logmon: Execute command on Exit Code
    Best Answer

    Broadcom Employee
    Posted Mar 22, 2017 11:10 AM

    Hi ,

     

    Unfortunately that is not possible at this moment as this would require a watcher rule, but that would require the command having an actual output and not just an exitcode that could be consumed.

     

    So, in essence you can create an alarm for a specific exit code but you cannot run a command based on that exit code.

     

     I would suggest you log an idea for this.

     

    Kind Regards,


    Martin Fink

    CA Tech Support



  • 5.  Re: logmon: Execute command on Exit Code

    Posted Mar 27, 2017 04:05 PM

    Thanks, Martin