Ubiquiti AirOS host template for AirOS - works with 5.5

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
wulfhere2
Posts: 5
Joined: Mon Jul 16, 2012 11:42 am

Ubiquiti AirOS host template for AirOS - works with 5.5

Post by wulfhere2 »

We had problems with graphing AirOS v5.5 devices. The issue turned out to be that Ubiquiti changed the OID for RSL and Tx/Rx Data Rates with the latest firmware version, for some reason.

I ended up resolving it by using a Perl script that uses snmpgetnext, rather than snmpget. It's slower, and a hack (I'd much rather do it from within Cacti, rather than firing off a Perl script), but I've been unable to figure out how to get Cacti to do an snmpgetnext, rather than snmpget, but it will work for multiple AirOS versions.

The graphs include:

- Tx/Rx data rates in Mbps
data-rates.png
data-rates.png (18.16 KiB) Viewed 11556 times
- Received Signal Level in dB
rsl.png
rsl.png (31.33 KiB) Viewed 11556 times
- Uptime
uptime.png
uptime.png (10.8 KiB) Viewed 11556 times
These templates are for version Cacti 0.8.8a. There is an XML file that includes the graphs and Data Input items, and a perl script (getUbiquitiCPEStats.pl) that needs to be placed in the scripts directory. If anyone tells me how to get Cacti to use snmpgetnext (so that these work with different AirOS versions), I'll update these and post them.
Attachments
ubiquiti-cacti-templates.zip
Place the perl script in <cacti-path>/scripts/
(30.96 KiB) Downloaded 2603 times
Sork
Posts: 1
Joined: Sun Sep 23, 2012 7:41 am

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by Sork »

where to get perl script ?
I`m not find it in ubiquiti-cacti-templates.zip
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by gandalf »

Please find attached my set of templates; works with AirOS 5.5 devices. Do not expect, that APs are very verbose. Put the Mikrotik xml into resources/snmp_queries
R.
Attachments
cacti088-AirOS.tgz
(4.62 KiB) Downloaded 1982 times
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by BSOD2600 »

gandalf:
minor tweak for the xml template. verbose output complains of the missing oid_num_indexes. CactiEZ 0.8.8a.

Code: Select all

+ Running data query [19].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/Mikrotik_mtxrWlStat.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.14988.1.1.1.1.1.5' Index Count: 1
+ Index found at OID: '1.3.6.1.4.1.14988.1.1.1.1.1.5.5' value: 'mp2'
+ Located input field 'mtxrWlStatSsid' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.14988.1.1.1.1.1.5'
+ Found item [mtxrWlStatSsid='mp2'] index: 5 [from value]
+ Located input field 'mtxrWlStatBssid' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.14988.1.1.1.1.1.6'
+ Found item [mtxrWlStatBssid='00:15:6D:54:xx:xx'] index: 5 [from value]
+ Located input field 'mtxrWlStatFreq' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.14988.1.1.1.1.1.7'
+ Found item [mtxrWlStatFreq='5260'] index: 5 [from value]
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by gandalf »

This is a NOTE only. Most SNMP templates do NOT provide an explicit index counter. So we emulate this by counting the table entries (starting with 088)
R.
Atreides
Cacti User
Posts: 174
Joined: Mon May 31, 2010 9:26 am

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by Atreides »

Hi Gandalf,
I'm trying to use your template :

+ Running data query [14].
+ Found type = '3' [SNMP Query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/Mikrotik_mtxrWlStat.xml'
+ XML file parsed ok.
+ <oid_num_indexes> missing in XML file, 'Index Count Changed' emulated by counting oid_index entries
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.14988.1.1.1.1.1.5' Index Count: 0
+ No SNMP data returned

AirOS 5.5.10 on a Powerbeam M500.


LE : It seems that its working only for the client mode. Same OID executed, on AP no SNMP data, on Client its ok.
stoneii
Posts: 14
Joined: Thu Jul 09, 2015 11:42 pm

Re: Ubiquiti AirOS host template for AirOS - works with 5.5

Post by stoneii »

Is there a possibility that this old template to the new Ubiquiti Airos is 5.6.1 changed .
since the new update of Ubiquiti does not work anymore !
mfg
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest