Forum Discussion

Sheela_Narayan_'s avatar
Sheela_Narayan_
Icon for Nimbostratus rankNimbostratus
Aug 30, 2013

TMSH Command to know the status of the nodes in the pool

Hi,

 

I am looking for tmsh command for knowing the status (online or offline) of the node/members in the pool level.

 

LTM version is 11.2.1.

 

please help.

 

Thanks & Regards, Sheela Narayan

 

12 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Two commands: "show /ltm node" this will detail all the nodes and their state. "list /ltm pool" this will detail all the pools and show the member state too. "list /ltm pool my_pool" this will be more specific to a pool e.g. my_pool in this case.

     

    Hope this helps, N

     

  • there is field-fmt option which may be easier to grep.

      field-fmt       Show statistics in field format for the specified items
    

    e.g.

    root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) show ltm pool all members field-fmt |grep "ltm\ pool\|active-member-cnt\|addr\|monitor-status"
    ltm pool foo {
        active-member-cnt 1
                addr 200.200.200.101
                monitor-status up
    ltm pool qux {
        active-member-cnt 0
                addr 200.200.200.111
                monitor-status unchecked
    
    • nathe's avatar
      nathe
      Icon for Cirrocumulus rankCirrocumulus
      Another excellent follow up Nitass!
    • Brent_Blood_768's avatar
      Brent_Blood_768
      Historic F5 Account
      The command that nitass recommends is correct for interactive use. For up/down status, it won't be useful, but be aware of the 'raw' option - this'll give you the actual value of counters rather than one rounded to the nearest kilo/mega/giga. For doing this same thing in a tmsh script, you'll need to modify it to use 'tmsh::get_status' rather than 'show', and then drop 'field-fmt' as it is silently specified automatically. 'raw' however is not so it might still come in handy when working with statistics rather than states.
    • Muthukannan_Pal's avatar
      Muthukannan_Pal
      Icon for Nimbostratus rankNimbostratus
      Hi mate, You can use list pool command to check pool and pool members. For your references I enhanced the output have a quick look. abcdfa@(esscdt1xwilb01b)(cfg-sync In Sync)(Active)(/Common)(tmos.ltm) list pool Display all 2269 items? (y/n) y ltm pool transportlayer-tss_s_2231{ members { 11.48.78.29:433 { address 11.48.78.29 session monitor-enabled state up } 11.48.78.30:433{ address 11.48.78.30 session monitor-enabled state up } 11.48.78.31:433 { address 11.48.78.31 session monitor-enabled state up } 11.48.78.32:433 { address 11.48.78.32 session monitor-enabled state up }
  • there is field-fmt option which may be easier to grep.

      field-fmt       Show statistics in field format for the specified items
    

    e.g.

    root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) show ltm pool all members field-fmt |grep "ltm\ pool\|active-member-cnt\|addr\|monitor-status"
    ltm pool foo {
        active-member-cnt 1
                addr 200.200.200.101
                monitor-status up
    ltm pool qux {
        active-member-cnt 0
                addr 200.200.200.111
                monitor-status unchecked
    
    • Brent_Blood_768's avatar
      Brent_Blood_768
      Historic F5 Account
      The command that nitass recommends is correct for interactive use. For up/down status, it won't be useful, but be aware of the 'raw' option - this'll give you the actual value of counters rather than one rounded to the nearest kilo/mega/giga. For doing this same thing in a tmsh script, you'll need to modify it to use 'tmsh::get_status' rather than 'show', and then drop 'field-fmt' as it is silently specified automatically. 'raw' however is not so it might still come in handy when working with statistics rather than states.
    • Muthukannan_Pal's avatar
      Muthukannan_Pal
      Icon for Nimbostratus rankNimbostratus
      Hi mate, You can use list pool command to check pool and pool members. For your references I enhanced the output have a quick look. abcdfa@(esscdt1xwilb01b)(cfg-sync In Sync)(Active)(/Common)(tmos.ltm) list pool Display all 2269 items? (y/n) y ltm pool transportlayer-tss_s_2231{ members { 11.48.78.29:433 { address 11.48.78.29 session monitor-enabled state up } 11.48.78.30:433{ address 11.48.78.30 session monitor-enabled state up } 11.48.78.31:433 { address 11.48.78.31 session monitor-enabled state up } 11.48.78.32:433 { address 11.48.78.32 session monitor-enabled state up }
  • Hi Nitass/Nathan,

     

    Thanks for your reply it worked.

     

    I have one more question here, is there any way I can configure and get autogenerated mail/alerts for every 2-3hrs once regarding the status of the nodes in the pool level via SCOM/microsoft orchestrator.

     

    Please let me know the script/command for the same.

     

    Thanks & REgards, Sheela Narayan

     

    • Brent_Blood_768's avatar
      Brent_Blood_768
      Historic F5 Account
      In the future when you're running v11.4, you should take a look at iCall, and in particular a periodic event handler set to run every 2-3 hours. It can fire off a tmsh script to audit the nodes and pools and is part of the config (as opposed to crontab). It doesn't have SCOM/MSorch integration, so you'd have to figure out a way to get the alerts there (I'm not familiar with either), but the BIG-IP eventing+scripting is a natural use for iCall. For now, a script run out of cron might be the best solution unless SCOM/etc has a way to poll BIG-IP.
  • is there any way I can configure and get autogenerated mail/alerts for every 2-3hrs once regarding the status of the nodes in the pool level via SCOM/microsoft orchestrator.

     

    i know nothing about scom/orchestrator. anyway, if you want bigip to send email notification when pool member is down, it can be done using /config/user_alert.conf. there are number of threads here about it.

     

    Custom SNMP Traps by Deb Allen

     

    https://devcentral.f5.com/articles/custom-snmp-traps

     

    sol3667: Configuring alerts to send email notifications

     

    http://support.f5.com/kb/en-us/solutions/public/3000/600/sol3667.html