Coder Social home page Coder Social logo

streamnative / apache-pulsar-grafana-dashboard Goto Github PK

View Code? Open in Web Editor NEW
87.0 87.0 93.0 574 KB

Apache Pulsar Grafana Dashboard

License: Apache License 2.0

Dockerfile 0.32% Shell 1.20% Makefile 0.07% Jinja 98.41%
apache-pulsar grafana grafana-dashboard pub-sub pulsar

apache-pulsar-grafana-dashboard's People

Contributors

alexku7 avatar anonymitaet avatar bklyn avatar ciiiii avatar codelipenghui avatar congbobo184 avatar demogorgon314 avatar ericsyh avatar fossabot avatar fxbing avatar hangc0276 avatar heesung-sn avatar jennifer88huang-zz avatar jharris- avatar jiazhai avatar michaeljmarshall avatar rockybean avatar rvashishth avatar sijie avatar streamnativebot avatar toneill818 avatar tuteng avatar wolfstudy avatar yaalsn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apache-pulsar-grafana-dashboard's Issues

Missing dependency j2

When I run gemerate_dashboards.sh I got this error message.

➜  apache-pulsar-grafana-dashboard git:(master) ./scripts/generate_dashboards.sh prometheus-test.example.com pulsar-cluster-test
Setting PULSAR_PROMETHEUS_URL from script input.
PULSAR_PROMETHEUS_URL set to: prometheus-test.zhenguanyu.com
Setting PULSAR_CLUSTER from script input.
PULSAR_CLUSTER set to: pulsar-cluster-test
Using existing PULSAR_CUSTOM_PROMETHEUS environment variable.
PULSAR_CUSTOM_PROMETHEUS set to:
Using existing GF_LOKI_URL environment variable.
GF_LOKI_URL set to:
Using existing GF_LOKI_DATASOURCE_NAME environment variable.
GF_LOKI_DATASOURCE_NAME set to:
Generating Datasources ...
./scripts/generate_dashboards.sh: line 105: j2: command not found

CORS management

It should be nice to configure CORS allowed hosts from backend configuration in case of splitted frontend/backend runtimes and host.

[BUG] The generate script can not generate datasources

Error log:

root@c8faefc852da:/apache-pulsar-grafana-dashboard# ./scripts/generate_dashboards.sh http://172.17.0.2:9090 standaloneGenerating Datasources ...
Traceback (most recent call last):
  File "/usr/local/bin/j2", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/j2cli/cli.py", line 206, in main
    sys.argv[1:]
  File "/usr/local/lib/python3.6/dist-packages/j2cli/cli.py", line 186, in render_command
    result = renderer.render(args.template, context)
  File "/usr/local/lib/python3.6/dist-packages/j2cli/cli.py", line 87, in render
    .render(context) \
  File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/usr/local/lib/python3.6/dist-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/usr/local/lib/python3.6/dist-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/apache-pulsar-grafana-dashboard/target/datasources.yml", line 65, in top-level template code
    - name: "{{ GF_LOKI_DATASOURCE_NAME }}"
jinja2.exceptions.UndefinedError: 'GF_LOKI_DATASOURCE_NAME' is undefined

Improve support for observing multiple clusters

Currently, the charts have limited support for observing multiple independent Pulsar clusters, based on the cluster label. My suggestion is that the charts be improved to support multiple BookKeeper clusters and ZooKeeper clusters, and to do it in a standards-based way.

Specifically my ask is that job not be treated as a constant (bookie, etc.) but as representing a unique cluster. For example, imagine that I have two separate BK clusters. There'd be two Prometheus jobs configured, one for each BK cluster. The name of the job would be user-defined and likely represents the name of the BK cluster (e.g. bookkeeperset/cluster-1). For simple setups, the job name would likely be bookie as before.

This approach seems to be standards-based. From Prometheus docs (reference):

In Prometheus terms, an endpoint you can scrape is called an instance, usually corresponding to a single process. A collection of instances with the same purpose, a process replicated for scalability or reliability for example, is called a job.

I observe that the Prometheus UI and the Prometheus operator seem to assume this sort of setup. For example, the UI paints a given job in red if any of the instances of that job are down. This would make no sense if the job consisted of instances across numerous independent clusters. Meanwhile the Prometheus operator generates job names based on the ServiceMonitor name (which would be service-specific).

In some cases it may be necessary to provide a 'job selector' widget on the dashboard, which would set the job variable. Most of the queries seem to use $job already as a filter, which is good.

[BUG] generate_dashboards fail `jinja2.exceptions.UndefinedError: 'GF_LOKI_DATASOURCE_NAME' is undefined`

./scripts/generate_dashboards.sh http://localhost:9090 pulsar-19990
Setting PULSAR_PROMETHEUS_URL from script input.
PULSAR_PROMETHEUS_URL set to: http://localhost:9090
Setting PULSAR_CLUSTER from script input.
PULSAR_CLUSTER set to: pulsar-19990
Using existing PULSAR_CUSTOM_PROMETHEUS environment variable.
PULSAR_CUSTOM_PROMETHEUS set to:
Using existing GF_LOKI_URL environment variable.
GF_LOKI_URL set to:
Using existing GF_LOKI_DATASOURCE_NAME environment variable.
GF_LOKI_DATASOURCE_NAME set to:
Generating Datasources ...
Traceback (most recent call last):
File "/usr/local/bin/j2", line 10, in
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 206, in main
sys.argv[1:]
File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 186, in render_command
result = renderer.render(args.template, context)
File "/usr/local/lib/python2.7/dist-packages/j2cli/cli.py", line 87, in render
.render(context)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 1008, in render
return self.environment.handle_exception(exc_info, True)
File "/usr/local/lib/python2.7/dist-packages/jinja2/environment.py", line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File "/mnt/h/apache-pulsar-grafana-dashboard/target/datasources.yml", line 68, in top-level template code
url: "{{ GF_LOKI_URL }}"
jinja2.exceptions.UndefinedError: 'GF_LOKI_DATASOURCE_NAME' is undefined

The command in README need to be modified

ifconfig | grep "inet " | grep -v 127.0.0.1 | awk '{ print $2 }

I 'm running this command in Ubuntu 16.04 , the result is

addr:172.17.0.1
addr:192.168.247.129.

It doesn't just contain ip.

import template to existing grafana

I have already using the grafana dashboard, now i need to import the Pulsar template. Is there any Template ID is Available or How to Use this Template in the Existing Grafana Dashboard ?

Should fullfill datasource field in generated dashboard

If datasource field of variables or panels is empty, the dashboard will be invalid.
Seems jinja2 with following version doesn't render "{{ PULSAR_CLUSTER }}" correctly.

➜ jinja2 --version
jinja2-cli v0.8.2
 - Jinja2 v3.1.2

[Improve] The default variables query of panel pulsar-topics will trigger full query

In the panel pulsar-topics, the query for cluster/namespace/topic may hang prometheus.

"query": "{namespace=~\".+\"}",

"query": "{topic=~\".+\"}",

"query": "{cluster=~\".+\"}",

It will query all the metrics to find all the cluster/namespace/topics, which may cause prometheus crash.

Update Zookeeper dashboard

We have removed the AspectJ based metrics for ZooKeeper, we need to update the Zookeeper dashboard for Pulsar version which is greater than 2.8

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.