Comments (3)
We can Add a metric type STRINGPARSER, this new type will need 2 extra data.
- A Regex with capturing groups
- A capturing group MAP with declaration of data type per group
Example:
We can extract data from this string
FAN 1: 8725 RPM
with this regex
^([^:*]*)*: *([0-9]*)* *RPM
And we will get 2 values
a) FAN 1
b) 8725
Now we need to map these to values as fields or tags , by example
TAG["fan_number"];FIELD["GAUGE"]
from snmpcollector.
In the above case there is not a really need to add a new tag , in that case the measurement will be..
Measurement: Temp => Fields [ "cpu","sys" ]
Measurement: RPMFan => Fields ["fan1","fan2","fan3","fan4" ,"fan5"]
Both cases has no sense add fan_number as TAG, also each tag will be added to complete measurement. So adding tags at metric("field") level is dangerous.
Taking all these considerations I will remove the TAG option per metric.
In the same way I have doubts about needs of more than one Fields defined in each metric, since a snmpcollector metric is indeed a single field.
Finally the STRINGPARSER metric will have 2 options
1.- REGEXP with only one capturing group for the final value
2.- VALUE TYPE
by example in the above examples
a) for FAN X
REGEXP = ".*: *([0-9]*)* *RPM"
VALUE=INTEGER
b) for TEMP
REGEXP = "[^+]*\+([.0-9]*).*"
VALUE=FLOAT
from snmpcollector.
Thinking a littler more.
Snmpcollector always send numeric data as Floating point numbers. so It is not need to configure the type. We will assume it will be or INTEGER or FLOAT and both will be automatically converted to float.
The only configuration parameter needed is REGEXP !!!
from snmpcollector.
Related Issues (20)
- [Bug] Docker Build Error/Deprecated Node Depedencies HOT 12
- [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
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.