DX Unified Infrastructure Management

  • 1.  Run command on unreachable url

    Posted Feb 07, 2017 02:48 PM

    Hi.

    I have a process that from time to time stops working (but is still alive). The process is monitored, but as it doesn't die, no alarm is raised. The same process is generating a webpage if everything is working, so when the process stops working, the url stops responding. 

    What I want is to use logmon to monitor the url and run a command if the url is unreachable.

    I have set up a logmon profile with a watcher rule to run a command, but it seems that the rule never match as the url is unreachable (I have tried with a blank rule, and /^\s*$/ to get a blank response). I get an alarm from the logmon profile, as set up in the "General" tab..

     

    Does anyone know a way to run a command when an url is not responding?

    It doesn't need to be done with logmon, but I want to run a command (local file on the machine) and have QoS data to log how often this happens.



  • 2.  Re: Run command on unreachable url

    Broadcom Employee
    Posted Feb 08, 2017 09:31 AM

    Hi Mike,

     

    You may want to check out the url_response probe - RELEASE NOTES

    This probe can generate an alarm when the url is unreachable. You could then use an Auto Operator profile in the nas probe to pick up the alarm and respond with a command.

     

    Hope that helps!



  • 3.  Re: Run command on unreachable url

    Posted Feb 08, 2017 12:53 PM

    Hi Philip,

     

    Thank you for your answer.

    I have tried to use an Auto Operator to respond with a command, but I can’t get it to work.
    The Auto Operator is picking up the alarm and running the command, but I suspect the path entered in the “command string” field is supposed to be on the machine running the nas probe and not on the machine running the process I want to restart.

     

    Maybe my post was unclear, but what I am trying to do is to run a file (.exe, .cmd, .bat - to kill a process) on the machine that has the robot installed (not the machine running the nas probe).



  • 4.  Re: Run command on unreachable url
    Best Answer

    Broadcom Employee
    Posted Feb 08, 2017 05:03 PM

    Hey Mike,

     

    I would think that you could embed credentials from that target system into a LUA script, which nas could execute when the alarm from url_response comes in. HERE is some information on the nas extensions to LUA.

     

    Another option, would be to use that logmon probe again to monitor the url_response probe's log. I don't like using two probes when it's not needed, but this might be an easier way than trying to execute remote commands through the nas probe. You could point logmon at the url_response.log and monitor for your alarm to come through. Then, have logmon execute your command locally on that machine. If you set this up, I would advise dropping alarms/qos from url_response probe so that they don't add to your nas probe's processing requirements.

     

    Phil



  • 5.  Re: Run command on unreachable url

    Posted Feb 09, 2017 05:10 PM

    Hi Philip,

    I have set up url_response and use logmon to monitor the url_response logs. It might not be the smoothest way to solve this problem, but it works. So, thank you for this solution! I hope functionality will be added to solve cases like this in the future.

     

    Mike