Forum Discussion

Jens_Deprez_133's avatar
Jens_Deprez_133
Icon for Nimbostratus rankNimbostratus
Jan 06, 2017

iControlREST: Node availability details

Hi,

 

Is it possible to check how long a node is in a forced Offline state? If I check a node in the GUI this is clearly visible.

 

 

However if I check the same node trough a REST-client, this information is not there:

 

 

I'd like to find a way to check this trough the RESTapi. This way it would be possible to send a report if a node is down for a certain amount of time.

 

Is there anyone who has an idea? Thanks in advance!

 

6 Replies

  • Kevin_K_51432's avatar
    Kevin_K_51432
    Historic F5 Account

    Good day, The pool member's Disabled status seems to be in the Rest output. I tried disabled, enabled with monitor good and monitor bad, here were the results:

    "session":"user-disabled"
    "session":"user-enabled"
    
    "state":"down"
    "state":"up"
    

    Those seem sufficient to determine status.

    Kevin

  • You can get some more information by accessing endpoint.

    There, you will find the following property for each node:

    status.statusReason: {
        description: "/Common/https_443: No successful responses received before deadline.  @2017/01/08 14:04:04. "
    },
    

    Unfortunately the information about date is missing in this property when the node is forced offline

    • Jens_Deprez's avatar
      Jens_Deprez
      Icon for Nimbostratus rankNimbostratus

      The /stats endpoint does give some more information. But as you said, it's quite unfortunate that the information is missing if the nodes are forced offline.

       

  • Usually, you can access information via iControl REST as long as the date is obtainable from

    tmsh
    . I cannot find a
    tmsh
    command that shows the date/time of a node being forced down, so I assume it is not doable via iControl REST... at least in a usual manner. You should open a case from F5 Support to request further investigation.

    A workaround I can think of is to get the info from /var/log/ltm.

    curl -sku admin:adminPass -X POST -H "Content-Type: application/json" \

    -d "{\"command\":\"run\", \"utilCmdArgs\":\"-c 'grep YOURNODE /var/log/ltm'\"}" \

    https://YOURHOST/mgmt/tm/util/bash

    It does work, but it isn't great. You need to parse the data further to get what you want. Obviously, it does not work after the log file is rotated.

    You can find the information on

    /mgmt/tm/util/bash
    in

  • The problem here is that you can't see how long the node is/has been offline. This is crucial information for a script that alerts when a node is down for a certain amount of time.

     

  • I am also looking for same kind of details ? is there any way to find out using bigsuds or using REST api calls ?