OPNsense Forum

Archive => 21.1 Legacy Series => Topic started by: edz on February 11, 2021, 08:18:55 am

Title: Custom Telegraf conf
Post by: edz on February 11, 2021, 08:18:55 am
I'm moving across from pfSense and am poking around opnsense.

I've come across a scenario where I need to add a custom input into telegraf.conf to run a script and read CPU temp.  There is no ability to add custom inputs from the Telegraf inputs GUI and if I were to manually edit /usr/local/etc/telegraf.conf it is overwritten when telegraf or opnsense is restarted.

Is there a way to make custom configuration persistent?
Title: Re: Custom Telegraf conf
Post by: franco on February 11, 2021, 09:02:25 am
If you want to use custom configurations you should remove the plugin and install the service manually. This way you can keep the configuration and the system will not touch it. The only other thing you have to do is manually set up rc.conf settings for the respective service and the system will take care of autostart.

Otherwise go to https://github.com/opnsense/plugins/issues/new?assignees=&labels=&template=feature_request.md&title= and tell us about your use case to be able to add it to the plugin.


Cheers,
Franco
Title: Re: Custom Telegraf conf
Post by: edz on February 11, 2021, 09:27:41 am
Thanks Franco. I’ll try the manual approach first but your suggestion of raising a feature request is great, I’m sure others may benefit too.
Title: Re: Custom Telegraf conf
Post by: franco on February 11, 2021, 09:30:40 am
That's the general idea of why we insist on it :)


Thanks,
Franco