How to save edits to collectd.conf?

Hi
I had plugin uptime installed previously and did a back-up/restore of the configuration after a firmware flash. In the new system, I dont want to install plugin uptime but the line "LoadPlugin uptime" still exists in /etc/collectd.conf from the restored backup.

I tried editing manually using vim both /etc and /var/etc/collectd.conf to delete the line and restart collectd and luci_statistics but no luck. The deleted line comes back.

I keep seeing this error logged in system logs - "daemon.err collectd[4399]: Error: Parsing the config file failed!" and I suspect the non-existant plugin is to blame.

I am unable to view any graphs due to this parsing error.

Thanks

The actual resolution to not seeing graphs was resolved by these steps:

  1. install uptime or any missing plugin for which the config line exists
  2. uncheck disable the plugin under Luci -> Statistics ->Setup
  3. immediately remove the previously installed plugin
  4. Restart collectd and luci_statistics

These steps removed the parsing errors and graphs are now generated.

However my original question still remains - from where is the original configuration overwriting my edits? I thought /overlay was rw and replaced /var/etc/ but looks like there is another immutable source that overrides my edits in /etc.

When you use LuCI statistics, it overwrites the native collectd config each time it starts. LuCI statistics uci config gets transformed to collectd.conf

https://git.openwrt.org/?p=project/luci.git;a=blob;f=applications/luci-app-statistics/root/usr/bin/stat-genconfig;h=b03b547d481a4d7d3532ac3b15239f13e77abe21;hb=HEAD

In a sense, LuCI statistics hijacks the underlying collectd.

1 Like