smilebasti / npmGrafStats

This project exports NginxProxyManager Logs to InfluxDB for displaying them in a Grafana Dashboard.
GNU General Public License v3.0
149 stars 10 forks source link

Grafana dashboard issue #31

Closed maxdd closed 11 months ago

maxdd commented 11 months ago

Hello, i've seen you are using the following two commands in the query

from(bucket: v.defaultBucket)

for me unless i change this to "npmgrafstats" as per the bucket name, it doesnt fetch data. How to i set the defaultBucket?

this link https://grafana.com/docs/grafana/latest/datasources/influxdb/query-editor/ is mentioning something but i'm wondering whether since i have many buckets it is better to change it to the proper one

Also how do i fill in the "domainquery:regex" below? If i leave it as such nothing can be seen while if i remove it instead it works

|> filter(fn: (r) => r["Domain"] =~ /^${domainquery:regex}$/)

if its fetching the domain from influx i guess i shall also change the variable with the proper bucket

import "influxdata/influxdb/schema"
schema.tagValues(
    bucket: v.defaultBucket,
    tag: "Domain"
)

Im failing to understand the goal of the filter though

smilebasti commented 11 months ago

The first issue: The default bucket can be set if in the Datasource InfluxDB the query language is set to Flux. (See the option at the bottom.)

image

smilebasti commented 11 months ago

The filter issue: not sure why it's not working for you. Are the panels in the lower rows in the Dashboard showing up normally for you? Only the upper half is filtered.

The filter adds the option (at the top of all panels) to show stats and the map for only one or multiple domain(s). If it's lagging you to much, you can remove the regex line. (I haven't found a better way to filter in the dashboard for a specific domain that doesn't lag)

maxdd commented 11 months ago

I have only one domain so maybe i cannot see any difference that's why