Skip to content
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

SNMP: Add capability to combine multiple metrics as fields in the same measurements #808

Closed
titilambert opened this issue Mar 7, 2016 · 11 comments

Comments

@titilambert
Copy link
Contributor

This is the issue (proposal) based on: https://groups.google.com/forum/#!topic/influxdb/v1PQmUE0usM

@juliusloman
Copy link

I'd propose following design:

  • put new attribute "measurement" which will contain name of the influxdb's measurement this get/bulk/table request data will go to
  • introduce new array of measurements into input.snmp . each measurement can then have single_record attribute set to yes or no. If set to true, data in same collection interval will be joined (of course you loose some time precision). If set false, no joins will be performed, just written to same measurement.

Config example:

 [[inputs.snmp.table]]
    measurement = "myMeasurement1"

 [[inputs.snmp.get]]
    measurement = "myMeasurement2"

 [[inputs.snmp.get]]
    measurement = "myMeasurement2"

 [[input.snmp.bulk]
    measurement = "myMeasurement3"


 [[input.snmp.measurements]]
     name = "myMeasurement1"
     single_record = true

Some line protocol examples:
Table request with measurement="interfaces" and single_record=false:

> interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCInOctets=488264518i    1457443305004647980
> interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCOutOctets=121438595i 1457443305004977059

Table request with measurement="interfaces" and single_record=true:

> interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCInOctets=488264518i,ifHCOutOctets=121438595i 1457443305004647980

Is this feasible?

@titilambert
Copy link
Contributor Author

@juliusloman I think so :)
I like this idea :)

@sparrc Could you explain the difference, if it exists, between

interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCInOctets=488264518i    1457443305004647980
interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCOutOctets=121438595i 1457443305004977059

and

interfaces,host=192.168.1.29,instance=eth0,unit=octets ifHCInOctets=488264518i,ifHCOutOctets=121438595i 1457443305004647980

Is it necessary to be able to get both outputs ?

@sparrc
Copy link
Contributor

sparrc commented Apr 18, 2016

nope, that is not necessary, those are exactly the same

edit: we should prefer the latter, because that creates less network and write traffic

@titilambert
Copy link
Contributor Author

@sparrc Thanks for your comment !
So the next question is: Should we create a patch inside Telegraf plugin core, to group automatically measurements with same name ? (for each input plugin ?)

@sparrc
Copy link
Contributor

sparrc commented Apr 18, 2016

I would prefer not to because this would create much larger and more complicated buffer structures (rather than just a channel, as it is now).

Most plugins should be able to write their metrics this way. SNMP is a bit of an outlier...

@Infiniverse
Copy link

Is there any progress on this issue? I'm just about to start collecting SNMP data on a production system, and am wondering the best way to do it. Will this bite me?

@rhinst
Copy link

rhinst commented Jun 8, 2016

I'm also very interested in this ability. In fact, it will determine whether or not we're able to use influxdb at all for our application.

@wilsncc
Copy link

wilsncc commented Jul 27, 2016

I was a little disappointed when I noticed how Telegraf laid out SNMP data like this, I doesn't seem to make all that much sense.

As with @rhinst I cannot in good faith recommend we shift from RRD/MRTG to InfluxDB/Telegraf until this is resolved.

@Infiniverse
Copy link

It's open source so it should be a relatively easy fix for someone who knows 'GoLang' to do.
Alas, I don't yet know GoLang so I've not been able to do it (easily) myself yet.

@sparrc
Copy link
Contributor

sparrc commented Jul 27, 2016

unfortunately it's not too easy with the current SNMP plugin, hence #1389

sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Jul 28, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
sparrc added a commit that referenced this issue Aug 3, 2016
closes #1371
closes #808
closes #1361
closes #1151
closes #997
closes #1163
closes #856
closes #1043
closes #961
closes #1389
@sparrc
Copy link
Contributor

sparrc commented Aug 23, 2016

this is now available in 1.0 RC 1 with the new SNMP plugin, please see here to download the latest version: https://github.com/influxdata/telegraf#linux-deb-and-rpm-packages, and the changelog for details on the new SNMP plugin.

@sparrc sparrc closed this as completed Aug 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants