neuralfraud / grafana-prtg

A PRTG Datasource plugin for Grafana
181 stars 75 forks source link

Beta 3.0 Installation #18

Closed suckamucka closed 7 years ago

suckamucka commented 8 years ago

In testing beta 3.0, I dropped jasonlashua-prtg-datasource in public/app/plugins/datasource directory I was able to add the plugin, but it fails to display the configuration of the plugin where we can add login information and URL to the PRTG server.

suckamucka commented 8 years ago

Ok, I had to also copy files from dist and place them in the root of jasonlashua-prtg-datasource

neuralfraud commented 8 years ago

It goes in the data/plugins folder, not the public/app/plugins/datasource

I added that to the readme.md for the 3.0 branch. There's still a lot to be done so I will be sure to make that more clear!

On Tuesday, August 30, 2016, suckamucka notifications@github.com wrote:

Ok, I had to also copy files from dist and place them in the root of jasonlashua-prtg-datasource

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/18#issuecomment-243453027, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFtNwfxP4iJXsPuxs8TUg-15U5VhCSxks5qlDrqgaJpZM4Jwj8R .

suckamucka commented 8 years ago

I saw that in the readme.md, however grafana-3.1.1 doesn't have a data/plugins folder. The only things in the data folder are: logs, sessions

neuralfraud commented 8 years ago

When you start for the first time grafana will create those directories. It's kind of weird. If in doubt, check the Ini file.

Thanks!

On Tuesday, August 30, 2016, suckamucka notifications@github.com wrote:

I saw that in the readme.md, however grafana-3.1.1 doesn't have a data/plugins folder. The only things in the data folder are: logs, sessions

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/18#issuecomment-243465903, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFtN73lh4Lgjm-xvsuHpaa7YXA65hBlks5qlENLgaJpZM4Jwj8R .

suckamucka commented 8 years ago

Very strange. The directory was not created for me automatically. I created the data/plugins directory and placed jasonlashua-prtg-datasource inside. Still not able to activate the plugin

neuralfraud commented 8 years ago

Even after removing from app/plugins/datasource? It should show up in the startup console/log output.

Are you using Linux or Windows to run grafana? I haven't tested on Linux and I'm not sure what the default data directory is.

On Tuesday, August 30, 2016, suckamucka notifications@github.com wrote:

Very strange. The directory was not created for me automatically. I created the data/plugins directory and placed jasonlashua-prtg-datasource inside. Still not able to activate the plugin

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/18#issuecomment-243505882, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFtN0uo7byLbWVQD6AiwR6J26qWLINcks5qlGCagaJpZM4Jwj8R .

suckamucka commented 8 years ago

Grafana on Windows.

←[32mINFO←[0m[08-30|14:57:26] Starting plugin search ←[32mlogg er←[0m=plugins ←[32mINFO←[0m[08-30|14:57:26] Server Listening ←[32mlogg er←[0m=server ←[32maddress←[0m=0.0.0.0:8080 ←[32mprotocol←[0m=http ←[32msubUrl←[

That is what is shown in the grafana-server.exe console log.

suckamucka commented 8 years ago

Do I still need to copy everything out of the dist folder and into the root of the data/plugins/jasonlashua-prtg-datasource directory?

neuralfraud commented 8 years ago

Assuming you downloaded the entire 3.0 branch, and you opened the .zip in explorer, you literally only need to drag the "jasonlashua-prtg-datasource" folder into the X:\Grafana-3.1.1\data\plugins directory.

suckamucka commented 8 years ago

I downloaded the whole zip. Once I extract I have [First image] then in src I have [Second Image] and finally in dist I have [Third Image]

Is this correct?

maindirectory srcdirectory distdirectory

ptcfast2 commented 8 years ago

Try GRAFANA FOLDER\bin\data\plugins

Mine was automatically created in there for whatever reason. Put it there and it worked like a charm.

neuralfraud commented 8 years ago

Because grafana is kind of stupid. It uses the base directory from the execution context!

So I launch mine from the app folder...if you launch from bin, that explains it. Thanks man!

On Wednesday, August 31, 2016, ptcfast2 notifications@github.com wrote:

Try GRAFANA FOLDER\bin\data\plugins

Mine was automatically created in there for whatever reason. Put it there and it worked like a charm.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/18#issuecomment-243944097, or mute the thread https://github.com/notifications/unsubscribe-auth/AIFtN4ABux6zN_VU4GKw50dTQlzqsKH-ks5qlh-BgaJpZM4Jwj8R .

suckamucka commented 8 years ago

Yes, I launched from the bin directory as well. I will move it back to \bin\data\plugins and try again

suckamucka commented 8 years ago

Able to add a graph but the values are showing "NaN" however in PRTG the values are showing correctly.

yossiv commented 8 years ago

How about Linux ubuntu? i put the directory on \var\lib\grafana\plugins and it didnt work . on windows it works perfect

neuralfraud commented 8 years ago

@suckamucka :

1 - are you using the grafana proxy feature? (you should be)

2 - per the installation instructions, did you update the PRTG registry key with the necessary header (see section regarding CORS)

neuralfraud commented 8 years ago

@yossiv depends on the settings in your grafana configuration. I can't say - I've not yet run it on Linux.

yossiv commented 8 years ago

@neuralfraud no matter. i moved my Grafana to run on Windows as a services. thanks :+1:

suckamucka commented 8 years ago
  1. yes I have the proxy feature enabled
  2. yes the registry has been updated with the necessary header

Just to be certain, I rebuilt the PRTG server and added Grafana and the Grafana-PRTG plugin. Same results where graph is showing NaN

ptcfast2 commented 8 years ago

I've found that depends on the sensor. I also get NaN and "object undefined" errors on some sensor types now that were working previously. Might want to create a separate issue for this.

yossiv commented 8 years ago

@ptcfast2 https://github.com/neuralfraud/grafana-prtg/issues/20

jtenniswood commented 8 years ago

Just tried the beta with the grafana docker image, but couldn't get the datasource plugin to work. Shame, it sounds like a great product

ghost commented 8 years ago

There is just a problem with bandwith for me :(, and of course it's the most important for me XD ! But great job neuralfraud do you work on a new version ?

suckamucka commented 8 years ago

Has anyone found a workaround for bandwidth showing up as NaN?

ghost commented 8 years ago

Same

jwlar commented 8 years ago

Same bandwidth issue here

beardpapi commented 8 years ago

Same issue here

neuralfraud commented 7 years ago

Original Parent installation issue:

On windows, or if improperly configured, Grafana will create the data directory RELATIVE to execution path. for instance, if you start C:\grafana-4.1.2\bin\grafana-server.exe from the folder C:\grafana-4.1.2, the data directory will be created as C:\grafana-4.1.2\data - as expected.

Bandwidth sensors show up correctly. The datasource always looks for a channel definition with the word "(speed)" next to it. This is a behavior quirk of PRTG.

All bandwidth values are in bits per second, use the "data rate > bits / sec" option in your panels.