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

    Telegraf package for pfSense 2.3.5 and 2.4.0 snapshots is now available.

    pfSense Packages
    8
    15
    11.4k
    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.
    • O
      overcookedTOFU
      last edited by

      I think the contents of the password field are not being passed properly to the telegraf.conf file.

      Specifically, the password is being encoded to sanitize inputs, but is not being decoded before the characters are written to the config file.  See line 78 in telegraf.xml.

      The password in the telegraf.conf file ends up being the base64 encoding of the password entered in the password field.  With the wrong password in the configuration file, telegraf fails to connect to the influxdb database.

      One can work around the error by manually editing the telegraf.conf file located at /usr/local/etc/telegraf.conf to correct the password.

      Note: By default, influxdb does not require username/password authentication.  If authentication is not enabled on the influxdb server, then (as far as I know) telegraf will not complain about an incorrect password.

      1 Reply Last reply Reply Quote 0
      • F
        fbearoff
        last edited by

        @overcookedTOFU:

        I think the contents of the password field are not being passed properly to the telegraf.conf file.

        Specifically, the password is being encoded to sanitize inputs, but is not being decoded before the characters are written to the config file.  See line 78 in telegraf.xml.

        The password in the telegraf.conf file ends up being the base64 encoding of the password entered in the password field.  With the wrong password in the configuration file, telegraf fails to connect to the influxdb database.

        One can work around the error by manually editing the telegraf.conf file located at /usr/local/etc/telegraf.conf to correct the password.

        Note: By default, influxdb does not require username/password authentication.  If authentication is not enabled on the influxdb server, then (as far as I know) telegraf will not complain about an incorrect password.

        I am experiencing the same issue, the base64 encoding ends up in the password field of the telegraf.conf file. This does not persist through an upgrade either, I have to reset the file each time.

        1 Reply Last reply Reply Quote 0
        • ivorI
          ivor
          last edited by

          Please submit a bug on https://redmine.pfsense.org/

          Need help fast? Our support is available 24/7 https://www.netgate.com/support/

          1 Reply Last reply Reply Quote 0
          • L
            lordbob75
            last edited by

            Hopefully this isn't a stupid question: How do I install this?  I've tried a couple different ways but it can never find the package.

            I am running an SG-1000 if that matters.

            1 Reply Last reply Reply Quote 0
            • ivorI
              ivor
              last edited by

              @lordbob75:

              Hopefully this isn't a stupid question: How do I install this?  I've tried a couple different ways but it can never find the package.

              I am running an SG-1000 if that matters.

              System > Packages Manager > Available Packages.

              If you still cannot see it, update your pfSense version to the latest.

              Need help fast? Our support is available 24/7 https://www.netgate.com/support/

              1 Reply Last reply Reply Quote 0
              • L
                lordbob75
                last edited by

                @ivor:

                @lordbob75:

                Hopefully this isn't a stupid question: How do I install this?  I've tried a couple different ways but it can never find the package.

                I am running an SG-1000 if that matters.

                System > Packages Manager > Available Packages.

                If you still cannot see it, update your pfSense version to the latest.

                Aha, thought I was already on it.

                I just updated however, and I still don't see it listed.

                1 Reply Last reply Reply Quote 0
                • jimpJ
                  jimp Rebel Alliance Developer Netgate
                  last edited by

                  It's also amd64 only. If you're on 2.3.5 i386 or 2.4 on an SG-1000 you won't see it.

                  It's disabled on SG-1000 because it requires lang/go14 which does not build on ARM currently.

                  Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                  Need help fast? Netgate Global Support!

                  Do not Chat/PM for help!

                  1 Reply Last reply Reply Quote 0
                  • L
                    lordbob75
                    last edited by

                    @jimp:

                    It's also amd64 only. If you're on 2.3.5 i386 or 2.4 on an SG-1000 you won't see it.

                    It's disabled on SG-1000 because it requires lang/go14 which does not build on ARM currently.

                    Ah, of course!  :'(

                    Any idea if that's something that will work in the future?  Or is it never gonna happen?

                    I've been trying to figure out how to get data out to my monitoring database, but haven't managed to get anything working yet and this looked like the best option.

                    1 Reply Last reply Reply Quote 0
                    • F
                      fastjack
                      last edited by

                      Is there a way for Telegraf to deliver metrics about gateway latencies and packet loss?

                      I know that most of the metrics that Telegraf does deliver at the moment are just the built in input filters. I assume this needs some custom input filter that parses the output of dpinger, though I am not sure how to go about it.

                      1 Reply Last reply Reply Quote 0
                      • F
                        fastjack
                        last edited by

                        @fastjack:

                        Is there a way for Telegraf to deliver metrics about gateway latencies and packet loss?

                        Replying to myself here. I did a quick&dirty python script (not my native programming language) that generates metrics from dpinger stats. You can find it here: https://gist.github.com/fastjack/a0feb792a9655da7aa3e2a7a1d9f812f

                        Just drop it somewhere like /usr/local/libexec/telegraf/ (might have to create that directory) and make it executable.

                        Then add these lines to your telegraf.conf:

                        [[inputs.exec]]
                                commands = ["/usr/local/libexec/telegraf/gateways.py"]
                                timeout = "5s"
                                data_format = "influx"
                        

                        Adjust the path in commands if you copied the script somewhere else. Don't forget to restart Telegraf afterwards!

                        1 Reply Last reply Reply Quote 0
                        • F
                          fastjack
                          last edited by

                          While playing around with Telegraf I also noticed this in /var/log/telegraf.log:

                          2017-08-30T07:56:40Z E! Error writing to output [influxdb]: Could not write to any InfluxDB server in cluster
                          

                          The reason seems to be a bug during the generation of telegraf.conf. Besides the real [[outputs.influxdb]] section there is a second empty [[outputs.influxdb]] section generated. Once I removed that empty section the error messages disappeared.

                          1 Reply Last reply Reply Quote 0
                          • D
                            doktornotor Banned
                            last edited by

                            https://github.com/pfsense/FreeBSD-ports/pull/410

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