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

Telegraf stopped working after update to 2.7

pfSense Packages
8
13
2.1k
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.
  • S
    spaceboy
    last edited by Oct 1, 2023, 4:43 PM

    Hi, until a couple of weeks ago i was happily using Telegraf on 2.6 to send data to an influxdb. On upgrading to 2.7 i get the following crash report

    Crash report begins. Anonymous machine information:

    amd64
    14.0-CURRENT
    FreeBSD 14.0-CURRENT #1 RELENG_2_7_0-n255866-686c8d3c1f0: Wed Jun 28 04:21:19 UTC 2023 root@freebsd:/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/obj/amd64/LwYAddCr/var/jenkins/workspace/pfSense-CE-snapshots-2_7_0-main/sources/FreeBSD-src-REL

    Crash report details:

    PHP Errors:
    [27-Sep-2023 23:32:36 Europe/London] PHP Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /usr/local/pkg/telegraf.inc:132
    Stack trace:
    #0 /usr/local/pkg/telegraf.inc(132): implode(',', NULL)
    #1 /etc/inc/pkg-utils.inc(775) : eval()'d code(1): telegraf_resync_config()
    #2 /etc/inc/pkg-utils.inc(775): eval()
    #3 /etc/inc/pkg-utils.inc(899): eval_once(' telegra...')
    #4 /etc/rc.packages(76): install_package_xml('Telegraf')
    #5 {main}
    thrown in /usr/local/pkg/telegraf.inc on line 132
    [27-Sep-2023 23:32:45 Europe/London] PHP Fatal error: Uncaught TypeError: implode(): Argument #1 ($pieces) must be of type array, string given in /usr/local/pkg/telegraf.inc:132
    Stack trace:
    #0 /usr/local/pkg/telegraf.inc(132): implode(',', NULL)
    #1 /etc/inc/pkg-utils.inc(709) : eval()'d code(1): telegraf_resync_config()
    #2 /etc/inc/pkg-utils.inc(709): eval()
    #3 /etc/rc.start_packages(66): sync_package('Telegraf')
    #4 {main}
    thrown in /usr/local/pkg/telegraf.inc on line 132

    No FreeBSD crash data found.

    I saw some posts back in April on a similar topic but they didnt really go anywhere. i tried uninstalling and reinstalling the plugin but thats about the extent of my expertise here.

    Anyone, any ideas? Cheers

    V 1 Reply Last reply Jul 28, 2024, 11:23 AM Reply Quote 0
    • B
      bmeeks
      last edited by bmeeks Oct 1, 2023, 6:18 PM Oct 1, 2023, 6:17 PM

      From the PHP errors generated, it appears nobody has updated the Telgraf package for PHP 8.1 and higher. Or if they did, they missed some areas of the code that are still incompatible with the PHP 8.1 and higher language version used in pfSense 2.7 and up.

      There is nothing you can do on your end unless you manually edit/rewrite the PHP source code files for the package. A true fix will take action on the part of the pfSense package creator/maintainer.

      S 1 Reply Last reply Oct 4, 2023, 10:59 PM Reply Quote 1
      • S
        spaceboy @bmeeks
        last edited by Oct 4, 2023, 10:59 PM

        @bmeeks thanks! oh well, thats unfortunate - although does that mean i'm the only pfsense user using Telegraf on 2.7?

        definitely no possibility of me fixing it - i will wait.

        cheers!

        V M 2 Replies Last reply Oct 4, 2023, 11:24 PM Reply Quote 0
        • V
          vasquezmi @spaceboy
          last edited by Oct 4, 2023, 11:24 PM

          @spaceboy I also have issues with the latest update of 2.7 well actually pfsense plus 23.05.01 which is 2.7 ce.

          I had mine running fine and then I had to do a reinstall. Doing that broke everything. I know that I had pfsense running version after version going up.

          B 1 Reply Last reply Oct 4, 2023, 11:54 PM Reply Quote 0
          • M
            michmoor LAYER 8 Rebel Alliance @spaceboy
            last edited by Oct 4, 2023, 11:51 PM

            @spaceboy please open a redmine with your php output..

            Firewall: NetGate,Palo Alto-VM,Juniper SRX
            Routing: Juniper, Arista, Cisco
            Switching: Juniper, Arista, Cisco
            Wireless: Unifi, Aruba IAP
            JNCIP,CCNP Enterprise

            S 1 Reply Last reply Oct 10, 2023, 9:06 PM Reply Quote 0
            • B
              bmeeks @vasquezmi
              last edited by bmeeks Oct 5, 2023, 10:39 PM Oct 4, 2023, 11:54 PM

              @vasquezmi said in Telegraf stopped working after update to 2.7:

              I had mine running fine and then I had to do a reinstall. Doing that broke everything. I know that I had pfsense running version after version going up.

              pfSense 2.7.0 CE and pfSense Plus 23.01 made a big jump with the PHP language package from version 7.x to 8.1. The PHP upstream developer team made many alterations to the way PHP behaves. Chief among those were that it stopped automatically fixing things invisibly using its "best guest" of what the programmer may have intended. This involved automatic conversions between strings and numbers. It also started enforcing some formerly optional rules about how arrays were defined and accessed. What were once warnings that were suppressed unless optionally enabled became hard-stop errors with 8.x of PHP.

              PHP is what the entire web GUI on pfSense is written in. So, that meant a ton of pfSense PHP code had to be changed. Little tidbits are still showing up in the pfSense base that need fixing. The third-party packages have issues as well. Some have been fixed, but certainly not all. It depends on whether the package has a currently active maintainer or not. If the maintainer is not highly involved and staying on top of the PHP changes, then his package will have problems on the newest pfSense versions.

              1 Reply Last reply Reply Quote 1
              • S
                spaceboy @michmoor
                last edited by Oct 10, 2023, 9:06 PM

                @michmoor done! cheers

                1 Reply Last reply Reply Quote 0
                • S
                  spaceboy
                  last edited by Jan 21, 2024, 2:55 PM

                  hello - sorry to say that this issue still persists.

                  i logged the issue with redmine https://redmine.pfsense.org/issues/14861 and as far as i can see i was told it was not reproducible. in the meantime i have updated to 2.7.2 but nothing has changed. Telegraf does not work and i still get the telegraf errors as previously reported.

                  in the meantime the following has also happened:

                  • the hard disk in my router died and when i restored a backup that included my Telegraf config, i could at least see the option to access it in the menu and the status of the service (stopped, would not start). i still got the PHP errors
                  • if i remove the Telegraf plugin the errors stop, but on reinstalling the plugin, i'm back to not being able to access the Telegraf config.
                  • i'm also getting other errors with the Telegraf plugin installed. randomly HaProxy and Snort services stop and HaProxy doesnt start automatically on boot, but does manually.

                  I'm honestly at the point of a clean start to see if i can get Telgraf working, because I'm already at the limit of my own knowledge. or does this seem recoverable? cheers

                  1 Reply Last reply Reply Quote 0
                  • W
                    wblanton
                    last edited by Feb 20, 2024, 10:10 PM

                    I want to report that I'm having the same issue with 23.09.1 on the 7100-1U. It's happening on multiple devices, and I think it's related to gateway alarms, but I can't say for sure.

                    The only fix for me at the time is service watchdog package.

                    1 Reply Last reply Reply Quote 0
                    • P
                      pavlos
                      last edited by Jul 19, 2024, 4:48 PM

                      Let me add some details ... I have two firewalls, both CE 2.7.2 but they have different built dates.

                      vault

                      login-to-view

                      zotac

                      login-to-view

                      On vault, I cannot install telegraf, it throws the php error, line 132 during pkg install.

                      On zotac, I CAN install telegraf, configure it to ping 8.8.8.8 and 1.1.1.1, it writes to the database and I can see the dashboard in grafana. But ... if I change telegraf settings and add at the custom box at the bottom
                      [[inputs.ping]]
                      urls = ["8.8.8.8","1.1.1.1"]
                      count = 5

                      telegraf blows up with the php error 132

                      The different built dates are confusing, why are there two of them?

                      Both firewalls run the watchdog service to monitor unbound and restart it.

                      1 Reply Last reply Reply Quote 0
                      • V
                        Vulcan_ @spaceboy
                        last edited by Jul 28, 2024, 11:23 AM

                        @spaceboy I experienced the same issue. I researched several articles to solve it and finally managed to fix it. I have summarized the solution on my blog. If you haven't solved it yet, I hope this helps!

                        How to Fix Telegraf Errors After Upgrading to pfSense 2.7

                        P 1 Reply Last reply Jul 28, 2024, 2:11 PM Reply Quote 0
                        • P
                          pavlos @Vulcan_
                          last edited by Jul 28, 2024, 2:11 PM

                          @Vulcan_ thank you for the detailed analysis.

                          The question remains, why different built dates? 2.7.2 stable should have a frozen repo. All of us who d/l pfsense CE 2.7.2 should have the same built date.

                          Second, your analysis is very clear, how come the Developer on redmine claims he cannot reproduce the issue?

                          P 1 Reply Last reply Sep 25, 2024, 4:29 PM Reply Quote 0
                          • P
                            pfpv @pavlos
                            last edited by Sep 25, 2024, 4:29 PM

                            @pavlos said in Telegraf stopped working after update to 2.7:

                            The question remains, why different built dates? 2.7.2 stable should have a frozen repo. All of us who d/l pfsense CE 2.7.2 should have the same built date.

                            Very interesting. I stumbled upon this post looking for something else. Well, my build date is different from your two:
                            2.7.2-RELEASE (amd64)
                            built on Wed Dec 6 15:10:00 EST 2023
                            FreeBSD 14.0-CURRENT

                            I wonder what's up with that.

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