Forum Discussion

syncretism's avatar
syncretism
Icon for Nimbostratus rankNimbostratus
May 06, 2019

Understanding the Significance of Nested Stats (GTM)

(EDIT: I pasted some scrubbed output in a "comment" below. I hope it makes my question clearer)

We recently updated our GTM to version 12.1.4 and I'm seeing some unexpected results in iControl REST's output. If I query a particular pool member that I know has been disabled, I get two rounds of status.availbilityState, status.enabledState and status.statusReason back, and they don't match:

          "status.availabilityState": {
        "description": "available"
      },
      "status.enabledState": {
        "description": "enabled"
      },
      "status.statusReason": {
        "description": "Available"
      }
`


Then, further nested is another JSON response, and it's reporting accurate state:

`                      "status.availabilityState": {
                    "description": "available"
                  },
                  "status.enabledState": {
                    "description": "disabled"
                  },
                  "status.statusReason": {
                    "description": "Available: disabled directly"
                  }
`

What's the difference between these two, and why aren't they the same? Even something as simple as this cURL command returns the wrong value:

`[user@host ~]$ curl -k --user f5User:${RD_SECUREOPTION_F5_PASSWORD} -X GET -H "Accept: application/json" https://${RD_OPTION_GTM_SERVER}/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/stats?\$select=status.enabledState | jq '.'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   287  100   287    0     0   1131      0 --:--:-- --:--:-- --:--:--  1134
{
  "entries": {
    "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/~Common~Pool-myservice-sts.gslb-int.mydomain.com:A/stats": {
      "nestedStats": {
        "entries": {
          "status.enabledState": {
            "description": "enabled"
          }
        }
      }
    }
  }
}

Thanks!

  • Hello syncretism.

     

    It's slightly different

     

    • enabledState - User defined availability (Disable, Enable, ForceOffline)
    • statusReason - Environment availability (Green, Blue, Red, Yellow)

    KR, Dario.

     

  • [user@host ~]$ curl -k --user f5User:${RD_SECUREOPTION_F5_PASSWORD} -X GET -H "Accept: application/json" https://${RD_OPTION_GTM_SERVER}/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/stats | jq '.'
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100  2118  100  2118    0     0   9503      0 --:--:-- --:--:-- --:--:--  9540
    {
      "kind": "tm:gtm:pool:a:members:membersstats",
      "generation": 210,
      "selfLink": "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/stats?ver=12.1.4",
      "entries": {
        "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/~Common~Pool-myservice-sts.gslb-int.mydomain.com:A/stats": {
          "nestedStats": {
            "kind": "tm:gtm:pool:a:members:membersstats",
            "selfLink": "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/~Common~Pool-myservice-sts.gslb-int.mydomain.com:A/stats?ver=12.1.4",
            "entries": {
              "alternate": {
                "value": 413
              },
              "dropped": {
                "value": 0
              },
              "fallback": {
                "value": 0
              },
              "tmName": {
                "description": "/Common/Pool-myservice-sts.gslb-int.mydomain.com"
              },
              "poolType": {
                "description": "A"
              },
              "preferred": {
                "value": 3940
              },
              "returnFromDns": {
                "value": 0
              },
              "returnToDns": {
                "value": 0
              },
              "status.availabilityState": {
                "description": "available"
              },
              "status.enabledState": {
                "description": "enabled"
              },
              "status.statusReason": {
                "description": "Available"
              },
              "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/~Common~Pool-myservice-sts.gslb-int.mydomain.com:A/members/stats": {
                "nestedStats": {
                  "entries": {
                    "https://localhost/mgmt/tm/gtm/pool/a/Pool-myservice-sts.gslb-int.mydomain.com/members/~Common~f5-ALB-PAIR:IP_ADDR-443/~Common~Pool-myservice-sts.gslb-int.mydomain.com:A/members/IP_ADDR-443:~Common~f5-ALB-PAIR/stats": {
                      "nestedStats": {
                        "entries": {
                          "alternate": {
                            "value": 18
                          },
                          "fallback": {
                            "value": 0
                          },
                          "poolName": {
                            "description": "/Common/Pool-myservice-sts.gslb-int.mydomain.com"
                          },
                          "poolType": {
                            "description": "A"
                          },
                          "preferred": {
                            "value": 33
                          },
                          "serverName": {
                            "description": "/Common/f5-ALB-PAIR"
                          },
                          "status.availabilityState": {
                            "description": "available"
                          },
                          "status.enabledState": {
                            "description": "disabled"
                          },
                          "status.statusReason": {
                            "description": "Available: disabled directly"
                          },
                          "vsName": {
                            "description": "IP_ADDR-443"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }