Forum Discussion
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
- R_Marc
Nimbostratus
set choices "[iapp::get_items ltm monitor]"
- gogreen
Nimbostratus
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
Nimbostratus
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 }
- gogreen
Nimbostratus
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
Nimbostratus
Mine is part of a function, yours probably isn't. So you probably want this: choice monitor tcl {[iapp::get_items ltm monitor]}
- gogreen
Nimbostratus
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"
- gogreen
Nimbostratus
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]"}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com