Start service on boot
-
Hi. I'm using Telegraf to send stats to InfluxDB/grafana for monitoring. I used this tutorial to configure telegraf: https://sbaronda.com/2016/06/14/logging-pfsense-metrics-to-influxdb/
It works great but I just noticed that I need to manually start telegraf after a reboot of pfSense using "service telegraf start" over ssh. I have basically no experience at all with FreeBSD so I find it a bit hard to debug this on my own and my GoogleFu is weak today.
I've added telegraf_enable=YES to /etc/rc.conf as per that tutorial but I guess that's not enough?
Thanks.
//Stefan
-
I'm using collectd for the exact same thing. I start it with the Shellcmd package (System -> Package Manager -> Available Packages).
EDIT: The reason I prefer this over whatever way one would normally launch services on FreeBSD is that this gets included in your config and by extension any backups. One less thing to worry about if you need to restore from a backup.
-
I agree with carriage this can be accomplish by using the Shellcmd package.
-
Thanks for the help guys. I will try that.
So I would simply issue a "service telegraf start" on startup using shellcmd and that's it?
-
Thanks for the help guys. I will try that.
So I would simply issue a "service telegraf start" on startup using shellcmd and that's it?
I just used:
/usr/local/etc/rc.d/telagraf start
And that worked fine for me.
-
anyone got grafana template to share?