Salvete,

I tried to grok the Chains feature and how to handle varying configs across
server types.

I want to send the set of basic metrics to one server, but then I may want
to enable some special metrics like "ceph" and send them to another server.

Since, e.g., ceph.so sends a giant boatload of metrics I want to channel
them to a specific destination first and then later filter them, when I
found out what metrics to keep.

But for my config management it is easiest if I can drop in .d snippets.

However from figured, I can only configure the PostCache chain once.
Multiple definitions did not work, I think.

So I tried this approach, and it *seems* to work, but I still get weird
parse errors during startup:

# head -n 50 /etc/collectd/collectd.conf.d/6* | grep -v "#"
==> /etc/collectd/collectd.conf.d/60-postcache-chain-head.conf <==

LoadPlugin match_regex

PostCacheChain "PostCache"


<Chain "PostCache">

==> /etc/collectd/collectd.conf.d/61-postcache-chain-default.conf <==


  <Rule "route_metrics">
    <Match "regex">
      Plugin
"^apache|cgroups|cpu|df|disk|entropy|interface|load|memory|nginx|processes|protocols|swap|tcpconns|uptime$"
    </Match>
    <Target "write">
      Plugin "write_graphite/techops"
    </Target>
  </Rule>


==> /etc/collectd/collectd.conf.d/62-postcache-chain-ceph.conf <==
  <Rule "route_metrics">
    <Match "regex">
      Plugin "^ceph$"
    </Match>
    <Target "write">
      Plugin "write_graphite/sysadmtest"
    </Target>
  </Rule>

==> /etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf <==

</Chain>


And here are the relevant lines after startup. What do they mean, and why
do they occur multiple times?

Does each snippet have to be valid in itself? Or do they get concatenated
and then parsed?


Okt 29 16:33:18 server systemd[1]: Stopped Statistics collection and
monitoring daemon.
Okt 29 16:33:18 server systemd[1]: Starting Statistics collection and
monitoring daemon...
Okt 29 16:33:18 server collectd[483069]: Parse error in file
`/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf', line 240 near
`': syntax error, unexpected $end, expecting UNQUOTED_STRING or OPENBRAC or
EOL
Okt 29 16:33:18 server collectd[483069]: yyparse returned error #1
Okt 29 16:33:18 server collectd[483069]: configfile: Cannot read file
`/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf'.
Okt 29 16:33:18 server collectd[483069]: Parse error in file
`/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf', line 268 near
`/': syntax error, unexpected SLASH, expecting UNQUOTED_STRING
Okt 29 16:33:18 server collectd[483069]: yyparse returned error #1
Okt 29 16:33:18 server collectd[483069]: configfile: Cannot read file
`/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf'.
Okt 29 16:33:18 server collectd[483069]: Created new plugin context.
Okt 29 16:33:18 server collectd[483074]: Parse error in file
`/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf', line 240 near
`': syntax error, unexpected $end, expecting UNQUOTED_STRING or OPENBRAC or
EOL
Okt 29 16:33:18 server collectd[483074]: yyparse returned error #1
Okt 29 16:33:18 server collectd[483074]: configfile: Cannot read file
`/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf'.
Okt 29 16:33:18 server collectd[483074]: Parse error in file
`/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf', line 268 near
`/': syntax error, unexpected SLASH, expecting UNQUOTED_STRING
Okt 29 16:33:18 server collectd[483074]: yyparse returned error #1
Okt 29 16:33:18 server collectd[483074]: configfile: Cannot read file
`/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf'.
Okt 29 16:33:18 server collectd[483074]: Created new plugin context.
Okt 29 16:33:18 server systemd[1]: Started Statistics collection and
monitoring daemon.
Okt 29 16:33:18 server collectd[483074]: Systemd detected, trying to signal
readyness.
_______________________________________________
collectd mailing list
collectd@verplant.org
https://mailman.verplant.org/listinfo/collectd

Reply via email to