DX Unified Infrastructure Management

 View Only
  • 1.  command output monitoring

    Posted Nov 22, 2021 05:36 AM
    Hi all

    i am trying to monitor the output of the command ps -eaf |grep -i rv |wc -l which would be umber of instance of rv running on the server

    is there a way to get output in alarm in UIM i thought of logmon but am not able to succed

    Please help

    Regards
    nijin


  • 2.  RE: command output monitoring

    Broadcom Employee
    Posted Nov 22, 2021 06:12 AM
    Yes use logmon text block





  • 3.  RE: command output monitoring

    Broadcom Employee
    Posted Nov 22, 2021 06:27 AM
    --

    Steve Danseglio
    Technical Support Engineer 4 | Enterprise Software Division (ESD)

    UIM Certified Expert
    Broadcom Software

    100 Baylis Avenue, Suite 200

    Melville, NY 11747
    Office: 631.533.8334  | Mobile: 516.220.2646

    LinkedIn


    https://learn.broadcom.com/hubfs/Broadcom-Software-web-only-logo-128x30px.png


    Working with Broadcom Support for a Successful Product Upgrade


    This electronic communication and the information and any files transmitted with it, or attached to it, are confidential and are intended solely for the use of the individual or entity to whom it is addressed and may contain information that is confidential, legally privileged, protected by privacy laws, or otherwise restricted from disclosure to anyone else. If you are not the intended recipient or the person responsible for delivering the e-mail to the intended recipient, you are hereby notified that any use, copying, distributing, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited. If you received this e-mail in error, please return the e-mail to the sender, delete it from your computer, and destroy any printed copy of it.





  • 4.  RE: command output monitoring

    Posted Nov 22, 2021 08:29 AM
    steve

    i am trying to this method but alarm is coming 

    one-prod-admin01:Unresolved 'Match on every run' for logmon profile: 'rv instance/test'

    is there a specific way to write down command in this


  • 5.  RE: command output monitoring

    Posted Nov 22, 2021 04:27 PM
    Hello,

    Did you try with the probe processes?
    You "recognize" the processes by name or by command line then you configure the "expected instances"

    You can use regular expression to find the processes.

    Remember, the expected instances is what you "expect". If you configure "=3" if there's 2 or 4 processes running matching it will generates an alarm.
    If you select <= 3, having 2 processes running or 1 will not generates an alarm, only if there's 4 or more processes running.


  • 6.  RE: command output monitoring

    Posted Nov 24, 2021 06:46 AM
    hi 

    i tried with process probe but i cannot get the exact instance running since when i try to find with rv name it is not able to find all the instance and command line is different for few so this method is not working.
    i found this probe nexec but the output is 2 more than the original output like on server if i run the command i get 5 but on this probe output is coming 7 is there some configuration i am missing


  • 7.  RE: command output monitoring

    Posted Nov 24, 2021 10:22 AM
    Edited by Guillaume Briere Nov 24, 2021 10:23 AM

    Hello,

    But your grep command is very generic. If you try to do: ps -eaf |grep -i rv |wc -l
    That will be the same thing as this:

    Then you click on "test" and you will see everything that has been found who match the regex /rv/.

    When you use /<something>/ you now use regular expression to search for the process name. What I'm suggesting is to take an output of your grep command and work on a regex that will match every processes that you need. You can use regex101.com to test your regular expression.

    Thanks





  • 8.  RE: command output monitoring

    Posted Nov 24, 2021 12:45 PM
    Note that putting /rv/ in the name+command line will match everything with rv in the command line.

    One thing you can do is to make sure the regex isn't a match for the test - so use /[r][v]/ instead.

    Also, would suggest that you include the full path of the command so that someone running something innocuous like "vi rv.txt" doesn't also get detected.