Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Custom telegraf.conf

    Scheduled Pinned Locked Moved pfSense Packages
    5 Posts 4 Posters 3.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pletch
      last edited by

      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

      H 1 Reply Last reply Reply Quote 0
      • L
        lodac
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • P
          pletch
          last edited by

          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

          L 1 Reply Last reply Reply Quote 0
          • L
            lveatch @pletch
            last edited by

            I know this is an old thread.

            If the telegraf.sh file included telegraf's --config-directory option, then we could add our own modifications without loose our unique setup during upgrade / re-installation.

            for example:
            --config-directory=/usr/local/etc/telegraf.d

            1 Reply Last reply Reply Quote 0
            • H
              hmh @pletch
              last edited by

              @pletch Can you share your custom scripts?

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.