Page 1 of 1

Unable to configure Graphana data source

Posted: Wed Sep 12, 2018 1:29 am
by ganesh.batwal
Dear Support,
We are following the KB "Nagios XI - Using Grafana With Existing Performance Data"
https://support.nagios.com/kb/article/n ... ana_Config
During Grafana configuration we are not able to add DATA SOURCE, the Access: proxy option is not visible (We have only server (default) and brower options) available. Both are not working for us.

Pl refer the attached screen for reference. Kindly help us.


Curl output for reference:-

curl http://localhost/pnp4nagios
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://localhost/pnp4nagios">here</a>.</p>
</body></html>

Re: Unable to configure Graphana data source

Posted: Wed Sep 12, 2018 11:12 am
by lmiltchev
Can you make this work by selecting the Server (Default) option?

It seems like the Proxy option was renamed to Server in newer version of Grafana.
example01.PNG
https://github.com/grafana/grafana/issues/12913

Re: Unable to configure Graphana data source

Posted: Thu Sep 13, 2018 11:49 pm
by ganesh.batwal
Dear Support,
Thanks for an update.
We tried both the options (Server & brower), But still the error messages are same.
Kindly refer the attached error message screen and Grafana installation logs for help.

Re: Unable to configure Graphana data source

Posted: Fri Sep 14, 2018 10:12 am
by lmiltchev
We haven't been able to recreate the issue in-house. One difference we noticed was in the curl output - you get "302 Found", and we get "301 Moved Permanently", which probably has to do with some custom apache rewrite rules that you may have. Let's take a look at some of the configs - our developers will have to look into this issue more closely.

Note: Grafana is not one of our product, and even though we offer/support integration in Nagios XI, we are not familiar enough with it to actually support it "officially". Having said that, we will do our best to help you out.

Can you post the following files on the forum - /usr/share/grafana/conf/defaults.ini, /usr/local/pnp4nagios/etc/config.php, /etc/httpd/conf.d/pnp4nagios.conf, and /etc/httpd/conf/httpd.conf?

What is the OS/architecture of this server?

Code: Select all

cat /etc/*release
uname -a
Click on the "Save & Test" button again, then run a tail on the apache error log, and show the output in code wraps:

Code: Select all

tail -100 /var/log/httpd/error_log
It's not apparent from the screenshots, so just to clarify - you are selecting Type = PNP, correct?
example01.PNG

Re: Unable to configure Graphana data source

Posted: Tue Sep 18, 2018 12:40 am
by ganesh.batwal
Thanks for the support,
Now the DataSource is working fine..

fyi ..We have removed the below mention configuration from "/etc/httpd/conf/httpd.conf" These settings we have added for configuration of SSL redirection.


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Re: Unable to configure Graphana data source

Posted: Tue Sep 18, 2018 12:47 am
by ganesh.batwal
Thank for the support,
Datasource working screen attached for reference.

Re: Unable to configure Graphana data source

Posted: Tue Sep 18, 2018 11:25 am
by lmiltchev
I am glad your issue has been resolved! I am closing this topic. If you have any further questions, please start a new thread.