collectd / collectd

The system statistics collection daemon. Please send Pull Requests here!
http://collectd.org
Other
3.14k stars 1.23k forks source link

[collectd 6]: Port epics plugin to 6.0 #4221

Open matwey opened 8 months ago

matwey commented 8 months ago

Hello,

This is placeholder issue for porting epics plugin (see #4022) to collectd-6.

matwey commented 7 months ago

@octo so what is plugin_get_ds() alternative for 6.0?

octo commented 7 months ago

@matwey There is no equivalent. Set the type field in metric_family_t to either METRIC_TYPE_COUNTER or METRIC_TYPE_GAUGE. The concepts of "data source name", minimum value, and maximum value no longer exist at all.

matwey commented 7 months ago

So I think I need also rethink the way the plugin configured.

octo commented 7 months ago

I'm not familiar with the epics plugin, but at a glance it looks like the "label" concept adapts much nicer to collectd 6.

Strawman proposal for a configuration syntax, based on the v5 epics manpage entry:

<Plugin epics>
  <Family "cavity.temperature"> # metric family name
    Type "counter" # or "gauge"
    Unit "Cel" # for degrees celsius
    <Metric "Cavity1:Temp"> # where to read the value from
      Label "name" "Cavity1:Name" # populate additional metric labels
    </Metric>
  </Family>
</Plugin>

That's roughly what I'd focus on for a MVP version. We can add things like static labels or resource attributes later, if they are useful.

matwey commented 7 months ago

Should we specify Type if we can infer it from the epics internal type?