Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Rest to get Server health for given Virtual Server.

Is it possible to fetch server health like CPU % busy and Mem Used % for given Virtual Server name?

0
Rate this Question
Comments on this Question
Comment made 04-Feb-2018 by surgeon

tmsh show ltm virtual shows cpu usage for last 5 min

0
Comment made 05-Feb-2018 by Pranjal Kumar 55

Can you please share the possible REST API to fetch CPU usage.

0
Comment made 05-Feb-2018 by Emre Ovali 203

Here is the link

tmsh::show

0
Comment made 05-Feb-2018 by Pranjal Kumar 55

Hi Emre,

I was trying to use mgmt/tm/ltm/virtual/~Common~demo-ecom-vip/stats But dont see any CPU % in the result.

It shows: {"kind":"tm:ltm:virtual:virtualstats","generation":8121,"selfLink":"https://localhost/mgmt/tm/ltm/virtual/~Common~demo-ecom-vip/stats?ver=12.1.2","entries";:{"https://localhost/mgmt/tm/ltm/virtual/~Common~demo-ecom-vip/~Common~demo-ecom-vip/stats";:{"nestedStats":{"kind":"tm:ltm:virtual:virtualstats","selfLink":"https://localhost/mgmt/tm/ltm/virtual/~Common~demo-ecom-vip/~Common~demo-ecom-vip/stats?ver=12.1.2","entries";:{"clientside.bitsIn":{"value":111957077368},"clientside.bitsOut":{"value":743064938704},"clientside.curConns":{"value":1},"clientside.evictedConns":{"value":0},"clientside.maxConns":{"value":14},"clientside.pktsIn":{"value":80650451},"clientside.pktsOut":{"value":121310337},"clientside.slowKilled":{"value":0},"clientside.totConns":{"value":965617},"cmpEnableMode":{"description":"all-cpus"},"cmpEnabled":{"description":"enabled"},"csMaxConnDur":{"value":845034},"csMeanConnDur":{"value":42814},"csMinConnDur":{"value":2},"destination":{"description":"10.0.1.150:8080"},"ephemeral.bitsIn":{"value":0},"ephemeral.bitsOut":{"value":0},"ephemeral.curConns":{"value":0},"ephemeral.evictedConns":{"value":0},"ephemeral.maxConns":{"value":0},"ephemeral.pktsIn":{"value":0},"ephemeral.pktsOut":{"value":0},"ephemeral.slowKilled":{"value":0},"ephemeral.totConns":{"value":0},"fiveMinAvgUsageRatio":{"value":0},"fiveSecAvgUsageRatio":{"value":0},"tmName":{"description":"/Common/demo-ecom-vip"},"oneMinAvgUsageRatio":{"value":0},"status.availabilityState":{"description":"available"},"status.enabledState":{"description":"enabled"},"status.statusReason":{"description":"The virtual server is available"},"syncookieStatus":{"description":"not-activated"},"syncookie.accepts":{"value":0},"syncookie.hwAccepts":{"value":0},"syncookie.hwSyncookies":{"value":0},"syncookie.hwsyncookieInstance":{"value":0},"syncookie.rejects":{"value":0},"syncookie.swsyncookieInstance":{"value":0},"syncookie.syncacheCurr":{"value":0},"syncookie.syncacheOver":{"value":0},"syncookie.syncookies":{"value":0},"totRequests":{"value":50293582}}}}}}%

Am i using wrong api?

0

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Hi Pranjal,

Your request is totally correct and the reply already includes what you need :)

fiveMinAvgUsageRatio --> 5 minutes average CPU usage fiveSecAvgUsageRatio --> 5 seconds average CPU usage

            "fiveMinAvgUsageRatio": {
                "value": 0
            },
            "fiveSecAvgUsageRatio": {
                "value": 0
            },
1
Comments on this Answer
Comment made 05-Feb-2018 by Pranjal Kumar 55

Thanks alot Emre for clarifying this. Earlier I was not getting it by the term.

Does the result also has Memory usage? Unable to find corresponding term in response payload.

Thanks in Advance.

0