Forum Discussion

gogreen's avatar
gogreen
Icon for Nimbostratus rankNimbostratus
Nov 02, 2014

List all Monitors in the LTM

What is the best way to list all monitors defined in the system as a choice ?

 

I tried the following and its only displaying the monitor's name starts with tcp ot http

 

choice monitor tcl {tmsh::run_proc f5.app_utils:get_ltm_monitors_filter tcp http}

 

unfortunately, I want to display all monitors defined in the system (LTM)

 

7 Replies

  • Sorry.. I am getting error,

     

    Do you want me to replace the line

     

    choice monitor tcl {tmsh::run_proc f5.app_utils:get_ltm_monitors_filter tcp http}

     

    with

     

    set choices "[iapp::get_items ltm monitor]"

     

    • R_Marc's avatar
      R_Marc
      Icon for Nimbostratus rankNimbostratus
      we are talking about an iApp, yes? If not some context would be handy. Here is the code in context: choice monitor_choice_tcp default "tcp" display "xxlarge" tcl { package require iapp 1.0.0 set choices "[iapp::get_items ltm monitor]" return $choices }
  • Yes we are talking about iapp, I tested with new code

     

    No Error now. But no vlaue is getting populated in the choice (combo box)

     

    • R_Marc's avatar
      R_Marc
      Icon for Nimbostratus rankNimbostratus
      Mine is part of a function, yours probably isn't. So you probably want this: choice monitor tcl {[iapp::get_items ltm monitor]}
  • No Luck, Error while creating applications services "Error parsing template:can't eval proc: "script::run" invalid command name "iapp::get_items" while executing "iapp::get_items ltm monitor" (procedure "script::run" line 1) invoked from within "script::run" line:1"

     

  • Finally this worked, but we are back to square one (it returns only tcp and http monitors)

     

    choice monitor display "xxlarge" tcl { package require iapp 1.0.0 return "[iapp::get_items ltm monitor http]\n[iapp::get_items ltm monitor tcp]"} }

     

    Also the following returns no value to the choice, it is empty

     

    choice monitor display "xxlarge" tcl { package require iapp 1.0.0 return "[iapp::get_items ltm monitor]"}