In this article I will give an example of adding BDCOM-P3310C and BDCOM-P3310B to the ABillS billing system on the Ubuntu Server 16.04 operating system.
BDCOM OLT should be added through the menu “Maintenance” – “Equipment”, then in the menu “Settings” – “Access server” you can edit the access password (which should be the same for SNMP and telnet), you can see the device statistics in “Maintenance” – “Equipment” – “PON”.
To draw graphics, install the necessary components and RRD::Simple:
apt-get install -yq cpanminus build-essential librrdtool-oo-perl rrdtool librrds-perl cpanm RRDTool::OO
You can view the installed version as follows:
cpan -D RDTool::OO
To collect data, add to /etc/crontab:
# Every 5m */5 * * * * root /usr/abills/libexec/billd equipment_pon
If you need to run the script less frequently, for example, every 10 minutes, then:
# Every 10m */10 * * * * root /usr/abills/libexec/billd equipment_pon STEP=600
To cron did not send the command output to email, you can add at the end of the command
> /dev/null 2>&1
In case of problems, run with DEBUG 1-7:
/usr/abills/libexec/billd equipment_pon DEBUG=1
To erase the old data from the database and add the ONU to the new one:
/usr/abills/libexec/billd equipment_pon RELOAD=1
An example of viewing and clearing records through the database:
SELECT * FROM equipment_pon_onu LIMIT 50 SELECT * FROM equipment_pon_onu ORDER BY datetime DESC LIMIT 50 TRUNCATE TABLE equipment_pon_onu; TRUNCATE TABLE equipment_pon_ports;
To collect data but do not draw graphics, add:
You can specify specific OLT (access server), by default all data is collected from all:
To search for and alert about duplicate ONTs, you can add to cron:
/usr/abills/libexec/billd equipment_pon SERIAL_SCAN=1
On the client services page, we select through the BDCOM OLT search as an access server, select the port (onu) through the search, for example, find by description (I have all ONTs signed in the BDCOM configuration and these descriptions are pulled up via SNMP to ABillS).
Done, now on the client page you can see the status of the ONT port ethernet, the signal level and other information.
For one of the OLT, the equipment_pon script did not put epon ports into the database, so I added them manually:
snmpwalk -v2c -c public 192.168.2.2 .22.214.171.124.126.96.36.199.1.2 INSERT INTO equipment_pon_ports VALUES ('37','7','9','epon','0/1','EPON0/1','0'); INSERT INTO equipment_pon_ports VALUES ('38','8','9','epon','0/2','EPON0/2','0'); INSERT INTO equipment_pon_ports VALUES ('39','9','9','epon','0/3','EPON0/3','0'); INSERT INTO equipment_pon_ports VALUES ('40','10','9','epon','0/4','EPON0/4','0');
Delete if anything like this:
DELETE FROM equipment_pon_ports WHERE id=37;
The SNMP template is located in /usr/abills/Abills/modules/Equipment/Bdcom.pm