DX Unified Infrastructure Management

  • 1.  Command Output Monitoring -Logmon

    Posted Mar 27, 2018 08:40 AM

    Hi All,

     

     Can some share the real time procedures or snaps to monitor the command output and send a alert using logmon probe.

    i:e : If we are executing a command in linux machine and we are getting a output with message as "Error "means i need a alert. I have gone through CA docs already but still confused



  • 2.  Re: Command Output Monitoring -Logmon

    Broadcom Employee
    Posted Mar 27, 2018 08:46 AM

    If you can post the output from your command we can help better.

    Think of the output form the command as  a simple short logfile.

    The watcher rule with check each line for the regex or simple match you provide.

    if it finds it, it will send and alarm.

    If you need details from the command output you can create a variable that can be used in the alarm message.

     

    Also with the example output provide what information you need in the alarm or what you would like the alarm to say and we can see how we can help.



  • 3.  Re: Command Output Monitoring -Logmon

    Posted Mar 27, 2018 09:21 AM

    Agreed - generally it's way simpler than it would initially appear. Do just think about it as if logmon runs your command and directs the output to a temp file. Then your watchers run on that whole temp file. Then everything is cleaned up and you await the start of the next cycle.

     

    Depending on the control you have over the script it can be trivial to set up: For instance, just have the script generate the outputs: CLEAR, RESULT1, RESULT2, etc then your watchers match on /CLEAR/, /RESULT1/, etc.

     

    Or have your script simply generate a result code (exit 0 or exit 1) and use the result code monitoring option instead of matching text.

     

    Do note that if you capture QoS using a variable (this is true for all logmon variables) the csid that is generated is a hash of the watcher name so if you want to capture the value and do something like clear < 20, warn < 50, and error < 100 then you need four watchers - one each for the alarm values where you don't QoS the variable, and a fourth that always matches to get the QoS value but has no alarm associated with it.

     

    -Garin



  • 4.  Re: Command Output Monitoring -Logmon

    Broadcom Employee
    Posted Apr 06, 2018 04:56 AM

    Issac08 Did Garin's and Gene's suggestions helped you? 



  • 5.  Re: Command Output Monitoring -Logmon

    Posted Apr 06, 2018 11:38 AM

    Still i didn't tried the suggestions will be posting the result soon ..Thanks Marco_Ippati for follow up!!