VictorRobellini / pfSense-Dashboard

A functional and useful dashboard for pfSense that utilizes influxdb, grafana and telegraf
671 stars 187 forks source link

pfSense Grafana Dashboard is not pulling data from InfluxDB #54

Open the-porkchop-express opened 2 years ago

the-porkchop-express commented 2 years ago

Just set up pfSense, enabled Telegraf added the code below into additional telegraf config

[[outputs.influxdb_v2]]
  urls = ["http://192.168.1.159:8086/"]
  token = "influxdb token"
  organization = "Porkchop, LLC"
  bucket = "pfSense"

[[inputs.exec]]
    commands = [
        "/usr/local/bin/telegraf_pfifgw.php",
        "sh /usr/local/bin/telegraf_temperature.sh"
    ]
    data_format = "influx"

[[inputs.tail]]
    files = ["/var/log/pfblockerng/dnsbl.log"]
    data_format = "grok"
    from_beginning = false
    name_suffix = "_dnsbl_log"
    grok_timezone = "Local"
    grok_patterns = ["^%{WORD:blocktype}-%{WORD:blocksubtype},%{SYSLOGTIMESTAMP:timestamp:ts-syslog},%{IPORHOST:domain},%{IPORHOST:src_ip:tag},%{GREEDYDATA:req_agent},%{WORD:blockmethod},%{WORD:blocklist:tag},%{IPORHOST:tld:tag},%{WORD:feed_name:tag},%{GREEDYDATA:duplicateeventstatus}"]

[[inputs.tail]]
    files = ["/var/log/pfblockerng/ip_block.log"]
    data_format = "grok"
    from_beginning = false
    name_suffix = "_ip_block_log"
    grok_timezone = "Local"
    grok_patterns = ["^%{SYSLOGTIMESTAMP:timestamp:ts-syslog},%{NUMBER:rulenum},%{DATA:interface},%{WORD:friendlyname},%{WORD:action},%{NUMBER:ip_version},%{NUMBER:protocolid},%{DATA:protocol:tag},%{IPORHOST:src_ip:tag},%{IPORHOST:dest_ip:tag},%{WORD:src_port:tag},%{NUMBER:dest_port:tag},%{WORD:direction},%{WORD:geoip_code:tag},%{DATA:ip_alias_name},%{DATA:ip_evaluated},%{DATA:feed_name:tag},%{HOSTNAME:resolvedhostname},%{GREEDYDATA:clienthostname},%{GREEDYDATA:ASN},%{GREEDYDATA:duplicateeventstatus}"]

#[[inputs.unbound]]
#  server = "127.0.0.1:953"
#  binary = "/usr/local/bin/telegraf_unbound.sh"

I can check in InfluxDB and it is getting data from pfSense. However no data is making it into Grafana. I have tried using the ID from the Grafana page and also uploading the JSON (PFA) pfsense-json.txt.

In attached JSON file I have changed the influxdb and grafana versions and tried to see what other changes I need to make, but not sure.

Does this dashboard need to be updated to the most recent versions of influx and grafana? Please let me know if you know what I did wrong.

faandg commented 2 years ago

@the-porkchop-express it works as-is but needs a special mapping in influxdb if you're using v2. Check out: https://github.com/VictorRobellini/pfSense-Dashboard/issues/33#issuecomment-804361000 https://github.com/VictorRobellini/pfSense-Dashboard/issues/44#issuecomment-939524236

the-porkchop-express commented 2 years ago

I am using v2, I will review this tonight and see where my gaps are. Thank you!!!!!!

On Mon, Feb 7, 2022 at 6:12 PM faandg @.***> wrote:

@the-porkchop-express https://github.com/the-porkchop-express it works as-is but needs a special mapping in influxdb if you're using v2. Check out:

33 (comment)

https://github.com/VictorRobellini/pfSense-Dashboard/issues/33#issuecomment-804361000

44 (comment)

https://github.com/VictorRobellini/pfSense-Dashboard/issues/44#issuecomment-939524236

— Reply to this email directly, view it on GitHub https://github.com/VictorRobellini/pfSense-Dashboard/issues/54#issuecomment-1032030337, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPUYDOUNH27NJ53XKCKTJDU2BGXXANCNFSM5MNZJFBA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>