What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general.

Learn more

PRTG Network Monitor

Intuitive to Use. Easy to manage.
More than 500,000 users rely on Paessler PRTG every day. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free Download

Top Tags


View all Tags

Aruba Instant AP counting associated clients

Votes:

0

Hello,

After hours of Googling and with the few examples provided I could not implement the sensor to successfully keep track of associated clients to each AP in our environment. After trial and error and some of the examples I was able to piece together the PowerShell script needed to get the data desired including from the AP that has the role of Virtual Controller. You will need to download SnmpWalk.exe and place in an accessible place for the script. This will be for the "Custom Sensor EXE/Script Advanced."

I use SNMPv3 and so not to store the password in plain text in the script I use the following PowerShell command to create a AES key with the password in a file type of your choosing. Mind you it's not fool proof but better then plain text regardless of which SNMP version you are using.

---------------------------------------------------------------------------

$File = "FILENAME"
[Byte[]] $key = (1..32) #Can use different AES bytes
$Password = "PASSWORD" | ConvertTo-SecureString -AsPlainText -Force
$Password | ConvertFrom-SecureString -key $key | Out-File $File

---------------------------------------------------------------------------

Use the following code on your AP with the Virtual Controller:

---------------------------------------------------------------------------

$File = "LOCATION OF PASSWORD FILE"
[Byte[]] $key = (1..32)
$SecurePassword = Get-Content $File | ConvertTo-SecureString -Key $key

$NEWsecurePassword = (New-Object PSCredential "user",$SecurePassword).GetNetworkCredential().Password

$snmpwalk = (c:\snmpwalk\SnmpWalk.exe -r:AP_IP -p:161 -v:3 -sn:USERNAME -ap:SHA -aw:$NEWsecurePassword -pp:AES128 -pw:$NEWsecurePassword -os:1.3.6.1.4.1.14823.2.3.3.1.2.5.1.4.0 -op:1.3.6.1.4.1.14823.2.3.3.1.2.5.1.5)

$totalAP = ($snmpwalk | Select-String -Pattern 'NAME OF AP WITH VIRTUAL CONTROLLER')

$numval = ($totalAP | Where-Object {"NAME OF AP WITH VIRTUAL CONTROLLER"} | Measure-Object | Select-Object -exp count)

write-host "<prtg>"

write-host "<result>"

write-host "<channel>Clients connected</channel>"

write-host "<value>"$numval"</value>"

write-host "</result>"

write-host "</prtg>"

---------------------------------------------------------------------------

Use the following code on each AP sensor:

---------------------------------------------------------------------------

$File = "LOCATION OF PASSWORD FILE"
[Byte[]] $key = (1..32)
$SecurePassword = Get-Content $File | ConvertTo-SecureString -Key $key

$NEWsecurePassword = (New-Object PSCredential "user",$SecurePassword).GetNetworkCredential().Password

$snmpwalk = (c:\snmpwalk\SnmpWalk.exe -r:AP_IP -p:161 -v:3 -sn:USERNAME -ap:SHA -aw:$NEWsecurePassword -pp:AES128 -pw:$NEWsecurePassword -os:1.3.6.1.4.1.14823.2.3.3.1.2.4.1.3 -op:1.3.6.1.4.1.14823.2.3.3.1.2.4.1.4)

$totalAP = ($snmpwalk | Select-String -Pattern 'Total')

$totalAP = $totalAP -replace 'Total:'

$numval = [int]::Parse($totalAP)

write-host "<prtg>"

write-host "<result>"

write-host "<channel>Clients connected</channel>"

write-host "<value>"$numval"</value>"

write-host "</result>"

write-host "</prtg>"

---------------------------------------------------------------------------

Hope this helps someone save time!

aruba iap snmp wifi

Created on Feb 4, 2020 11:36:19 PM

Last change on Feb 5, 2020 10:18:22 AM by  Moritz Heller [Paessler Support]



Replies

Nobody has replied yet


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.