Hi Denis, On 3 June 2015 at 01:50, Dennis Jacobfeuerborn <[email protected]> wrote: > Hi, > I'm trying to figure out how I can get collectd supplied data into > influxdb and it's tag based format. > My issue right now is that I'm not 100% sure I understand the metric > format used by collectd. Take this metric for example: > > <host>.cpu-3.cpu-idle 99.600929 1433256464 > > This seems to conform to the format > "<host>.<plugin>-<plugin-instance>.<type>-<type-instance>". This value > however: > > <host>.vmem.vmpage_io-swap.in 0.000000 1433256464 > > seems to have a plugin "vmem", no plugin-instance, a type of "vmpage_io" > and a type instance of "swap". What does the ".in" represent though?
The additional part you're seeing in the metric name is the data source (DS) name. The "<host>.<plugin>-<plugin-instance>.<type>-<type-instance>" format you mentioned is known as the "identifier" for the measurement. Some plugins (e.g. vmem, interface, load) will pack multiple values into a measurement. Every value has a name that's determined by types.db. If the measurement has multiple values, each will have a unique name. For example, the load plugin packs 3 values (shortterm, midterm, longterm) into the measurement, so the corresponding metric names being passed to InfluxDB would be: - example-host.load.load.shortterm - example-host.load.load.midterm - example-host.load.load.longterm You can see which plugins emit multiple values by checking out types.db, which specifies the names for each of the data sources in a measurement. https://github.com/collectd/collectd/blob/master/src/types.db https://collectd.org/documentation/manpages/types.db.5.shtml You may be wondering why other plugins (like the cpu plugin) don't have value names? The vast majority of collectd plugins will only emit a single value in their measurements and simply use "value" as the data source name. How the DS name gets stored can depend on: - The behaviour of the write plugin in collectd. For example, by default the write_graphite plugin will only pass include DS name if there is more than one DS in a measurement (although this behaviour is configurable in the plugin). Alternatively, the rrdtool plugin will store multiple DS in a single file that matches the metric identifier. - The behaviour of the collectd network protocol listener. If you're pushing collectd packets directly to InfluxDB's collectd input plugin, it has its own logic for how that data gets serialised out into InfluxDB. Check out these pages on the collectd wiki for more background on collectd's internals: https://collectd.org/wiki/index.php/Naming_schema https://collectd.org/wiki/index.php/Value_list https://collectd.org/wiki/index.php/Data_source Cheers, Lindsay -- w: http://fractio.nl/ t: @auxesis _______________________________________________ collectd mailing list [email protected] http://mailman.verplant.org/listinfo/collectd
