apache-pulsar-grafana-dashboard icon indicating copy to clipboard operation
apache-pulsar-grafana-dashboard copied to clipboard

Update Zookeeper dashboard

Open codelipenghui opened this issue 3 years ago • 1 comments

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

codelipenghui avatar Sep 10 '21 00:09 codelipenghui

There is now a dashboards.template/zookeeper-3.6.json.j2, but it fails to render due to the use of the following variables unknown to Jinja:

  • {{instance}}. Should this be $instance?
Traceback (most recent call last):
  File "/tmp/.local/bin/j2", line 8, in <module>
    sys.exit(main())
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 202, in main
    output = render_command(
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 186, in render_command
    result = renderer.render(args.template, context)
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 85, in render
    return self._env \
  File "/tmp/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/tmp/.local/lib/python3.8/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/tmp/src/apache-pulsar-grafana-dashboard/dashboards.template/zookeeper-3.6.json.j2", line 140, in top-level template code
    "legendFormat": "{{instance}} znode_count",
jinja2.exceptions.UndefinedError: 'instance' is undefined
  • {{key}} as in:
Traceback (most recent call last):
  File "/tmp/.local/bin/j2", line 8, in <module>
    sys.exit(main())
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 202, in main
    output = render_command(
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 186, in render_command
    result = renderer.render(args.template, context)
  File "/tmp/.local/lib/python3.8/site-packages/j2cli/cli.py", line 85, in render
    return self._env \
  File "/tmp/.local/lib/python3.8/site-packages/jinja2/environment.py", line 1291, in render
    self.environment.handle_exception()
  File "/tmp/.local/lib/python3.8/site-packages/jinja2/environment.py", line 925, in handle_exception
    raise rewrite_traceback_stack(source=source)
  File "/tmp/src/apache-pulsar-grafana-dashboard/dashboards.template/zookeeper-3.6.json.j2", line 448, in top-level template code
    "legendFormat": "write_per_namespace:{{key}}",

Bklyn avatar Mar 23 '22 13:03 Bklyn