neuralfraud / grafana-prtg

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

Grafan to PRTG not working Red triangle ! Nothing else #67

Closed ccie9360 closed 5 years ago

ccie9360 commented 7 years ago

Loving the work you did here and am trying to follow in your steps, so thank you. I followed all installation instructions here is an overview.

-prtg and grafana on same win2012 server -both current with latest stable -created new user 'apiuser' -placed apiuser, primary group is prtg admin -yes i am using the password HASH from prtg in the edit data source screen -I have restarted grafan and the server its on

Nothing i have done, including try a ton of options has made a difference. I am learning to hate this red mark in grafan... It says nothing.

I can create a query with this user and the password HASH and put it in a browser, it works and I can get a table. I can login in to prtg with this user.

Any thoughts?

Ps I posted in the grafan forums, no replies after several days so posting here. Oh and I even tried to contact them to pay to get some help, no reply there either.

neuralfraud commented 7 years ago

Are you using "proxy" or "direct" mode?

image

ccie9360 commented 7 years ago

Correct using proxy and nothing else, following the screen shot in the installation instructions. There are two differences in my screen and this on here. 1 - I am using https not http, i did try it with http, no change still fails 2 - I am using the actual ip address not the loopback, though I did try the loopback and no change still fails.

Tom

mberniz commented 7 years ago

Check Skip TLS verification and use https.

ccie9360 commented 7 years ago

Yes that was one of the options I tried while troubleshooting when I attempting to connect vis http, it made no difference still the uninformative red exclamation point, stating it failed.

I did try it again this Morning just to be sure, no change in behavior.

mberniz mailto:notifications@github.com November 13, 2017 at 2:45 AM

Check Skip TLS verification

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/67#issuecomment-343881359, or mute the thread https://github.com/notifications/unsubscribe-auth/AgDEgimWh4CFHoq1DeSQKsWZ-2S3UpAsks5s2B3YgaJpZM4Qa_qc.

neuralfraud commented 7 years ago

Ok bud, Fire up chrome, go to the datasource configuration page, and then:

Also which version of grafana have you installed? I've tested with 4.4 and 4.6.0 - version 4.5 was known to have a bug that essentially broke everything and was fixed in version 4.6.0

jott0204 commented 7 years ago

If you are using a custom port number in PRTG, then you will need to include that. ie.

ccie9360 commented 7 years ago

Good Evening Gentlemen, Thank you both for your help. Today while troubleshooting a completely unrelated issue with PRTG tech support they took a peek at the Grafana configuration. Apparently the PRTG Engineer has had the same issue as I did and is familiar with Grafana. Long story short while I am not custom port in PRTG I did have to "force" port 443 in addition to having it be a https URL, please see the picture for the final configuration that is working.

Now I got the impression this was needed because prtg and grafana are on the same server.

screen shot 2017-11-13 at 7 18 38 pm
neuralfraud commented 7 years ago

I'm glad that Paessler was able to help you. They've been very kind and helpful to me as a developer and customer!

You should avoid direct access mode, as that forces the browser to initiate the connection, instead of the Grafana server itself, which is more reliable and provides a security barrier of sorts.

What'd you configure in the registry for the AccessControlAllowOrginHTTPHeader key?

ccie9360 commented 7 years ago

yes they are and its one of the reasons I dumped solarwinds and went with them, so much easier to work with.

I set the registry to be exactly what was shown in the install instructions, a asterisk if I recall. Now since this is a 2012 server it didn't exist so I created it.

I do wish proxy would work as your reasons are sound and I agree with them.

Tom

J Lashua mailto:notifications@github.com November 13, 2017 at 7:26 PM

I'm glad that Paessler was able to help you. They've been very kind and helpful to me as a developer and customer!

You should avoid direct access mode, as that forces the browser to initiate the connection, instead of the Grafana server itself, which is more reliable and provides a security barrier of sorts.

What'd you configure in the registry for the AccessControlAllowOrginHTTPHeader key?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/67#issuecomment-344135116, or mute the thread https://github.com/notifications/unsubscribe-auth/AgDEgj-frVSOzIp_dGgpgh7X-AervXrrks5s2Qh6gaJpZM4Qa_qc.

jjfaulk1967 commented 6 years ago

Neuralfraud, I am still having problems after all the comments here. I perform a save & test but usually never get a result or a failed result. Only once did I briefly see a success. Could you take a look at my debug from Chrome?

thanks

General: Request URL:http://10.154.66.50:3000/api/datasources/proxy/1/status.json?username=APIUSER&passhash=4004094053&undefined Request Method:GET Status Code:302 Found Remote Address:10.154.66.50:3000 Referrer Policy:no-referrer-when-downgrade

Response Headers: Access-Control-Allow-Origin:* Cache-Control:no-cache Cache-Control:no-cache Content-Length:0 Content-Type:text/html; charset=ISO-8859-1 Date:Thu, 30 Nov 2017 14:53:10 GMT Expires:0 Expires:-1 Location:https://10.154.66.61/api/status.json?username=APIUSER&passhash=4004094053&undefined Pragma:no-cache Server:PRTG/17.4.35.3326 X-Content-Type-Options:nosniff X-Xss-Protection:1; mode=block

Request Headers: Accept:application/json, text/plain, / Accept-Encoding:gzip, deflate Accept-Language:en-US,en;q=0.9 Connection:keep-alive Cookie:grafana_user=admin; grafana_remember=28653add0d6a0df126092d43bcb5b30dcc0236e8aef52a510a78403dcda5aefe73; grafana_sess=541c419e23788e88; OCTOPUS174353326=ezBGQTQ0QzRFLUZFM0ItNDlFNy05NUFBLTk5RTJEMjAwREQ4N30%3D Host:10.154.66.50:3000 Referer:http://10.154.66.50:3000/datasources/edit/1 User-Agent:Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36 X-Grafana-NoCache:true X-Grafana-Org-Id:1

Query String Parameters: username:APIUSER passhash:4004094053 undefined:

jjfaulk1967 commented 6 years ago

Update. I am now getting the add datasource save & test to work. But when using '*' in the group field I get this response.

xhrStatus:"complete" request:Object method:"GET" url:"api/datasources/proxy/1/table.json?username=XXXX&passhash=[object Object]&content=devices&count=9999&columns=objid,device,group,probe,tags,active,status,message,priority" response:"Unauthorized"

I have tripled checked to user account (default admin account) on PRTG and it has permission for all hosts and sensors. I have used the hashpass from PRTG when configuring the datasource.

neuralfraud commented 6 years ago

Just hit F5 /refresh.

You save the datasource, you get the green success box. You go create a graph or load a dashboard and you get request errors.

Hitting F5 / refresh appears to resolve that initial glitch – I haven’t gotten to identifying the cause yet.

J

From: Krazedkatt [mailto:notifications@github.com] Sent: Thursday, November 30, 2017 1:54 PM To: neuralfraud/grafana-prtg grafana-prtg@noreply.github.com Cc: J Lashua nf@neuralfraud.net; Comment comment@noreply.github.com Subject: Re: [neuralfraud/grafana-prtg] Grafan to PRTG not working Red triangle ! Nothing else (#67)

Update. I am now getting the add datasource save & test to work. But when using '*' in the group field I get this response.

xhrStatus:"complete" request:Object method:"GET" url: <url:%22api/datasources/proxy/1/table.json?username=XXXX&passhash=%5bobject> "api/datasources/proxy/1/table.json?username=XXXX&passhash=[object Object]&content=devices&count=9999&columns=objid,device,group,probe,tags,active,status,message,priority" response:"Unauthorized"

I have tripled checked to user account (default admin account) on PRTG and it has permission for all hosts and sensors. I have used the hashpass from PRTG when configuring the datasource.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/neuralfraud/grafana-prtg/issues/67#issuecomment-348284686 , or mute the thread https://github.com/notifications/unsubscribe-auth/AIFtN4xq1ZO7HyTGGTLvRqdIkUHxJHlDks5s7vm6gaJpZM4Qa_qc . https://github.com/notifications/beacon/AIFtNzhq9qVgy-YUH_Y5fccS94BrjaEUks5s7vm6gaJpZM4Qa_qc.gif

jjfaulk1967 commented 6 years ago

Thanks Neuralfraud. Making progress. I am now seeing entries in the field. Missing quite a few groups, hosts, and sensors. And another oddity, I have some hosts listed in the group field.

Thanks ALOT for your help so far.

John

Everything is working now.

John

alxgrb commented 6 years ago

Hi, thx fo the great work!!! but i have the same problem with red triangle, please look at the screenshot.

my Server has; WindowsServer 2012R2 PRTG Ver. 18.1.36.37.33 Grafana 4.6.3

capture-grafana-error

any Idea?

thx, Alex

jott0204 commented 6 years ago

put this in your URL

OR JUST

I'm guessing that you have a specific port number in PRTG and that is what you need to use. Let me know if that works for you

James Ott, Jr. *IT Administrator *| Network Engineer

CompTIA Linux+ http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D0B0Nd3DEOXzcjTUk3WjUxTFVaVnM&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78 / LPIC-1 http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D0B0Nd3DEOXzcjMHUwVU5vSFJ4amM&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78 / SUSE-CLA http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D0B0Nd3DEOXzcjWGVWaXFlU1AyQzg&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78


[image: Email Signature Logo] http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=http%3A%2F%2Fwww.federalradio.net%2F&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78

Pegasus Radio Corp / FEDERAL RADIO 1202 Technology Park, Suite C Aberdeen, Maryland 21001

(P) 410.273.7611 <(410)%20273-7611> | (F) 410.273.7605 <(410)%20273-7605> (M) 443.617.0034 <(443)%20617-0034> | (CS) 800.718.4111 <(800)%20718-4111>

PHONE EXT: 107

On Wed, Feb 7, 2018 at 11:05 AM, alxgrb notifications@github.com wrote:

Hi, thx fo the great work!!! but i have the same problem with red triangle, please look at the screenshot. my Server has; WindowsServer 2012R2 PRTG Ver. 18.1.36.37.33 Grafana 4.6.3 [image: capture-grafana-error] http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fuser-images.githubusercontent.com%2F26403641%2F35926718-168e9542-0c29-11e8-8ac4-995c91499aec.PNG&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78

any Idea?

thx, Alex

— You are receiving this because you commented. Reply to this email directly, view it on GitHub http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fgithub.com%2Fneuralfraud%2Fgrafana-prtg%2Fissues%2F67%23issuecomment-363818093&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78, or mute the thread http://t.sidekickopen05.com/e1t/c/5/f18dQhb0S7lC8dDMPbW2n0x6l2B9nMJW7t5XYg7gsh4lVQZpyx8pTkCFW5vMqt056dGr7f6ZlqFx02?t=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMCA7EVW10w0I--jMChDMblxR2PiKVFdks5tScnXgaJpZM4Qa_qc&si=6377182977064960&pi=c5c71688-0594-46ed-a0bb-5ad2887eea78 .

alxgrb commented 6 years ago

Thx, but it doesn't work.... i have tried with your tips capture-grafana-error1800208

a standard ports capture-grafana-error1800208-prtg-adm

webserver config capture-grafana-error1800208-prtg-webserver

JohnH77 commented 6 years ago

@alxgrb you have to take passhash, not the password. With passhash ist should work

alxgrb commented 6 years ago

It's won't work with a passhash.... proxy is disabled but look at screenshots capture-grafana-w passhash1 capture-grafana-w passhash2 capture-grafana-w passhash3

Here is without starting grafana capture-prtgwebsite1 capture-prtgwebsite2

JohnH77 commented 6 years ago

@alxgrb You use the standard SSL 443 Port or 8085? Can you try to open the PRTG Api, does ist works?

image

JohnH77 commented 6 years ago

maybe it cant be used with Port 8085 because: image

alxgrb commented 6 years ago

Hi,

i've changed the port to 8087, the result => the API works without problems capture-grafana-prtg-api capture-grafana-prtg-port-changed1 capture-grafana-prtg-port-changed1b

JohnH77 commented 6 years ago

@alxgrb habe you tryed the Options like @ccie9360 write above and use the Port 443? Set the Registry key? https://github.com/neuralfraud/grafana-prtg/wiki/Installation

alxgrb commented 6 years ago

It's work!!! I found the error, it was in the registry. I have set 1 must be * capture-grafana-registry

capture-grafana-ok

Many Thx for All !!!!

alxgrb commented 6 years ago

Hallo again!

This message ERR_CERT_COMMON_NAME_INVALID came after PRTG update to 18.1.37.13946 & nothing was changed....

grafik

alxgrb commented 6 years ago

Hi to all,

please update the PRTG to version 18.1.38.11934. grafik

and read this security issue => https://www.paessler.com/about-prtg-17-4-35-through-18-1-37

after update & restart, works all fine