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

Grafana Dashboard using Telegraf with additional plugins

Scheduled Pinned Locked Moved pfSense Packages
173 Posts 28 Posters 70.9k 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.
  • E
    erbalo @bigjohns97
    last edited by Jan 27, 2021, 8:28 PM

    @bigjohns97

    Thank you, which IP should i put here and late the port number 953 ?

    server = "127.0.0.1:953"

    E B 2 Replies Last reply Jan 27, 2021, 8:32 PM Reply Quote 1
    • E
      erbalo @erbalo
      last edited by Jan 27, 2021, 8:32 PM

      Should that be ok so?

      #!/bin/sh
      /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
      unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
      
      B 1 Reply Last reply Jan 27, 2021, 8:35 PM Reply Quote 0
      • B
        bigjohns97 @erbalo
        last edited by Jan 27, 2021, 8:33 PM

        @erbalo That server ip and port should be fine.

        1 Reply Last reply Reply Quote 0
        • B
          bigjohns97 @erbalo
          last edited by bigjohns97 Jan 27, 2021, 8:39 PM Jan 27, 2021, 8:35 PM

          @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

          Should that be ok so?

          #!/bin/sh
          /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
          unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
          

          When I tried running that command that was originally in there (your top line) it didn't work.

          E 1 Reply Last reply Jan 27, 2021, 8:42 PM Reply Quote 0
          • E
            erbalo @bigjohns97
            last edited by Jan 27, 2021, 8:42 PM

            @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

            @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

            Should that be ok so?

            #!/bin/sh
            /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
            unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
            

            When I tried running that command that was originally in there (your top line) it didn't work.

            Just it should be:

            #!/bin/sh
            unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
            

            ?

            B 1 Reply Last reply Jan 27, 2021, 8:46 PM Reply Quote 0
            • B
              bigjohns97 @erbalo
              last edited by Jan 27, 2021, 8:46 PM

              @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

              @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

              @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

              Should that be ok so?

              #!/bin/sh
              /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
              unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
              

              When I tried running that command that was originally in there (your top line) it didn't work.

              Just it should be:

              #!/bin/sh
              unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
              

              ?

              That is what I am running, correct, and it didn't affect any other metrics.

              E 1 Reply Last reply Jan 27, 2021, 9:13 PM Reply Quote 0
              • E
                erbalo @bigjohns97
                last edited by Jan 27, 2021, 9:13 PM

                @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

                @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

                @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

                @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

                Should that be ok so?

                #!/bin/sh
                /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
                unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
                

                When I tried running that command that was originally in there (your top line) it didn't work.

                Just it should be:

                #!/bin/sh
                unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
                

                ?

                That is what I am running, correct, and it didn't affect any other metrics.

                I don't receive any data to grafana, what can be wrong?

                B 1 Reply Last reply Jan 27, 2021, 9:20 PM Reply Quote 0
                • B
                  bigjohns97 @erbalo
                  last edited by bigjohns97 Jan 27, 2021, 9:31 PM Jan 27, 2021, 9:20 PM

                  @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

                  @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

                  @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

                  @bigjohns97 said in Grafana Dashboard using Telegraf with additional plugins:

                  @erbalo said in Grafana Dashboard using Telegraf with additional plugins:

                  Should that be ok so?

                  #!/bin/sh
                  /usr/local/sbin/unbound-control -c /var/unbound/unbound.conf $* | grep -vE 'thread[0-9]+'
                  unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
                  

                  When I tried running that command that was originally in there (your top line) it didn't work.

                  Just it should be:

                  #!/bin/sh
                  unbound-control -c /var/unbound/unbound.conf stats_noreset | grep total.num
                  

                  ?

                  That is what I am running, correct, and it didn't affect any other metrics.

                  I don't receive any data to grafana, what can be wrong?

                  Make sure the data source and table is the same on your side as what I posted.

                  @erbalo copy the JSON from above again I replaced some of my entries with variables so be more plug and play.

                  1 Reply Last reply Reply Quote 0
                  • V
                    von Papst @bigjohns97
                    last edited by Jan 28, 2021, 2:46 PM

                    @bigjohns97 got it running. But still missing CPU, memory and system load data. What am I missing?

                    B 1 Reply Last reply Jan 28, 2021, 2:53 PM Reply Quote 0
                    • B
                      bigjohns97 @von Papst
                      last edited by Jan 28, 2021, 2:53 PM

                      @von-papst This is just a single panel, add it to the dashboard being developed in this thread.

                      J 1 Reply Last reply Feb 23, 2021, 2:18 AM Reply Quote 0
                      • J
                        jpcapone @bigjohns97
                        last edited by Feb 23, 2021, 2:18 AM

                        This post is deleted!
                        1 Reply Last reply Reply Quote 0
                        • J
                          jpcapone
                          last edited by Feb 23, 2021, 3:04 AM

                          I think I am late to the party but I am trying to figure some things out. I am running pfsense in a vm on esxi 6.7. I was able to figure out enough to get most of the panels working but I think the scripts arent working. I am not super familiar with FreeBSD so I am finding it difficult to determine how to test run the scripts so that I can remediate. I am pretty sure the scripts arent running because all of the panels aren't populated with data and when I do a show measurements on the DB I get only the entries listed below. Any advice would be appreciated.
                          cpu
                          disk
                          diskio
                          mem
                          net
                          pf
                          processes
                          swap
                          system

                          B 1 Reply Last reply Feb 23, 2021, 1:47 PM Reply Quote 0
                          • B
                            bigjohns97 @jpcapone
                            last edited by Feb 23, 2021, 1:47 PM

                            @jpcapone This is the best way to troubleshoot the plugins

                            Taken from https://github.com/VictorRobellini/pfSense-Dashboard

                            36550fb1-a659-4d99-8e4b-7aa80294b608-image.png

                            J 2 Replies Last reply Feb 23, 2021, 6:55 PM Reply Quote 1
                            • J
                              jpcapone @bigjohns97
                              last edited by Feb 23, 2021, 6:55 PM

                              This post is deleted!
                              1 Reply Last reply Reply Quote 0
                              • J
                                jpcapone @bigjohns97
                                last edited by Feb 23, 2021, 7:05 PM

                                @bigjohns97
                                Thanks for that. I was able to figure out the issues with the plugins. Now I am just left with what I have pasted below. Can you please advise?

                                2021-02-23T19:01:58Z I! Loaded inputs: cpu disk diskio exec kernel logparser (2x) mem net pf processes swap system
                                2021-02-23T19:01:58Z I! Loaded aggregators:
                                2021-02-23T19:01:58Z I! Loaded processors:
                                2021-02-23T19:01:58Z I! Loaded outputs: influxdb
                                2021-02-23T19:01:58Z I! Tags enabled: host=xxxxpfSense.xxxxolutions.co
                                2021-02-23T19:01:58Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"xxxxpfSense.xxxxolutions.co", Flush Interval:10s
                                2021-02-23T19:01:58Z D! [agent] Initializing plugins
                                2021-02-23T19:01:58Z W! [inputs.logparser] The logparser plugin is deprecated; please use the 'tail' input with the 'grok' data_format
                                2021-02-23T19:01:58Z W! [inputs.logparser] The logparser plugin is deprecated; please use the 'tail' input with the 'grok' data_format
                                2021-02-23T19:01:58Z D! [agent] Connecting outputs
                                2021-02-23T19:01:58Z D! [agent] Attempting connection to [outputs.influxdb]
                                2021-02-23T19:01:58Z D! [agent] Successfully connected to outputs.influxdb
                                2021-02-23T19:01:58Z D! [agent] Starting service inputs
                                2021-02-23T19:01:58Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/dnsbl.log: no such file or directory
                                2021-02-23T19:01:58Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/ip_block.log: no such file or directory
                                2021-02-23T19:02:00Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/dnsbl.log: no such file or directory
                                2021-02-23T19:02:00Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/ip_block.log: no such file or directory

                                B 1 Reply Last reply Feb 23, 2021, 8:33 PM Reply Quote 0
                                • B
                                  bigjohns97 @jpcapone
                                  last edited by Feb 23, 2021, 8:33 PM

                                  @jpcapone said in Grafana Dashboard using Telegraf with additional plugins:

                                  @bigjohns97
                                  Thanks for that. I was able to figure out the issues with the plugins. Now I am just left with what I have pasted below. Can you please advise?

                                  2021-02-23T19:01:58Z I! Loaded inputs: cpu disk diskio exec kernel logparser (2x) mem net pf processes swap system
                                  2021-02-23T19:01:58Z I! Loaded aggregators:
                                  2021-02-23T19:01:58Z I! Loaded processors:
                                  2021-02-23T19:01:58Z I! Loaded outputs: influxdb
                                  2021-02-23T19:01:58Z I! Tags enabled: host=xxxxpfSense.xxxxolutions.co
                                  2021-02-23T19:01:58Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"xxxxpfSense.xxxxolutions.co", Flush Interval:10s
                                  2021-02-23T19:01:58Z D! [agent] Initializing plugins
                                  2021-02-23T19:01:58Z W! [inputs.logparser] The logparser plugin is deprecated; please use the 'tail' input with the 'grok' data_format
                                  2021-02-23T19:01:58Z W! [inputs.logparser] The logparser plugin is deprecated; please use the 'tail' input with the 'grok' data_format
                                  2021-02-23T19:01:58Z D! [agent] Connecting outputs
                                  2021-02-23T19:01:58Z D! [agent] Attempting connection to [outputs.influxdb]
                                  2021-02-23T19:01:58Z D! [agent] Successfully connected to outputs.influxdb
                                  2021-02-23T19:01:58Z D! [agent] Starting service inputs
                                  2021-02-23T19:01:58Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/dnsbl.log: no such file or directory
                                  2021-02-23T19:01:58Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/ip_block.log: no such file or directory
                                  2021-02-23T19:02:00Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/dnsbl.log: no such file or directory
                                  2021-02-23T19:02:00Z E! [inputs.logparser] Error in plugin: open /var/log/pfblockerng/ip_block.log: no such file or directory

                                  Looks like you aren't using pfblockerng is that the case?

                                  Are you now getting data on the influxdb side and in turn on your dashboard?

                                  J 2 Replies Last reply Feb 24, 2021, 12:41 AM Reply Quote 0
                                  • J
                                    jpcapone @bigjohns97
                                    last edited by Feb 24, 2021, 12:41 AM

                                    @bigjohns97
                                    yup, I am getting data but I am still not seeing the same measurements in my DB that you see in the in the troubleshooting section. Also, I had to turn on pfblockerng and now but I am still not getting any data from it in grafana. Any suggestions?
                                    9c0b0377-11f1-4e51-8e28-9fdd20cac828-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • J
                                      jpcapone @bigjohns97
                                      last edited by Feb 24, 2021, 1:46 AM

                                      @bigjohns97 I think I got it. No data was being generated because I wasn't surfing after I set up pfblockerng. I am very new to this as you can tell. Thanks for your help!!!!

                                      1 Reply Last reply Reply Quote 2
                                      • V
                                        VictorRobellini
                                        last edited by VictorRobellini Mar 5, 2021, 1:29 AM Mar 4, 2021, 11:53 PM

                                        I've made some updates to the dashboard. I would love feedback.

                                        https://github.com/VictorRobellini/pfSense-Dashboard/commit/520eea4f49b5107cb79e887ec94951c015d52a6e

                                        B 1 Reply Last reply Mar 6, 2021, 6:22 PM Reply Quote 2
                                        • B
                                          bigjohns97 @VictorRobellini
                                          last edited by Mar 6, 2021, 6:22 PM

                                          @victorrobellini said in Grafana Dashboard using Telegraf with additional plugins:

                                          I've made some updates to the dashboard. I would love feedback.

                                          https://github.com/VictorRobellini/pfSense-Dashboard/commit/520eea4f49b5107cb79e887ec94951c015d52a6e

                                          You didn't like my unbound cache hit panel above?

                                          V 3 Replies Last reply Mar 6, 2021, 6:59 PM Reply Quote 0
                                          • First post
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                                            This community forum collects and processes your personal information.
                                            consent.not_received