InfluxDB, Grafana, Icingaweb2 - no Graphs shown

influxdb
#1

Hello there,

i just set up InfluxDB and Grafana on a new server and tried to use icingaweb2-module-grafana with it.
But it looks as follows:
image

On Grafana Web, I only see the hostalive metrics - nothing else:

This is my config.ini:

[grafana]
version = "0"
host = "10.40.4.196:3000"
protocol = "http"
timerangeAll = "1w/w"
defaultdashboard = "icinga2-default"
defaultdashboardpanelid = "1"
defaultorgid = "1"
shadows = "1"
defaultdashboardstore = "db"
theme = "light"
datasource = "influxdb"
accessmode = "proxy"
height = "280"
width = "640"
enableLink = "no"
debug = "0"
authentication = "anon"

and this is my DataSource Setting in Grafana:

Any idea on what I did wrong?
Any help would be much appreciated, thanks in advance!

(Roland Sommer) #2

You have configured:

but your screenshot show base-metrics. Do you have icinga2-default dashboard imported as well?

If it is a configuration issue enabling show debug at grafana module in icingaweb2 could help i.e. to get the Graph URL and test it directly within an web client.

1 Like
#3

thank you, Roland!
I changed defaultdashboard to “base-metrics”, restarted icinga and I enabled debug mode.
When testing a graph link directly within a web client, I only see an empty graph:

This is the Graph Debug Output:

(Roland Sommer) #4

Your Graph URL points to base… which should be icinga2-default. Your screenshot does not show the complete URL, therefore, I’m not able to comment.

No data points means grafana could not find recorded performance data for that machine within this time frame. Do you have influxdb configured correctly and icinga feature influxdb enabled?

Login to influxdb and check if there is any performance data.

1 Like
#5

thanks again for your reply, Roland!
Very much appreciate your help!

Here is my influx database content (I saved the output from select count(*) from /.*/ to a .txt file)

influxdb content.txt (3.6 KB)

So it looks, like there is some content in it, am I right?

Sorry for the URL Screenshot - after I changed the default dashboard to “base-metrics” the URL looked like that:
http://10.40.4.196:3000/render/dashboard-solo/db/base-metrics?var-hostname=gws-vm-033&var-service=hostalive&var-command=hostalive&panelId=1&orgId=1&width=640&height=280&theme=light&from=now-6h&to=now

root@ICINGA2:/# icinga2 feature list
Disabled features: compatlog debuglog elasticsearch gelf graphite livestatus opentsdb perfdata statusdata syslog
Enabled features: api checker command ido-mysql influxdb mainlog notification

If there is further information I should provide, please let me know.
Thanks again for your help!!

EDIT: wait a sec… do I have to enable the perfdata feature?
EDIT2: I enabled perfdata feature and added library "perfdata" to the influxdb.conf - but without any effect

(Roland Sommer) #6

Did you follow influxdb configuration?

perfdata feature is not necessary (it is needed for writing performance data files which will be used by e.g. PNP4Nagios)

1 Like
#7

I think so.
This is what my /etc/icinga2/features-enabled/influxdb.conf looks like:

/**
 * The InfluxdbWriter type writes check result metrics and
 * performance data to an InfluxDB HTTP API
 */

object InfluxdbWriter "influxdb" {
  host = "10.40.4.196"
  port = 8086
  database = "icinga2"
  username = "icinga2"
  password = "MyPassword"
  enable_send_thresholds = true
  enable_send_metadata = true
  flush_threshold = 1024
  flush_interval = 10s
  host_template = {
    measurement = "$host.check_command$"
    tags = {
      hostname = "$host.name$"
    }
  }
  service_template = {
    measurement = "$service.check_command$"
    tags = {
      hostname = "$host.name$"
      service = "$service.name$"
    }
  }
}

I wonder, why I am able to see the hostalive graphs but none of the others

#8

Update:

In Icinga Module Configuration I changed Grafana Access to Proxy and Authentication Type to Username & Password.
After that, I saw empty Graphs in the Host Views, “No Data”

Then I added a new Graph for “hostalive”:

And now I see them for this particular command on every host:

But I still do not see any Service Check Metrics in Icinga.
I understand this -> i did not create a graph in Icingaweb for that yet but what I do not understand is, why I do not see any Graphs in Grafana itself?

I took a look at the Query Inspector and I could see that only the hostalive Query brings back a result.
The Query for the CPU Load for example shows no results.

So why does hostalive succeed and any other check does not?

Does this has anything to do with the fact that I am using the Icinga Agent on my Windows machines for checks like CPU and Storage?

When I add a Linux Disk Check to one of my Linux Hosts, I immediately see Graphs for this in Grafana.
But none of the Windows Checks works.

(Roland Sommer) #9

As already mentioned, you should configure icinga2-default as default dashboard in the grafana configuration (details could be found here).

I’m using Icinga Agent on Windows with checks from ITL as well and it works as expected. Have you checked icinga logs or even debug log for any errors?

1 Like
#10

Did you add any further Variables in Grafana?
The base-metrics dashboard seems to miss some of them?

In the base-metrics dashboard, when selecting my Service “Storage-Capacity”, the Query shows “load-windows” by default but that is the check for CPU load? (see red arrows)

When I manually change this to disk-windows, it works and Grafana shows the proper Graph:

(Roland Sommer) #11

I do not use base-metrics at all.

1 Like
#12

okay, thank you very much for your help and for pointing me into the right direction!
icinga2-default works fine and for any further dashboard I will study the grafana documentation.

thank you!

(Carsten Köbke) #13

For histalive you have to configure the provided hostalive dashboard. Default dashboard doesnt work for host checks.

1 Like
#14

Thank you, Carsten!
I was able to set everything up as I wanted now. Thanks a lot!
But I have one last little question. (I dont want to create a new topic only for that)

In Icingaweb, the Grafana Module shows the storage units as “Billion” “Trillion” or “Million”.
Any chance to change this to MB GB TB ?

image

(Carsten Köbke) #15

Then you have to create your own dashboard (or us provided ones) and configure them for the command or service name in the graph configuration of the module.

1 Like