Closed e36Alex closed 3 years ago
Did you install the grafana renderer plugin ?
Yes, installed it. Sorry i missed to mention it. For the import of dashboards I used the templates from this repo.
Any other idea, what I could check to get it running? I am wondering that even in grafana i just get "no data". Could there be anything wrong in my template?
I ran into the same issue this week and it looks like it's because we're using InfluxDB 2.x (i.e., Flux query language instead of InfluxQL). When you edit the dashboard's panel and add the following query, I at least get the ping stats:
from(bucket: v.defaultBucket) |> range(start: v.timeRangeStart, stop: v.timeRangeStop) |> filter(fn: (r) => r["hostname"] == "${hostname}" and r["_measurement"] == "hostalive") |> filter(fn: (r) => r["_field"] == "value") |> aggregateWindow(every: v.windowPeriod, fn: mean) |> yield(name: "mean")
However, they are just a series of dots (not connected lines) and it's showing the hostalive ping stats for every service (unsurprisingly, since I don't filter for "${service}" anywhere).
I don't know Grafana/Flux well enough to fix this myself, so I'll stick with InfluxDB 1.x for now. Support for InfluxDB 2.x in Icinga2 is fairly new as well, I think, but maybe @Mikesch-mp is already working on porting the templates to influxdb2?
hello,
Marcin
Brilliant, I didn't know about the v1 compatibility mode!
The most recent Icinga2 version with Influxdb2Writer can write to InfluxDB without it, but creating v1 API mappings fixed the "no data" problem in my Grafana graphs. I slightly adapted your instructions for this:
influx bucket list
and note the bucket ID (hex string in first column) of the icinga2
bucket.influx v1 auth create --username icinga2 --password MYSECRET --read-bucket BUCKET_ID
influx v1 dbrp create --db icinga2 --bucket-id BUCKET_ID --rp inf
icinga2
as database and username name, and the password set in the command above.I hope this will be useful to fellow internet travellers sent here by search engines.
Thanks for your help!
Thanks for your help! I tried it as @cthiemann mentioned in his last post and it works fine!
This should be mentioned in the installation instructions, or at least the issue kept open until documented well…
Hello!
I am new to Icinga2 and InfluxDB and got a problem displaying the Performance Graph. --> Icinga writes successfully into InfluxDB-Bucket --> Grafana can successfully read the data from InfluxDB-Bucket --> But i just get emtpy graphs in Icinga and Grafana
Expected Behavior
Data should be shown in the graphs.
Current Behavior
Steps to Reproduce (for bugs)
Icinga writes successfully into InfluxDB-Bucket:
Grafana can successfully read the data from InfluxDB-Bucket
But i just get emtpy graphs in Icinga and Grafana
http://grafana.xxx.de:3000/d/IGce-p7nk/icinga2-default?var-hostname=xxx.domain.de&var-service=check_ping4&var-command=ping4&from=now-3h&to=now&orgId=1&viewPanel=1
Context
Your Environment
I am using the following setup:
Proxmox LXC with Icinga2
Proxmox LXC with InfluxDB2
Proxmox LXC with Grafana
Icinga Web 2 Grafana version (System - About): 1.4.2
Icinga Web 2 version and modules (System - About): 2.9.2
Version used (
icinga2 --version
): r2.13.0-1Operating System and version: Debian 10.10
Enabled features (
icinga2 feature list
): api checker command ido-mysql influxdb2 livestatus mainlog notification perfdataConfig validation (
icinga2 daemon -C
):[2021-08-18 20:00:43 +0200] information/cli: Icinga application loader (version: r2.13.0-1) [2021-08-18 20:00:43 +0200] information/cli: Loading configuration file(s). [2021-08-18 20:00:43 +0200] information/ConfigItem: Committing config item(s). [2021-08-18 20:00:44 +0200] information/ApiListener: My API identity: icinga2.domain.de [2021-08-18 20:00:44 +0200] warning/ApplyRule: Apply rule 'notification_host_down' (in /var/lib/icinga2/api/packages/director/7b369e3b-1c5d-4336-a856-fd79598af266/zones.d/master/notification_apply.conf: 1:0-1:50) for type 'Notification' does not match anywhere! [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 IcingaApplication. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 10 Hosts. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 FileLogger. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 CheckerComponent. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 Influxdb2Writer. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 ApiListener. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 10 Zones. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 8 Endpoints. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 ApiUser. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 245 CheckCommands. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 LivestatusListener. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 NotificationComponent. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 UserGroup. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 User. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 53 Services. [2021-08-18 20:00:44 +0200] information/ConfigItem: Instantiated 1 PerfdataWriter. [2021-08-18 20:00:44 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars' [2021-08-18 20:00:44 +0200] information/cli: Finished validating the configuration file(s).