Displaying sensor data from yaml file

Hi,

This is my first time posting so if this question has already been asked or if this is not posted in the correct area I am sorry.

My issue is that I have been unable to display sensor information from a yaml file that I created. I have looked through the discovery and all of the data is there but I am unable to display that info. At this point I am lost. Everything that I have found shows that I am doing it correctly or at least I think I am. Any help would be great. Thanks

----------------------------------------aen.yaml---------------------------------------------

mib: ACD-SFP-MIB

modules:
   sensors:

       dBm:
           data:
                 -
                   oid: acdSfpDiagRxPwrdBm
                   num_oid: '.1.3.6.1.4.1.22420.2.4.2.1.9.2'
                   descr: 'Rx'

----------------------------------------Debug Discovery-----------------------------------

#### Load disco module sensors ####
Caching data: sensors SNMP['/usr/bin/snmpbulkwalk' '-v2c' '-c' 'COMMUNITY' '-OteQUs' '-Ih' '-m' 
'ACD-SFP-MIB' '-M' '/opt/librenms/mibs:/opt/librenms/mibs/accedian' 'udp:HOSTNAME:161' 
'acdSfpDiagRxPwrdBm']

acdSfpDiagRxPwrdBm.1 = "-6.57 dBm
"
acdSfpDiagRxPwrdBm.2 = "-10.49 dBm
"

The num_oid is not correct.
You should check it, AND add .{{ $index }} at the end.

do a ./poller.php -h -m sensors -v -d and the error will be visible.

I added .{{ $index }} but I can’t find how the num_oid is not correct. It is discovering the correct data just not displaying the sensor. I ran ./poller.php -h -m sensors -v -d but i didn’t get any errors. Is there anything that needs to be added to the yaml file for it to display the sensor?

Basic procedure is :

  • Find your textual OID you want to draw
  • snmptranslate it to the numerical value
  • snmpwalk that numerical value to identify the OID and the INDEX
  • put the textual OID in ```value: ````
  • put the numerical OID in num_oid:with .{{ $index }} at the end

If the polling succeed in cli, you’ll get the graphs after at least 2 poll intervals.

1 Like

Thanks for the help

If the YAML file works well, could you please submit it as a PullRequest so others will enjoy it as well.
Thanx

1 Like

Sure can… thanks

Again I am new to this board so I am still learning to navigate around… Where do I submit that as a PullRequest?

Thanks

You would use github to post your change so everybody can enjoy it.

https://docs.librenms.org/Developing/