toni-moreno / snmpcollector

A full featured Generic SNMP data collector with Web Administration Interface for InfluxDB
MIT License
287 stars 52 forks source link

[Question] SNMP Table #406

Closed CommanderKagome closed 5 years ago

CommanderKagome commented 5 years ago

Please include this information:

Good afternoon to everyone. Background Information: (skip if you don't care) We have in our company a NetApp SAN. NetApp provided a so called NA-Box to monitore it. That Application is a Grafana Installation with a database in the background and surprisingly it was very fast. So my idea was to create my own Grafana installation for other devices e.g. NAS, Server, Switches and so on. I read that influxDB is very good for timeseries and Grafana supports it ... so lets try out all that new toys. I started with Telegraf to collect SNMP Values in the influxDB. Telegraf is in my opinion good if you want only to monitore one typ of device e.g. NAS from the same vendor. But in our real world we have different vendors and diffrent device types ... and I was unable to find a solution for that usecase with Telegraf. (only if i install it multiple times or on multiple virtual machines ...) So i looked arround and found this snmpcollector. A WebGUI, influxDb Support, Grouping of measurements, multithreading .. that looked very interessting for my usecase. I'm coming from the Microsoft world and I hate it to edit 100000 config files with 1000000 lines of text each - so this snmpcollector looked very good. A dream would be if I could simple upload MIB-Files in this snmpcollector, enter an Test-IP and than simple cklick wich measurements I want to collect and it will create everything in the background ... but dreams are dreams ...

So lets start with the Problem / Question: I have a Synology NAS which I want to monitore. Temperature is no problem with this snmpcollector - so connection should work. But I want more :). So next was to try: ISCSI Informations and we start easy with only one value .. MIB can be found here: SYNOLOGY-ISCSILUN-MIB.txt

Mib looks in a Browser like: screenshot 495 or as Table: screenshot 496

In Telegraf (using an other influx database), I have configured it as well: screenshot 497 (Sorry that i used here a picture - but it was unreadable as code or quote ...)

First of: The documentation about SNMP Tables is a little bit poor in the wiki. I also downloaded the linux template you provide and the hrStorage Part is nearly the same I want to do. But It isn't working with my own measurement ...

So lets start: I created first the SNMP Metric: screenshot 498 Question: Do i need to do that for the ISCILunName too?

Then I created a Measurement: screenshot 499 I set as IndexOID the OID of the ISCSILunName.

I tested also under "Device status": Both is only working if the Mode is "Walk": screenshot 500 And screenshot 501 So both SNMPs give me expected values back - horray.

I also created a Measurement Group screenshot 502

Added that Measurement Group to my SNMP Device: screenshot 503

Pressed the "Refresh device configuration in runtime" in SNMP Devices... screenshot 504

waited one minute and pressed the reload Config because i don't know what is the correct one ... screenshot 505 wait again one minute...

And to make everything sure i reboot the whole virtual machine.

After that I go to Device Status and here starts the wired things: screenshot 506 I see only the temperature Measurement and not the other.

Did I something wrong until this steps? Do I need to upload somewhere the MIB Files? I'm new to influxDB, Grafana and this snmpcollector - so handle me as an Idiot and ask questions...

I will post the device log with the error soon - just in this second droped my remote session and don't want to go online again ...

sbengo commented 5 years ago

Hi @CommanderKagome , thanks for your detailed feedback. I will try to answer all your questions and see how we can solve your missing measurement.


A dream would be if I could simple upload MIB-Files in this snmpcollector, enter an Test-IP and than simple cklick wich measurements I want to collect and it will create everything in the background ... but dreams are dreams ...

Totally agree. We will try to work on it but we are really busy right now. Meanwhile, @topranks did a tool to add metric/measurement directly from MIB files: https://github.com/topranks/mib2SnmpCol

First of: The documentation about SNMP Tables is a little bit poor in the wiki. I also downloaded the linux template you provide and the hrStorage Part is nearly the same I want to do. But It isn't working with my own measurement ...

Thanks, we will review!

Question: Do i need to do that for the ISCILunName too?

No, if you want to use ISCILunName as the index you have to set up on measurement as you did

waited one minute and pressed the reload Config because i don't know what is the correct one ... wait again one minute...

Yes, its the correct one. On SNMPCollector you can work with internal config and it only will be loaded on runtime after firing a "Reload Config".

Did I something wrong until this steps? Do I need to upload somewhere the MIB Files?

Everything seems fine, you did the correct steps and all metrics/measurements seems right.


I'm not unable to know what is happening with your device and measurements. Could you provide the following info:

Thanks, Regards!

CommanderKagome commented 5 years ago

Thank you for your information sebengo!

I restarted the SNMP Connection at 12:42 - so I cutted the Logfile a little bit. device-log.txt

The Synology measurement group contains one measurements: screenshot 2113

The measurement looks like this: screenshot 2114

and the SNMP Metrics look like this: screenshot 2115

screenshot 2116

So direct values work - only the table doesen't work.

Thank you for your help.

sbengo commented 5 years ago

Hi @CommanderKagome , thanks for your feedback.

As I have seen on the log, it is giving a timeout trying retrieving synology_iSCSILUN measurement, so the measurement is not being mapped on available measurements for device.

time="2019-05-06 12:42:42" level=info msg="SNMPDEVICE [HNA006] SNMP connection stablished Successfully for device  and measurement synology_iSCSILUN" 
time="2019-05-06 12:42:42" level=info msg="MEASUREMENT [synology_iSCSILUN] Loading Indexed values" 
time="2019-05-06 12:42:42" level=debug msg="MEASUREMENT [synology_iSCSILUN] Looking up column names .1.3.6.1.4.1.6574.104.1.1.3 " 
time="2019-05-06 12:43:02" level=error msg="MEASUREMENT [synology_iSCSILUN] LOADINDEXEDLABELS - SNMP WALK error: Request timeout (after 3 retries)"

As I have seen on your config, I noticed that you had configured your device with the parameter MaxRepetitions: 255. As I have seen on other devices, setting up to a high value can cause some problems on snmptables (big ones) and can return a timeout. So:

Thanks, Greetings!

CommanderKagome commented 5 years ago

Thank you very much sbengo.

If I rember correctly there were two 'reasons' for "MaxRepetitions: 255"

Well, with MaxRepetitions: 50 (default) is it working very good and I added already a few new measurements.

Is there any forum or do you use the "issue" on github to talk about things? I have a lot of other questions... Is there any log rotation for the device.log? I have a measurement with a table with > 500 rows (SMART Values of each disk) which blow up the logfiles in snmp debug mode. Which mib browser do you use? I use iReasoning MIB Browser and tried Mibble MIB Browser. First can't be used in comercial environment because of licencing and costs, Second uses Java and seems a little bit outdated. How do you test measurements? Copy the device and send the data to a test database? mib2SnmpCol is an interessting tool - but no gui :( and on the first view no way to add an prefix to the measurements

thanks again sbengo - you helped me a lot.

sbengo commented 5 years ago

Hi @CommanderKagome , great news then!

About your questions, if they are related with SNMPCollector itself you can open issues on this repo.

About other questions about external tools like mib browser, we recommend to answer on other communities like reddit.

I will try to answer yours:

Is there any log rotation for the device.log? I have a measurement with a table with > 500 rows (SMART Values of each disk) which blow up the logfiles in snmp debug mode.

No, as it is explained on the issue #49 , you have to configure using logrotate or other util

Which mib browser do you use? I use iReasoning MIB Browser and tried Mibble MIB Browser. First can't be used in comercial environment because of licencing and costs, Second uses Java and seems a little bit outdated.

Actually, I cannot give you any recommendation. Try to ask on bigger community!

How do you test measurements? Copy the device and send the data to a test database?

We work with several instances with different environments. We test our measurements on a devel instance using export/import on GUI to pass data through instances

CommanderKagome commented 5 years ago

Again, Thank you very much for your help.

I will close this issue now.