DX Unified Infrastructure Management

 View Only
  • 1.  Use logmon probe to execute linux script

    Posted Mar 30, 2020 10:59 AM
    Hello,

    I´m trying to execute a script using the logmon probe. The script return a value(integer) that i want evaluate it. 
     

    /home/nimbus/scripts/PRUEBAS/OSWALDO/qos_service_finder.sh This script works fine.

    Then, i have modified the script to recieve it two parameters like this:

    /home/nimbus/scripts/PRUEBAS/OSWALDO/qos_service_finder.sh PARM1 PARM2

    The script works fine on a linux console, but in the logmon probe don´t work. Is possible to pass it parameters in command mode?

    Thanks for your help.


  • 2.  RE: Use logmon probe to execute linux script

    Broadcom Employee
    Posted Mar 30, 2020 11:11 AM
    You may find this info helpful.

    https://community.broadcom.com/communities/community-home/digestviewer/viewthread?MID=763888

    https://knowledge.broadcom.com/external/article?articleId=10691

    Steve

    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------



  • 3.  RE: Use logmon probe to execute linux script

    Posted Mar 30, 2020 11:32 AM
    Thanks for your help!!!

    But that i want to do is as follow:


    is this works??
    I have two scripts, one without parameters and other with parameters.
    The scripts without parameters works fine in a linux console and logmon probe.
    The script with parameters works fine in a linux console but don´t work in a logmon probe. I possible use parameters ins the Command text box?

    Thanks for your help.



  • 4.  RE: Use logmon probe to execute linux script

    Posted Mar 30, 2020 11:42 AM
    Yes, that's possible.

    I'd suggest butting the whole command in parentheses like:

    (/source/my_command.sh parm1 parm2)



  • 5.  RE: Use logmon probe to execute linux script

    Posted Mar 30, 2020 12:02 PM
    Hello,

    I have put the script between the parentheses but it doesn´t work yet.
    Any more suggestion.

    Thanks a lot.


  • 6.  RE: Use logmon probe to execute linux script
    Best Answer

    Posted Mar 30, 2020 12:16 PM
    set the log level to 5 for logmon and try it again. You should get the output in the logmon log file along with error codes.

    A description of what "doesn't work" actually means would also be helpful.


  • 7.  RE: Use logmon probe to execute linux script

    Broadcom Employee
    Posted Mar 30, 2020 12:16 PM
    Try it between ticks/single quotes.

    Steve

    ------------------------------
    Support Engineer
    Broadcom
    US
    ------------------------------



  • 8.  RE: Use logmon probe to execute linux script

    Posted Mar 31, 2020 04:45 AM
    Hello,

    I have modified the script to use only one parameter and works. Are there a limitation with the number of characters in the command text box? The parameter that i have changed is an URL and is very long. I suppose that this is the problem because i have other commands with paramaeters and works.

    Thanks for your time!!!


  • 9.  RE: Use logmon probe to execute linux script

    Posted Mar 31, 2020 09:59 AM
    I believe that the limit is 512 characters (or maybe 1024) - it's a limitation of the cfg file format.

    Similar issues will be experienced with things like the sql_response probe where you might have a long SQL query to specify.