Forum Discussion
How to check active connections in icontrol ?
Hi, I need a help regarding F5 icontrol... When I disable a node using icontrol in powershell,it is disabled.I want to check the current connections on that node after disabling,I mean post disabling the node,for how much time it will have active connections ?I cannot find any predefined command in icontrol cmdlets for checking the active connections. Can anyone help ?
Please use iControl REST API with
like below with yourInvoke-RestMethod
,username
andpassword
.bigip
PS> $securePwd = ConvertTo-SecureString "password" -AsPlainText -Force PS> $credential = New-Object System.Management.Automation.PSCredential("username",$securePwd)
you can see nodename list
PS> Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/stats -Credential $credential | Format-List
And you can see the stats of specified node with
PS> Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/{target-nodename}/stats -Credential $credential | Format-List
- uchi_122495Cirrus
Try this and you can see nodename list
Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/stats -Credential $credential | Format-List
And you can see the stats of specified node with
Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/{target-nodename}/stats -Credential $credential | Format-List
- FTD_Routing_HydNimbostratus
Hi Uchi, It seems to be working :) Thanks a lot!!!
In the same way, can we check the virtual server and pool stats or are there any other commands or syntaxes ?
- uchi_122495Cirrus
That's good to hear. I think iControl REST API reference is helpful for you.
 
https://clouddocs.f5.com/api/icontrol-rest/APIRef_tm_ltm.html
 
- uchi_122495Cirrus
Please use iControl REST API with
like below with yourInvoke-RestMethod
,username
andpassword
.bigip
PS> $securePwd = ConvertTo-SecureString "password" -AsPlainText -Force PS> $credential = New-Object System.Management.Automation.PSCredential("username",$securePwd)
you can see nodename list
PS> Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/stats -Credential $credential | Format-List
And you can see the stats of specified node with
PS> Invoke-RestMethod -Uri https://bigip/mgmt/tm/ltm/node/{target-nodename}/stats -Credential $credential | Format-List
- FTD_Routing_HydNimbostratus
Thanks for the help Thanks a lot!!!
But I will surely trouble you,if I need more help ;)
Regards
- FTD_Routing_HydNimbostratus
Hi Uchi, I ran the following command to check the current connections on a active node .....where, I replaced bigip with bigip ip address and replaced target node with the node name
Invoke-RestMethod -Uri {target node}/stats -Credential $credential | Format-List
The following is the result the I am receiving post executing the above command..
kind : tm:ltm:node:nodestatsgeneration : 1selfLink : {target node}/stats?ver=11.6.1entries : @{addr=; curSessions=; monitorRule=; monitorStatus=; tmName=; serverside.bitsIn=; serverside.bitsOut=; serverside.curConns=; serverside.totConns=; sessionStatus=; status.availabilityState=; status.enabledState=; status.statusReason=; totRequests=}
So, do I need to add any of the above entries in the Invoke-Restmethod command or here itself should I see all the node stats.
Please bear with me,as I am new to API
Thanks
- uchi_122495Cirrus
You have already get all the node stats. Please change
toFormat-List
and then you can see all of data recursively.ConvertTo-Json -Depth 10
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com