Grafana implementation


(rico.neumann) #1

Hello,
I want to use the grafana module for icingaweb2. But after the installation only an empty frame is visible. Grafana works on the same machine. Which data source does the webmodule use? Do I have to assign the data source in the module?


Best regards Rico


(Carsten Köbke) #2

Which Grafana version do you use? Did you read the docs? Did you enable Auth anon in Grafana?


(rico.neumann) #3

I use the version 5.0.4. Yes i read the Docs. Yes “Anonymous Auth” is enabled.


(Carsten Köbke) #4

I will test it later. Can you please post modules config.ini


(rico.neumann) #5

[grafana]
version = “0”
host = “localhost:3000”
protocol = “http”
timerange = “3h”
timerangeAll = “2d”
defaultdashboard = “icinga2-default”
defaultdashboardpanelid = “1”
defaultorgid = “1”
shadows = “1”
defaultdashboardstore = “db”
theme = “dark”
datasource = “graphite”
accessmode = “direct”
debug = “1”
directrefresh = “yes”
height = “280”
width = “640”
enableLink = “no”


(Carsten Köbke) #6

Please activate Grafana 5 support and fill in uid of dashboard too.


(rico.neumann) #7

Well it is done, but it does not work. It the same issue

[grafana]
version = “5”
host = “localhost:3000”
protocol = “http”
timerange = “3h”
timerangeAll = “2d”
defaultdashboard = “icinga2-default”
defaultdashboardpanelid = “1”
defaultdashboarduid = “p44bz_iik”
defaultorgid = “1”
shadows = “1”
defaultdashboardstore = “db”
theme = “dark”
datasource = “graphite”
accessmode = “direct”
debug = “1”
directrefresh = “yes”
height = “280”
width = “640”
enableLink = “no”


(Carsten Köbke) #8

Can you please logout of Grafana or use different browser and open the link from debugouput, only replace localhost with the ip of grafana server. Also please check if netstat -tulpen | grep 3000 show grafana listening on localhost with port 3000.


(rico.neumann) #9

The Link from debug looks like
http://localhost:3000/render/dashboard-solo/db/icinga2-default?var-hostname=de-nb-gg-097&var-service=Last_USV_in_Watt&var-command=check_last&panelId=1&orgId=1&width=640&height=280&theme=dark&from=now-3h&to=now&trickrefresh=1524574504
I changed localhost whit IP-address

In grafana-errorlog is written
lvl=eror msg=“Dashboard not found”

after a long time comes an error on website

my grafanalink is
http://10.120.80.88:3000/d/p44bz_iik/1?refresh=1m&orgId=1

I have no idea whats wrong


#10

It has been quite a while but the “Dashboard not found” message made me immediately think you might not have the correct pannels / ID’s set in the Graph Config like so:

Just a wild guess, but might be worth a look.


(Carsten Köbke) #11

The link from debug looks like grafana version4, but the config says grafana5. iam a bit puzzeled now, because this should not happen. How did you configure the module, using texteditor or via icingaweb2 gui?


(Carsten Köbke) #12

Found it. Its a bug in Module. V5/V4 link is mixed :frowning: Will fix it in Master this evening.

Please set version to “1” and not “5”, I will change docs to describe it better.


(Michael Friedrich) #13

I’d suggest changing the version to 5 in your code, that allows you to cleanly implement changes for 6, 7, and so on. “1” isn’t syntactically correct for version and will always lead to confusion. Even me reading the docs did it wrong.


(Carsten Köbke) #14

Zend Selectboxes…


(rico.neumann) #15

Thanks Hactar, one error is solved.
But I have a lot of trouble at work. I’ll be back in the afternoon


(rico.neumann) #16

I hope you mean that (Selectbxes)


The Entry in Errorlog is disappeard (Dashboard not found)

no new error entrys in errorlogs , that’s why I can not write anything new


(Carsten Köbke) #17

Please import icinga2-default and use it aas default dashboard. The hostalive is only for the command hostalive or services named hostalive, depending what graph configuration you did.


(rico.neumann) #18

OK, then i Have a wrong idea from this Plugin