-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] regarding tag values mapping #498
Comments
Hello @Naumis1 . I can not understand why are you indexing by .1.3.6.1.2.1.2.2.1.1 (ifIndex) if you can index by the description (ifDesc) ".1.3.6.1.2.1.2.2.1.2" You can configure you measurement with indexOID .1.3.6.1.2.1.2.2.1.2 and you can name it as "portName" , And add all other defined metrics from the Iftable : Example for configure Obviously you should create all these SnmpMetrics from the table (https://www.alvestrand.no/objectid/1.3.6.1.2.1.2.2.1.html) and also these other special "STRINGEVAL" if you need it. hope this can help you |
For me it does not matter if I do indexing by ifDescr or with ifIndex. I am trying to map port names to manufacturer and model specific ones. e.g 1/0/1, 1/1, 1:1 or just 1. I am doing it so, in order to fit snmpcollector in to exsisting infrastructure. I noticed something interesting here: snmpcollector/conf/lp_file_filter_a.txt. But still can't get it working. |
Of course you can use the file filters also But I thought that you had manufacturer port names at "ifDescr". ( it should be standard at SNMP MIB-2 definitions in most of routers and switches) Anyway. Could you please show us the output from snmpwalk .1.3.6.1.2.1.2.2.1.2 please ? If you need only a bit of the full response you can use STRINGPARSER metric type to preprocess the response before sent to the backend |
Yes i thought about that, but problem, is that I have ~25K different brand and model switches. Mostly D-Link and TP-Link. For example: These are quite good examples, So port mapping is the solution for me.
Could you tell here a bit more? |
Not sure that port mapping will be the best solution for you. File filter has been designed for really edge cases and each file should fit only one device ( not easily maintainable) In most of our customers we have designed different configurention templates ( measurement groups) for each manufacturer/model and deployed configurarions for hundreds of devices using the snmpcollector API choosing for each device its specific config template. And , not sure but I think you would be able to look for the appropiate regular expresion for TP-Link and different regexp for D-Link. If you need a more specific solution we can offer you advanced consultancy for your use case and also custom features develop as part of our commerial support. Hope these tips could help you. |
But as I see from webgui it looks like Custom Filters is one filter per device and Measurement Filters with filter type "file" is for multi devices. Am I wrong? Thanks! |
Both type of filters could be shared among different devices. But if I'm not wrong, you could add in this file, one config line per interface for all possible strings in different manufacturer/model ( hundreds or perhaps thousands of different config lines) that you could of course use in all devices. In my previous approach only one regular expression per manufacturer/model ( perhaps 15/20/30 different regexp ?) It depends on the all existing IfDesc responses |
Could you please give an example how would regexp look like from my pasted examples?
|
Hi @Naumis1 , As @toni-moreno is proposing, I would create a single regex for each kind of device, for all type of interface responses.
Following your example:
|
Hello @Naumis1 We hope you can continue working with snmpcollector with all our previous suggestions . If thera are not any update in next hours we will close this issue. |
Hello,
I have a question.
How can I map index values from ifIndex to some other values?
For example: tp-link switches uses interesting port indexing IF-MIB::ifDescr.49153, IF-MIB::ifDescr.49154, IF-MIB::ifDescr.49155 (port 1, 2, 3) and so on. So how to do, that the port name (tag value in influxdb) would be "1/0/1" instead of "49153", "1/0/2" instead of "49154"... Other devices uses normal indexing e.g. .1 and so on, but still we need mapping for example from .1 to 1/1, depends on manufacturer and model.
I tried to use Custom Filters, added some filtering, but still can't see no new Tag values in influx.
Thanks!
The text was updated successfully, but these errors were encountered: