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

    Troubleshooting telegraf - influxdb

    Scheduled Pinned Locked Moved pfSense Packages
    3 Posts 2 Posters 2.8k 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.
    • M
      morlies
      last edited by

      Hi all, I try to configure telegraf on pfsense. My influxdb doesn't store any values.

      pfsense: 2.5 (development, update today)
      telegraf-1.12.1_1 (no updates available in pfsense)

      influx for logging ... runs in docker (latest influxdb:alpine)

      What I tested:
      Status in pfsense (status - services) ... active
      Log /var/log/telegraf ... empty, no logs in that folder

      Login to shell - influxdb reacts, password / user valid. Tested with dedicated user for pfsense db but also with admin user. This shows that network routing and also firewall doesn't block otherwise it wouldn't work from pfsense shell.

      [2.5.0-DEVELOPMENT][admin@pfSense24.localdomain]/root: curl -G http://192.168.1.100:8086/query -u +0}jRk5A:"xxxx" --data-urlencode "q=SHOW DATABASES"
      {"results":[{"statement_id":0,"series":[{"name":"databases","columns":["name"],"values":[["fhem"],["_internal"],["telegraf"],["fhem14d"],["Proxmox"],["pfsense"]]}]}]}
      

      Telegraf config check -- lots of output (normal telegraf values) no errors

      /usr/local/bin/telegraf -config=/usr/local/etc/telegraf.conf --test
      

      It worked in earlier versions but I didn't checked regularly. I guess it broke when I updated to dev-version.

      ==> How / where can I get more details? Telegraf configuration page doesn't give any configuration options for logging. I would like to see if telegraf plugin tries to send data at all ....

      Thx!

      1 Reply Last reply Reply Quote 0
      • M
        morlies
        last edited by

        Update: telegraf plugin adds ssl-config to configuration file although plain http is used. I removed the CA-line in the config and now it seems to work.

        	ssl_ca = "/usr/local/etc/telegraf.ca" <<-- removed
        
        1 Reply Last reply Reply Quote 1
        • F
          FoolCoconut
          last edited by

          Might help someone, I had similar issues, but it turns out my pfsense didn't trust the self signed CA that signed the influxDB cert. Found out by stopping the service:

          ps aux | grep tele
          kill -9 <PID>
          

          And then running telegraf manually:

          /usr/local/bin/telegraf -config=/usr/local/etc/telegraf.conf
          

          Note that the service restart/stop buttons in the web gui did not work for me, only the start button (which shows up after I killed the process)

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