Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pfSense Grafana Dashboard is not pulling data from InfluxDB #54

Open
the-porkchop-express opened this issue Jan 20, 2022 · 2 comments
Open

Comments

@the-porkchop-express
Copy link

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
Copy link

faandg commented Feb 7, 2022

@the-porkchop-express it works as-is but needs a special mapping in influxdb if you're using v2. Check out:
#33 (comment)
#44 (comment)

@the-porkchop-express
Copy link
Author

the-porkchop-express commented Feb 9, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants