Forum Discussion
Jeff_47746
Nimbostratus
Oct 08, 2008PowerShell NodeAddress.Get_Status
I am attempting to modify the PoolMemberControl script to run at the Node Level.
I have with the help of these forums and documentation figured out the Set_Session_Enabled_State and Set_Monitor_Status pieces.
However now I am attempting to use the Connection Bleed loop and I keep getting the following error. I know I am close... any help would be appreciated.
Unable to index into an object of type iControl.LocalLBNodeAddressNodeAddressStatistics.
At S:\Technology\Technical Services\Scripting Resources\iControl\Scripts\DisableNode.ps1:92 char:46
+ $MemberStatisticEntry = $MemberStatisticsA[0 <<<< ].statistics();
Here is my loop
$cur_connections = 1;
while ($cur_connections -gt 0)
{
$MemberStatisticsA =
(Get-F5.iControl).LocalLBNodeAddress.get_statistics($NodeAddresses);
$MemberStatisticEntry = $MemberStatisticsA[0].statistics();
$Statistics = $MemberStatisticEntry.statistics;
foreach ($Statistic in $Statistics)
{
$type = $Statistic.type;
$value = $Statistic.value;
if ($type -eq "STATISTIC_SERVER_SIDE_CURRENT_CONNECTIONS")
{
$cur_connections = $value.low;
Write-Host "Current Connections: $cur_connections"
}
}
Start-Sleep -s 1
}
- Jeff_47746
Nimbostratus
I Figured out the syntax for this command. Thanks again for the immense amount of information in these forums. - Glad to help! B-).
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects