<div dir="ltr">Salvete,<div><br></div><div>I tried to grok the Chains feature and how to handle varying configs across server types.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>But for my config management it is easiest if I can drop in .d snippets. </div><div><br></div><div>However from figured, I can only configure the PostCache chain once. Multiple definitions did not work, I think.</div><div><br></div><div>So I tried this approach, and it *seems* to work, but I still get weird parse errors during startup:</div><div><br></div><div><div># head -n 50 /etc/collectd/collectd.conf.d/6* | grep -v "#"</div><div>==> /etc/collectd/collectd.conf.d/60-postcache-chain-head.conf <==</div><div><br></div><div>LoadPlugin match_regex</div><div><br></div><div>PostCacheChain "PostCache"</div><div><br></div><div><br></div><div><Chain "PostCache"></div><div><br></div><div>==> /etc/collectd/collectd.conf.d/61-postcache-chain-default.conf <==</div><div><br></div><div><br></div><div>  <Rule "route_metrics"></div><div>    <Match "regex"></div><div>      Plugin "^apache|cgroups|cpu|df|disk|entropy|interface|load|memory|nginx|processes|protocols|swap|tcpconns|uptime$"</div><div>    </Match></div><div>    <Target "write"></div><div>      Plugin "write_graphite/techops"</div><div>    </Target></div><div>  </Rule></div><div><br></div><div><br></div><div>==> /etc/collectd/collectd.conf.d/62-postcache-chain-ceph.conf <==</div><div>  <Rule "route_metrics"></div><div>    <Match "regex"></div><div>      Plugin "^ceph$"</div><div>    </Match></div><div>    <Target "write"></div><div>      Plugin "write_graphite/sysadmtest"</div><div>    </Target></div><div>  </Rule></div><div><br></div><div>==> /etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf <==</div><div><br></div><div></Chain></div></div><div><br></div><div><br></div><div>And here are the relevant lines after startup. What do they mean, and why do they occur multiple times?</div><div><br></div><div>Does each snippet have to be valid in itself? Or do they get concatenated and then parsed?</div><div><br></div><div><br></div><div><div>Okt 29 16:33:18 server systemd[1]: Stopped Statistics collection and monitoring daemon.</div><div>Okt 29 16:33:18 server systemd[1]: Starting Statistics collection and monitoring daemon...</div><div>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</div><div>Okt 29 16:33:18 server collectd[483069]: yyparse returned error #1</div><div>Okt 29 16:33:18 server collectd[483069]: configfile: Cannot read file `/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf'.</div><div>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</div><div>Okt 29 16:33:18 server collectd[483069]: yyparse returned error #1</div><div>Okt 29 16:33:18 server collectd[483069]: configfile: Cannot read file `/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf'.</div><div>Okt 29 16:33:18 server collectd[483069]: Created new plugin context.</div><div>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</div><div>Okt 29 16:33:18 server collectd[483074]: yyparse returned error #1</div><div>Okt 29 16:33:18 server collectd[483074]: configfile: Cannot read file `/etc/collectd/collectd.conf.d/60-postcache-chain-head.conf'.</div><div>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</div><div>Okt 29 16:33:18 server collectd[483074]: yyparse returned error #1</div><div>Okt 29 16:33:18 server collectd[483074]: configfile: Cannot read file `/etc/collectd/collectd.conf.d/69-postcache-chain-tail.conf'.</div><div>Okt 29 16:33:18 server collectd[483074]: Created new plugin context.</div><div>Okt 29 16:33:18 server systemd[1]: Started Statistics collection and monitoring daemon.</div><div>Okt 29 16:33:18 server collectd[483074]: Systemd detected, trying to signal readyness.</div><div><br></div></div></div>