The pfSense Store

Author Topic: Custom telegraf.conf  (Read 194 times)

0 Members and 1 Guest are viewing this topic.

Offline pletch

  • Newbie
  • *
  • Posts: 5
  • Karma: +4/-0
    • View Profile
Custom telegraf.conf
« on: December 22, 2017, 07:57:13 am »
I just recently migrated my setup to a fresh 2.4.2 installation and decided to move to the use of the available telegraf package. Prior to the reinstallation of pfSense, I was using a manual installation of Telegraf along with a customized telegraf.conf file that fires off a couple of shell scripts at differing intervals for pushing data to influxdb. One script fires off pfctl to scrape pf queue metrics such as queue rate and packet drops for forwarding and the second initiates rrdtool to obtain the last recorded gateway ping value from the RRD database for forwarding. I ultimately plot all of this in Grafana to get a nice view of the performance of my QoS configuration.

My current issue is that I have been unable to determine how to configure the Telegraf package to allow me to use a customized conf file. I do not see any way to set up this customized version via the Web interface for the package.  As a workaround, I have tried manually copying over the customized telegraf.conf file to /usr/local/etc but the package periodically reinitializes and overwrites the customized version.  On a related note, I also don't really want to forward the default cpu & disk metrics that are set up by the package as default.

Am I missing something obvious or should I just move back to using a manual Telegraf installation since I am already messing under the hood with added shell scripts etc?

Tim

Offline lodac

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Custom telegraf.conf
« Reply #1 on: December 28, 2017, 09:47:16 am »
I am looking for a way to customize the telegraf package myself. I would find it extremely useful to have a checkbox to enable [[inputs.ping]] with a text box for urls =

Find that editing the config file manually, upon restart, it is wiped

Offline pletch

  • Newbie
  • *
  • Posts: 5
  • Karma: +4/-0
    • View Profile
Re: Custom telegraf.conf
« Reply #2 on: December 30, 2017, 12:21:39 pm »
I ultimately ended up editing the /usr/local/pkg/telegraf.inc file to start the package with my customized .conf file.  This allows me to stop / restart the package through the Web interface without issue.  Of course, the changes will not be persistent across a Telegraf package reinstall or upgrade but it works for now. 


Tim