Forum Discussion

rkazala_77721's avatar
rkazala_77721
Icon for Nimbostratus rankNimbostratus
Apr 17, 2013

ruby get pool member status confusion

I'm pretty new to ruby and I'm simply trying to get a specfic pool member status. Can someone provide some tips on how to get the below to work?

 

 

def usage

 

puts $0 + " "

 

exit

 

end

 

 

usage if $*.size < 3

 

 

bigip = F5::IControl.new($*[0], $*[1], $*[2], ["LocalLB.Pool"]).get_interfaces

 

 

puts bigip['LocalLB.Pool'].get_member_monitor_status [ /Common/est_pool ], [ 10.10.10.2] [ 80 ]

 

 

....

 

 

I believe the array structure is incorrect there and I'm not sure on the correct syntax. Thanks for any help on this!

 

1 Reply

  • See if this helps. I stumbled through trying to figure out the structure formats for icontrol in ruby.

     

     

    https://github.com/crosson/util_scripts/blob/master/Pool.rb

     

     

    Here is the original thread that helped me figure this out.

     

    https://devcentral.f5.com/internal-forums/aft/2165366