[collectd] collectd postgresql writing and metrics aggregation

Eugene Prokopiev enp at itx.ru
Mon Feb 15 14:34:00 CET 2016


I tried to use postgresql pluging for writing metrics:

<Plugin postgresql>
  <Writer sqlstore>
    Statement "SELECT collectd_insert($1, $2, $3, $4, $5, $6, $7, $8, $9);"
  <Database eye>
    Host ""
    Port "5432"
    User "eye"
    Password ""
    Writer sqlstore

All works fine before using aggregation:

<Plugin "aggregation">
    Plugin "cpu"
    Type "cpu"
    GroupBy "Host"
    GroupBy "TypeInstance"
    CalculateAverage true

<Chain "PostCache">
    <Match regex>
      Plugin "^cpu$"
      PluginInstance "^[0-9]+$"
    <Target write>
      Plugin "aggregation"
    Target stop
  <Target write>
    Plugin "rrdtool"
    Plugin "postgresql"

With this configuration I see new data in rrd, but can't see it in
postgresql and can't see even TCP packets on postgresql port. I tried
to use 'Plugin "sqlstore"' instead of 'Plugin "postgresql"' in <Target
write> but result was the same and even no errors with:

<Plugin "syslog">
  LogLevel "debug"
  NotifyLevel "OKAY"

What is wrong? How to debug it?

Eugene Prokopiev

More information about the collectd mailing list