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 table not a table #1371

Closed
phemmer opened this issue Jun 14, 2016 · 2 comments
Closed

SNMP table not a table #1371

phemmer opened this issue Jun 14, 2016 · 2 comments

Comments

@phemmer
Copy link
Contributor

phemmer commented Jun 14, 2016

Feature Request

Proposal:

There are 2 changes I think would make the SNMP table output more intuitive.

Current behavior:

Currently the plugin provides output such as:

ifHCOutOctets,host=127.0.0.1,instance=enp5s0,unit=octets ifHCOutOctets=10565628i 1456878706044462901
ifInDiscards,host=127.0.0.1,instance=enp5s0 ifInDiscards=0i 1456878706044510264
ifHCInOctets,host=127.0.0.1,instance=enp5s0,unit=octets ifHCInOctets=76351777i 1456878706044531312

This is not a table. A table is a key with multiple fields/values.

Desired behavior:

For example, this is how the cpu plugin outputs its data:

> cpu,cpu=cpu0,host=fll2azbxstg usage_guest=0,usage_guest_nice=0,usage_idle=95.91836744003224,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=0,usage_user=4.081632652030893 1465880423345219711
> cpu,cpu=cpu1,host=fll2azbxstg usage_guest=0,usage_guest_nice=0,usage_idle=98.0392157292421,usage_iowait=0,usage_irq=0,usage_nice=0,usage_softirq=0,usage_steal=0,usage_system=1.9607843149843065,usage_user=0 1465880423345219711

Note how it has a key of cpu, with multiple fields. Not a separate line & key for each field.

Thus our earlier table might instead look something like:

ifStats,host=127.0.0.1,instance=enp5s0 ifHCOutOctets=10565628i,ifInDiscards=0i,ifHCInOctets=76351777i 1456878706044462901

 
Now another deviation is the units. In other plugins, such as the disk plugin, the unit is not a tag, it's in the field name. For example:

> diskio,host=fll2azbxstg,name=sda2,serial=unknown io_time=23027732i,read_bytes=95604750336i,read_time=31074355i,reads=2188506i,write_bytes=322633367040i,write_time=115839572i,writes=15424778i 1465880806245466582

This has several very significant benefits over putting the unit in a tag. First, it lets you use different units for different fields. Second, it lets you put multiple fields on a single line. Third, when graphing, the unit shows up in the graph legend (as a tag, there's no way to get it at all when graphing).

Granted, there's nothing stopping people from putting the unit in the field name now, but providing a unit option, which is added a tag is highly confusing. I think it would be much better if it were removed as an explicit option, and instead we provide the option to add arbitrary tags, so if people really want to add it as a tag, they can.

Use case:

The main thing these changes bring is consistency & expected behavior.
I expect SNMP tables to actually generate a table. This is how it works in every other tool I've worked with which handles SNMP tables. I've never had one generate a separate table for every metric, with only a single field.
It also makes the behavior consistent with other plugins. It's rather odd that this one plugin behaves different from all the other built-in plugins (at least the ones I've used).

@kostasb
Copy link

kostasb commented Jun 14, 2016

Related to #808 .

@phemmer phemmer mentioned this issue Jun 20, 2016
3 tasks
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
@phemmer
Copy link
Contributor Author

phemmer commented Aug 22, 2016

Closed by #1389

@phemmer phemmer closed this as completed Aug 22, 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

2 participants