Comments (10)
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"
As you can see in the following example: https://github.com/toni-moreno/snmpcollector/wiki/Example:-Configuring-Cisco-Catalyst-Switch
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
from snmpcollector.
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.
from snmpcollector.
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
from snmpcollector.
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:
TP-link looks good: IF-MIB::ifDescr.49153 = STRING: gigabitEthernet 1/0/1 : copper ---> 1/0/1
D-Link looks not so good: IF-MIB::ifDescr.1 = STRING: D-Link DES-3200-28 R1.89 Port 1 ---> (should be 1/1)
Other D-link: IF-MIB::ifDescr.2 = STRING: D-Link DGS-3000-28SC R5.10.B00 Port 2 on Unit 1 ----> (should be 1:2)
These are quite good examples, So port mapping is the solution for me.
Of course you can use the file filters also
Could you tell here a bit more?
from snmpcollector.
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.
from snmpcollector.
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!
from snmpcollector.
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
from snmpcollector.
Could you please give an example how would regexp look like from my pasted examples?
TP-link looks good: IF-MIB::ifDescr.49153 = STRING: gigabitEthernet 1/0/1 : copper ---> 1/0/1
D-Link looks not so good: IF-MIB::ifDescr.1 = STRING: D-Link DES-3200-28 R1.89 Port 1 ---> (should be 1/1)
Other D-link: IF-MIB::ifDescr.2 = STRING: D-Link DGS-3000-28SC R5.10.B00 Port 2 on Unit 1 ----> (should be 1:2)
from snmpcollector.
Hi @Naumis1 ,
As @toni-moreno is proposing, I would create a single regex for each kind of device, for all type of interface responses.
I would recommend you to set test the output of ifName query:
Example response ifName query (1.3.6.1.2.1.31.1.1.1.1) over an DGS-1510-20 Gigabit Ethernet SmartPro Switch
OID | Type | Value
-- | -- | --
.1.3.6.1.2.1.31.1.1.1.1.1 | OctetString | eth1/0/1
.1.3.6.1.2.1.31.1.1.1.1.2 | OctetString | eth1/0/2
.1.3.6.1.2.1.31.1.1.1.1.3 | OctetString | eth1/0/3
...
Following your example:
TP-link looks good: IF-MIB::ifDescr.49153 = STRING: gigabitEthernet 1/0/1 : copper ---> 1/0/1
^\w+ (.*) : .*$ --> $1 capture group will contain 1/0/1
> Model DGS-3000
D-Link looks not so good: IF-MIB::ifDescr.1 = STRING: D-Link DES-3200-28 R1.89 Port 1 ---> (should be 1/1)
.*Port (\d+) --> $1 and set the first index?
> Model DGS-3200
Other D-link: IF-MIB::ifDescr.2 = STRING: D-Link DGS-3000-28SC R5.10.B00 Port 2 on Unit 1 ----> (should be 1:2)
.*Port (\d+) on Unit (\d+) --> $1 and $2 will contain required info
from snmpcollector.
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.
Thank you.
from snmpcollector.
Related Issues (20)
- [Bug] snmpcollector not writing to influx HOT 5
- [Feature Request ] Refactor old logrus logger to new more performant and structured logging framework HOT 1
- [Bug] non-positive interval for NewTicker HOT 7
- [FR] Normalise versioning tags to vX.Y.Z
- Force returned values as signed int32? HOT 4
- [Bug] Device stats metrics `filter_duration` always is 0
- [Bug] Device SysInfo doesn't update if the device is restarted
- [Bug] SNMP queries retries/timeout option changes to 0/5sec on some devices from version 0.12
- [Question] Filtering Requests HOT 1
- cluster
- Alternate OID Problem/Question HOT 2
- [Feature Request] - Distributed collectors
- [Bug] MultiIndex measurement not reloaded on some cases - use of closed network connection
- Installation Process Hiccups : Does not install with ease ( requires python27 in 2022) HOT 1
- Installation Guide? HOT 6
- [Bug] Adding a metric with a slash(/) in the ID causes 404 errors when trying to edit the metric
- [Security/Build] Node/NPM Dependencies are Out-of-Date & Build Fails w/o Python2
- Cumulus Linux device not connecting
- Get self monitoring grafana dashboards for older collector versions
- Question. Which version(s) of Influx are supported?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snmpcollector.