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

does anybody have an example script of monitoring APs registered to a Cisco wireless controller (440

Votes:

0

We are trying to monitor the amount of APs registered agains the controller at any given time. Unfortunatly the controller does not provide this as a value directlly via SNMP. Instead it seems like users with other graphing software have used perl scripts to poll the controller for the MAC of each registered AP and then counted the total number of MAC addresses listed (divided by two as each of the APs two radio interefaces respond seperatly). I am trying to use a VB script achive this, but to no avail. I am also hoping on using this feature both in PRTG7 as well as in IPCheck5 as we still use both applications.

Can anybody point me in the right direction for an example script on doing somthing like this or possibly have their own script they wouldn't mind sharing? Any help would be much appreciated.

Thank you in advance.

cisco controller script vb visual-basic wireless

Created on Jun 10, 2010 10:06:40 AM



1 Reply

Votes:

0

Here is my script, as I mentioned above every time I try to use it the program comes back saying "Script is empty".

Any ideas?

'Advanced SNMP Sample
'Calculate number of APs from available interfaces
'Cisco WLAN Controller Mibs
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.29.112.153.164.128
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.167.240
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.168.32
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.168.96
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.169.192
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.170.64
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.193.8.240
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.207.109.112
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.201.101.88.192
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.146.16
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.149.160
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.153.0
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.153.176
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.0
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.48
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.144
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.180.32
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.182.0
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.182.16
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.183.208
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.184.144
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.184.160
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.193.0
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.193.48
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.45.67.176
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.4.92.64.240
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.4.92.77.48
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.32.88.64
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.163.80.128
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.196.123.128
'Number of AP Interfaces	1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.94.30.29.16
'initialize result to error
sensor.result_value=0
sensor.status=srerror
sensor.errortype=etprotocol
'get the snmp values (as strings)
result1=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.29.112.153.164.128")
result2=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.167.240")
result3=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.168.32")
result4=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.168.96")
result5=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.169.192")
result6=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.192.170.64")
result7=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.193.8.240")
result8=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.158.207.109.112")
result9=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.201.101.88.192")
result10=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.146.16")
result11=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.149.160")
result12=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.153.0")
result13=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.153.176")
result14=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.0")
result15=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.48")
result16=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.158.144")
result17=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.180.32")
result18=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.182.0")
result19=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.182.16")
result20=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.183.208")
result21=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.184.144")
result22=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.184.160")
result23=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.193.0")
result24=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.44.193.48")
result25=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.31.202.45.67.176")
result26=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.4.92.64.240")
result27=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.4.92.77.48")
result28=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.32.88.64")
result29=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.163.80.128")
result30=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.51.196.123.128")
result31=snmpget("BKPublic030608",".1.3.6.1.4.1.9.9.513.1.1.1.1.3.0.35.94.30.29.16")
'check for errors (always begin with the word "ERROR")
if pos("ERROR",result1)=1 then
  sensor.errorstring=result1
else
  if pos("ERROR",result2)=1 then
    sensor.errorstring=result2
  else
    if pos("ERROR",result3)=1 then
      sensor.errorstring=result3
    else
      if pos("ERROR",result4)=1 then
        sensor.errorstring=result4
      else
        if pos("ERROR",result5)=1 then
          sensor.errorstring=result5
        else
          if pos("ERROR",result6)=1 then
            sensor.errorstring=result6
          else
            if pos("ERROR",result7)=1 then
              sensor.errorstring=result7
            else
              if pos("ERROR",result8)=1 then
                sensor.errorstring=result8
              else
                if pos("ERROR",result9)=1 then
                  sensor.errorstring=result9
                else
                  if pos("ERROR",result10)=1 then
                    sensor.errorstring=result10
                  else
                    if pos("ERROR",result11)=1 then
                      sensor.errorstring=result11
                    else
                      if pos("ERROR",result12)=1 then
                        sensor.errorstring=result12
                      else
                        if pos("ERROR",result13)=1 then
                          sensor.errorstring=result13
                        else
                          if pos("ERROR",result14)=1 then
                            sensor.errorstring=result14
                          else
                            if pos("ERROR",result15)=1 then
                              sensor.errorstring=result15
                            else
                              if pos("ERROR",result16)=1 then
                                sensor.errorstring=result16
                              else
                                if pos("ERROR",result17)=1 then
                                  sensor.errorstring=result17
                                else
                                  if pos("ERROR",result18)=1 then
                                    sensor.errorstring=result18
                                  else
                                    if pos("ERROR",result19)=1 then
                                      sensor.errorstring=result19
                                    else
                                      if pos("ERROR",result20)=1 then
                                        sensor.errorstring=result20
                                      else
                                        if pos("ERROR",result21)=1 then
                                          sensor.errorstring=result21
                                        else
                                          if pos("ERROR",result22)=1 then
                                            sensor.errorstring=result22
                                          else
                                            if pos("ERROR",result23)=1 then
                                              sensor.errorstring=result23
                                            else
                                              if pos("ERROR",result24)=1 then
                                                sensor.errorstring=result24
                                              else
                                                if pos("ERROR",result25)=1 then
                                                  sensor.errorstring=result25
                                                else
                                                  if pos("ERROR",result26)=1 then
                                                    sensor.errorstring=result26
                                                  else
                                                    if pos("ERROR",result27)=1 then
                                                      sensor.errorstring=result27
                                                    else
                                                      if pos("ERROR",result28)=1 then
                                                        sensor.errorstring=result28
                                                      else
                                                        if pos("ERROR",result29)=1 then
                                                          sensor.errorstring=result29
                                                        else
                                                          if pos("ERROR",result30)=1 then
                                                            sensor.errorstring=result30
                                                          else
                                                            if pos("ERROR",result31)=1 then
                                                              sensor.errorstring=result31
                                                            else
    										  'all values are ok
    										  'calculate the number of APs
    										  value1=strtoint(result1)
    										  value2=strtoint(result2)
    										  value3=strtoint(result3)
    										  value4=strtoint(result4)
    										  value5=strtoint(result5)
    										  value6=strtoint(result6)
    										  value7=strtoint(result7)
    										  value8=strtoint(result8)
    										  value9=strtoint(result9)
    										  value10=strtoint(result10)
    										  value11=strtoint(result11)
    										  value12=strtoint(result12)
    										  value13=strtoint(result13)
    										  value14=strtoint(result14)
    										  value15=strtoint(result15)
    										  value16=strtoint(result16)
    										  value17=strtoint(result17)
    										  value18=strtoint(result18)
   	 									  value19=strtoint(result19)
    										  value20=strtoint(result20)
    										  value21=strtoint(result21)
   										  value22=strtoint(result22)
    										  value23=strtoint(result23)
    										  value24=strtoint(result24)
    										  value25=strtoint(result25)
    										  value26=strtoint(result26)
    										  value27=strtoint(result27)
    										  value28=strtoint(result28)
    										  value29=strtoint(result29)
    										  value30=strtoint(result30)
    										  value31=strtoint(result31)
    										  percent=round((value1+value2+value3+value4+value5+value6+value7+value8+value9+value10+value11+value12+value13+value14+value15+value16+value17+value18+value19+value20+value21+value22+value23+value24+value25+value26+value27+value28+value29+value30+value31)/2)
    										  'set result and status
    										  sensor.result_value=percent
    										  sensor.status=srok
  										end if
									    end if

Created on Jun 16, 2010 1:05:27 PM

Last change on Jun 16, 2010 1:51:58 PM by  Daniel Zobel [Product Manager]




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.