Forum Discussion

Tim_Walter_6225's avatar
Tim_Walter_6225
Icon for Nimbostratus rankNimbostratus
Mar 10, 2014

tmsh::get_field_value does not work

LTM VE 11.4.1 608.0

what is wrong?

create script watch_pool {
  proc script::run { } {
    set pool "p0106"

    set obj [tmsh::get_status /ltm pool $pool raw]
    puts $obj
    set bitin [tmsh::get_field_value $obj "serverside.bits-in" ]
  }

  proc script::init { } {
  }

  proc script::help { } {
  }

  proc script::tabc { } {
  }
}





 root@(vrootlb02)(cfg-sync Changes Pending)(Active)(/Common)(tmos) run cli script watch_pools
 {ltm pool p0106 {
     active-member-cnt 0
     connq-all.age-edm 0
     connq-all.age-ema 0
     connq-all.age-head 0
     connq-all.age-max 0
     connq-all.depth 0
     connq-all.serviced 0
     connq.age-edm 0
     connq.age-ema 0
     connq.age-head 0
     connq.age-max 0
     connq.depth 0
     connq.serviced 0
     cur-sessions 0
     min-active-members 0
     monitor-rule none
     name p0106
     serverside.bits-in 1670970736
     serverside.bits-out 3890998664
     serverside.cur-conns 0
     serverside.max-conns 10
     serverside.pkts-in 328368
     serverside.pkts-out 430197
     serverside.tot-conns 6005
     status.availability-state unknown
     status.enabled-state enabled
     status.status-reason The children pool member(s) either don't have service checking enabled, or service      check results are not available yet
     tot-requests 0
 }}
 watch_pools: script failed to complete:
 can't eval proc: "script::run"
 unexpected TCL object type
     while executing
 "tmsh::get_field_value $obj "serverside.bits-in" "
     (procedure "script::run" line 6)
     invoked from within
 "script::run" line:1
 script did not successfully complete, status:1

2 Replies

  • I'm not sure, but, try changing the name of variable "pool". This is a reserved word key.

     

    Sorry, my bad english!

     

  • Remco's avatar
    Remco
    Icon for Nimbostratus rankNimbostratus

    Hi,

     

    I have the same problem the I am testing a script and it does work in v10 but doesn't work anymore on v11.4

     

    Anybody knows how to fix this?