sonata-nfv / tng-communications-pilot

5GTANGO Communications pilot repository
Apache License 2.0
0 stars 12 forks source link

Add process to extend the VNF VM MIB with custom KPIs #16

Open antonroman opened 6 years ago

antonroman commented 6 years ago

here you have the Dockerfile and the related files to test the SNMP support we are going to add to the WAC. It is not the WAC VNF itself (we will be able to provide it to you in the next weeks). I added a user to be able to use v3 and removed all the communities so it shouldn't be possible to access with -v1 -v2.

With these commands you should get the container built and running. sudo docker build -t snmp-script-example . sudo docker run -d --name snmpd -p 161:161/udp

Then to test that everything is fine you can run a snmpwalk (user and pass provisioned in the conf in bold): snmpwalk -u authOnlyUser -A supercalifrajilistico -a MD5 -l authnoPriv localhost -v3

You can get the extend-mib list of variables which are the ones we are using to publish our variables: snmpwalk -v3 -u authOnlyUser -A supercalifrajilistico -a MD5 -l authnoPriv localhost NET-SNMP-EXTEND-MIB::nsExtendObjects

To get the OID of the values we are interested in: snmptranslate -On 'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."wac-provisioned-users"' snmptranslate -On 'NET-SNMP-EXTEND-MIB::nsExtendOutputFull."wac-registrations"'

Then you can get the values of the specific OIDs.

The values of these variables given by the container will be fixed and fake, of course: 666777 (wac-registrations) and 888999 (wac-provisioned-users) script-snmp-wac.zip