Ad Widget

Collapse

discovery rule with conditional summation with snmp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nbhanji
    Junior Member
    • Jan 2013
    • 16

    #1

    discovery rule with conditional summation with snmp

    Hello,

    If this is already answered, please let me know where I can find the solution. I am trying to count total subscribers attached to ssid on Unifi AP. I have following, but not sure how to create summation with matching SSID.

    Discovery Rule Prototype:
    discover[{#SSID},.1.3.6.1.4.1.41112.1.6.1.2.1.6,{#STA},.1.3 .6.1.4.1.41112.1.6.1.2.1.8]

    Prototype Items:

    Name of Prototype: Channel {#SNMPINDEX} - {#STA} Stations
    Key: net.sta[{#SNMPINDEX}]
    OID: 1.3.6.1.4.1.41112.1.6.1.2.1.8.{#SNMPINDEX}

    Name of Prototype: Channel - {#SNMPINDEX}: {#SSID} SSID
    Key: net.ssid[{#SNMPINDEX}]
    OID:1.3.6.1.4.1.41112.1.6.1.2.1.6.{#SNMPINDEX}

    example of what I want to do:

    channel_data = {'ssid_1': 1, 'ssid_2': 4, 'ssid_1': 2, 'ssid_2': 3, 'ssid_3': 1} ## This data is based on net.sta and net.ssid
    sums = 0
    for key, value in data.items():
    if key in sums:
    sums[key] += value
    else: sums[key] = value

    I want it as an item so that I can display it on map as to which APs are effective and or need adjustment.

    Thank you in advance for your help

    NB
    Attached Files
  • nbhanji
    Junior Member
    • Jan 2013
    • 16

    #2
    I think I have solved it myself. Thanks

    Comment

    Working...