Giter Site home page Giter Site logo

Comments (6)

smilebasti avatar smilebasti commented on July 18, 2024

Hi, thanks for the Issue.

Is this more useful? https://github.com/smilebasti/npmGrafStats/wiki/Grafana-installation

from npmgrafstats.

obsidiangroup avatar obsidiangroup commented on July 18, 2024

Hi, thanks for the Issue.

Is this more useful? https://github.com/smilebasti/npmGrafStats/wiki/Grafana-installation

Is setting the organization to 'npmgrafstats' required?

I'm running into issues trying to run two separate instances of npmGrafStats, both pointed to the same InfluxDB but different buckets.

I wanted a dashboard that also included stats on my local-ips, which by default are filtered, so I made some changes to the two scripts and the Getipinfo.py. This version works with no issues.

I deployed a second container with no modifications and pointed it to a separate bucket. There is data in the bucket, but the Grafana dashboard is empty.

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

Interesting to hear.

The Grafana Dashboard has the bucket hardcoded:

from(bucket: "npmgrafstats")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r._field == "Domain")
  |> group(columns: ["Domain"])
  |> count()
  |> drop(columns: ["host", "_field", "_measurement", "_start", "_stop"])

The organization is not. Maybe sending the npmGrafStats data to two different organizations both with a bucket called npmgrafstats.
Or you change the from(bucket: "npmgrafstats") in every panel to your needs.

from npmgrafstats.

obsidiangroup avatar obsidiangroup commented on July 18, 2024

Or you change the from(bucket: "npmgrafstats") in every panel to your needs.

You know I looked at the query and saw that but it didn't register. Updating does correct that.

Instead of hardcoding, would it be possible to obtain the default bucket that you've defined in your datasources? Or, maybe add to the documentation that if you're running multiple instances on the same influxdb, to use different organizations?

As I said, the only reason I did this was I wanted a dashboard that showed local stats. Maybe a config option to track internal/local stats. Since obviously if you pass an RFC1918 address to response = reader.city(str(sys.argv[1])) will result in an error, if the ip is in my block, it instead uses response = reader.city(os.getenv('HOME_IPS')).

I could possibly submit a PR that adds this as an option.

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

Ok good.

I will have a look at the Grafana Flux query if it accepts the default bucket. Anyway i will add the separate organization to the wiki.

With Issue #15 the HOME_IPS variable can be replaced. Maybe I can replace it with the option to monitor internal calls.

from npmgrafstats.

smilebasti avatar smilebasti commented on July 18, 2024

The following is using the default bucket of the Dashboard. Will update the Dashboard in the next release to use this.

from(bucket: v.defaultBucket)
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)

I will leave the issue open until the internal IP's can be tracked

from npmgrafstats.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.