jdbranham / grafana-diagram

A Grafana plugin to visualize metrics in a diagram using flow charts, gantt charts, sequence diagrams, or class diagrams
https://jdbranham.github.io/grafana-diagram/
Apache License 2.0
447 stars 87 forks source link

Adding a panel: diagram doesn't appear in list #19

Closed jshook closed 5 years ago

jshook commented 7 years ago

For both grafana 3.1.1 and latest (4..), I can install the diagram plugin, see it in the plugins screen, but then not see it available in a dashboard when I "add a panel" now_you_see_it now_you_dont

This is via docker images for both version, using the following method for testing the plugin addition:

docker exec -i -t grafana /usr/sbin/grafana-cli plugins install jdbranham-diagram-panel
docker restart grafana
coussej commented 7 years ago

Maybe something to do with browser cache? I had the same when installing the plugin, even after restarting grafana, but a hard refresh in chrome did the trick.

jshook commented 7 years ago

perhaps, but that would still be a cache management bug, most likely. I'll verify whether or not that fixes it.

ksugana commented 7 years ago

set it up on REL-7 we have the same problem.

jdbranham commented 7 years ago

do you see the "settings > panels > jdbranham-diagram-panel" in the object [you can use the javascript console in the browser window] -

window.grafanaBootData

asifmohammedgithub commented 7 years ago

Hi Jdbranham

I have the same issue and no i don't see "settings > panels > jdbranham-diagram-panel" in the object window.grafanaBootData

jdbranham commented 7 years ago

@asifmohammedgithub Are you also using the docker image?

Do you see anything in the logs about loading the plugin, and do you see the plugin folder in "/var/lib/grafana/plugins" [or wherever your plugins are located?]

ksugana commented 7 years ago

Plugin folder is created. I do not see anything in the logs. even enabling debug does not log anything.

ksugana commented 7 years ago

in settings i do not see any panel.

jdbranham commented 7 years ago

using the CLI tool, do you see the plugin installed?

http://docs.grafana.org/plugins/installation/

grafana-cli plugins ls

ksugana commented 7 years ago

yes it does show it . grafana-cli plugins ls [sudo] password for ksugana: installed plugins: jdbranham-diagram-panel @ 1.3.0

Restart grafana after installing plugins .

jdbranham commented 7 years ago

Are you using a web front end like Apache or Nginx? Also, have you tried logging out and in of Grafana?

asifmohammedgithub commented 7 years ago

Hi Guys I got it to work it turned out to be a browser caching issue. When i use firefox private tab i can see the jdbranham plugin.

This seems to be an issue i don't even see new data source I add without clearing my cache or using a private tab. Please investigate, Thanks

asifmohammedgithub commented 7 years ago

Ok, finally got it to work. There are two thing you could try actually.

  1. The browser caching issue i mentioned above - Try this first
  2. It may be a browser caching issue so try opening grafana in a private tab
    There was a permissions error for plugin in /var/log.grafana.log. So after chown -R grafana:grafana on the plugin directory.
jshook commented 7 years ago

Were the cache controls fixed for this?

ksugana commented 7 years ago

Nope did not work for me, I gave up on it for now.thanks for the reply

On Nov 9, 2016 11:05 AM, "Jonathan Shook" notifications@github.com wrote:

We're the cache controls fixed for this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jdbranham/grafana-diagram/issues/19#issuecomment-259497197, or mute the thread https://github.com/notifications/unsubscribe-auth/AK1_onGFjpjYjvIiYucd_kV1VfvZqRgzks5q8hmMgaJpZM4KXV74 .

jshook commented 7 years ago

@jdbranham Can we keep this open until we can get an upstream fix or something on the radar? It is an actual issue.

jdbranham commented 7 years ago

@jshook Have you installed any other plugins in this Grafana instance? If so, do they appear in the list?

rohit-gandhe commented 7 years ago

I have the same problem. I installed using brew. Grafana seems to show plugins dir as /usr/local/Cellar/grafana/4.1.1/share/grafana/data/plugins according to grafana startup logs but when I install plugins using grafana-cli, they are installed in /usr/local/var/lib/grafana/plugins. Even when I copy the plugins from one to another, it doesn't show.

grafana-cli plugins ls shows all the plugins but can't see them on the UI.

rohit-gandhe commented 7 years ago

Actually, after moving the plugin from /usr/local/var/lib/grafana/plugins to /usr/local/Cellar/grafana/4.1.1/share/grafana/data/plugins it does show up in the list.

rahuldivgan commented 7 years ago

Had the same issue, looks like browser cache again. When opened in an incognito mode, it worked.

praganeshpatel commented 6 years ago

I have same issue, try all the option listed above. Still panel not show in GUI -list as well not show in plugin list inside GUI. It shows in command line.

installed plugins: jdbranham-diagram-panel @ 1.4.3

Restart grafana after installing plugins .

/var/lib/grafana/plugins # service grafana-server restart

Stopping Grafana Server: ... [ OK ] Starting Grafana Server: ... [ OK ]

/var/lib/grafana/plugins # grafana-cli plugins ls

installed plugins: jdbranham-diagram-panel @ 1.4.3

I tried different browser including chrome Incognito/firefox-private mode, change permission on plugin folder from root to grafana removed/reinstall plugin nothing works and FYI i am using grafana version 4.6.0 I am running it on rhel7 vm.

jbflowers commented 6 years ago

Yup similar issue here. Permissions are set to "grafana:grafana" for the plugins directory in "/var/lib/grafana/plugins". The grafana-cli ls command is showing the diagram plugin installed, however Grafana admin and panels do not show it. Using an influxDB datasource with no other plugins installed. Also tried in a private browsing window with no success.

humbertowanderley commented 6 years ago

Same issue here. all plugins are installed but only the grafana-diagram don't appears on UI. I can see it installed on grafana CLI... tested in diferents browsers, with clean cache, but it is'nt appearing... grafana version 4.6, I'm running it in a docker container with the official image.

jdbranham commented 6 years ago

Do you see anything in the logs regarding the plugin?

tmagma commented 6 years ago

Hi, I have the same problem, this is listed on the grafana.log:

t=2017-11-27T10:40:56-0300 lvl=eror msg="Plugins: Failed to load plugin json file: /var/lib/grafana/plugins/jdbranham-diagram-panel/dist/plugin.json, err: json: cannot unmarshal string into Go struct field PluginInfo.author of type plugins.PluginInfoLink"

grafana-cli plugins ls installed plugins: alexanderzobnin-zabbix-app @ 3.7.0 jdbranham-diagram-panel @ 1.4.3 vonage-status-panel @ 1.0.6

Any idea?

thank you

praganeshpatel commented 6 years ago

t=2017-11-21T14:47:00-0500 lvl=info msg="Starting plugin search" logger=plugins t=2017-11-21T14:47:00-0500 lvl=eror msg="Plugins: Failed to load plugin json file: /var/lib/grafana/plugins/jdbranham-diagram-panel/dist/plugin.json, err: json: cannot unmarshal string into Go struct field PluginInfo.author of type plugins.PluginInfoLink"

Thank You.

Praganesh Patel

Enterprise Storage Architecture

IT Cloud Services

p : 732-577-3437 / e : praganesh.k.patel@verizon.com

On Sat, Nov 25, 2017 at 12:14 AM, Jeremy notifications@github.com wrote:

Do you see anything in the logs regarding the plugin?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jdbranham_grafana-2Ddiagram_issues_19-23issuecomment-2D346919783&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=RNyiOvmLrrvnsx1O_I1g6ssqAcqwKs9VbXHpabrnK0A&m=PeSl_eof2jIx3HnhbRVpslUldYVNQXWc3twIrZXoQqY&s=zLJvqrsjnvtqroWpiqgjyVgK8_bih9poOe4rCmIGW8c&e=, or mute the thread https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AgTxhAW6PrHxd06UMFz372bLLrDs7KN8ks5s56IsgaJpZM4KXV74&d=DwMCaQ&c=udBTRvFvXC5Dhqg7UHpJlPps3mZ3LRxpb6__0PomBTQ&r=RNyiOvmLrrvnsx1O_I1g6ssqAcqwKs9VbXHpabrnK0A&m=PeSl_eof2jIx3HnhbRVpslUldYVNQXWc3twIrZXoQqY&s=S8lTXY9wcxnktkYsVLDHyCDW_fq_l_-P8ZO1LC5iqro&e= .

joeltstephen commented 6 years ago

issue is resolved in my system. In your grafana.ini under the path section specify the path of your grafan-diagram plugin. Below is the screenshot for your reference image

//Regards Joel T Stephen

jdbranham commented 6 years ago

To summarize -

Be sure to clear your cache . Check the log for any plugin initialization issues. Upgrade to the latest version. Confirm the grafana.ini has the correct path to the plugin directory.

This would be good information to have in a wiki or on a main site. #18

jbflowers commented 6 years ago

OK was getting this error in the Grafana logs:

t=2017-12-11T14:35:34-0500 lvl=info msg="Starting plugin search" logger=plugins t=2017-12-11T14:35:34-0500 lvl=eror msg="Plugins: Failed to load plugin json file: /var/lib/grafana/plugins/jdbranham-diagram-panel/dist/plugin.json, err: json: cannot unmarshal string into Go struct field PluginInfo.author of type plugins.PluginInfoLink"

Deleted the existing plugin and reinstalled most up to date as per jdbranham's advice above. Looks like the plugin is loading now!

jenas6423 commented 5 years ago

Hi,

I have done all of above. But the plugins still not shown in UI. Please find my logfile as below:

t=2019-08-07T00:16:14+0800 lvl=info msg="Config loaded from" logger=settings file=D:\Grafana\grafana/conf/defaults.ini t=2019-08-07T00:16:14+0800 lvl=info msg="Config loaded from" logger=settings file=D:\Grafana\grafana\conf\custom.ini t=2019-08-07T00:16:14+0800 lvl=info msg="Path Home" logger=settings path=D:\Grafana\grafana t=2019-08-07T00:16:14+0800 lvl=info msg="Path Data" logger=settings path=D:\Grafana\grafana\data t=2019-08-07T00:16:14+0800 lvl=info msg="Path Logs" logger=settings path=D:\Grafana\grafana\data\log t=2019-08-07T00:16:14+0800 lvl=info msg="Path Plugins" logger=settings path=D:\Grafana\grafana\data\plugins t=2019-08-07T00:16:14+0800 lvl=info msg="Path Provisioning" logger=settings path=D:\Grafana\grafana\conf\provisioning t=2019-08-07T00:16:14+0800 lvl=info msg="App mode production" logger=settings t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing SqlStore" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Connecting to DB" logger=sqlstore dbtype=sqlite3 t=2019-08-07T00:16:14+0800 lvl=info msg="Starting DB migration" logger=migrator t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing HTTPServer" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing InternalMetricsService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing RemoteCache" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing QuotaService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing LoginService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing PluginManager" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Starting plugin search" logger=plugins t=2019-08-07T00:16:14+0800 lvl=info msg="Registering plugin" logger=plugins name="Grouped Bar Chart" t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing RenderingService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing AlertingService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing DatasourceCacheService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing HooksService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing SearchService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing ServerLockService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing TracingService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing UsageStatsService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing UserAuthTokenService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing CleanUpService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing NotificationService" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing provisioningServiceImpl" logger=server t=2019-08-07T00:16:14+0800 lvl=info msg="Initializing Stream Manager" t=2019-08-07T00:16:14+0800 lvl=info msg="HTTP Server Listen" logger=http.server address=0.0.0.0:3000 protocol=http subUrl= socket= t=2019-08-07T00:16:14+0800 lvl=eror msg="Stopped HTTPServer" logger=server reason="listen tcp 0.0.0.0:3000: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted." t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped provisioningServiceImpl" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped NotificationService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped UserAuthTokenService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped TracingService" logger=server reason=nil t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped Stream Manager" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped CleanUpService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped RenderingService" logger=server reason=nil t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped InternalMetricsService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped RemoteCache" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped UsageStatsService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped AlertingService" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=info msg="Stopped PluginManager" logger=server reason="context canceled" t=2019-08-07T00:16:14+0800 lvl=eror msg="Server shutdown" logger=server reason="listen tcp 0.0.0.0:3000: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted."

jdbranham commented 5 years ago

Looks like the only plugin that was detected and load was "Grouped Bar Chart".
per your logs - _t=2019-08-07T00:16:14+0800 lvl=info msg="Registering plugin" logger=plugins name="Grouped Bar Chart"_

Is the diagram plugin located on your computere here? D:\Grafana\grafana\data\plugins\jdbranham-diagram-panel

Also, this log shows your server never successfully started, due to a port conflict. Was that a separate issue? It's possible you have two instances of Grafana running. Maybe a long running Grafana instance was never restarted after the diagram plugin was added.

akfaew commented 4 years ago

Uncommenting plugins = /var/lib/grafana/plugins in /etc/grafana/grafana.ini fixed it for me.