Mikesch-mp / icingaweb2-module-grafana

Grafana module for Icinga Web 2 (supports InfluxDB & Graphite)
https://icinga.com/community/
GNU General Public License v2.0
241 stars 92 forks source link

Getting ping4 graph on all the service also no perf data for plugin check comand #206

Closed gintisaurabh closed 1 year ago

gintisaurabh commented 5 years ago

using icinga2 with grafana and influx .

Not getting perf data for plugin check commands and only ping graph is showing on all the services.

Below are other details.

icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.2-1)

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

[2019-03-19 12:22:36 +0530] information/cli: Icinga application loader (version: r2.10.2-1) [2019-03-19 12:22:36 +0530] information/cli: Loading configuration file(s). [2019-03-19 12:22:36 +0530] warning/Value for constant 'ZoneName' was modified. This behaviour is deprecated. Location: in /etc/icinga2/constants.conf: 28:1-28:31 /etc/icinga2/constants.conf(28): const ZoneName = "TEST" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : [2019-03-19 12:22:36 +0530] information/ConfigItem: Committing config item(s). [2019-03-19 12:22:36 +0530] information/ApiListener: My API identity: UIOTAPSIS202 [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'backup-downtime' (in /etc/icinga2/conf.d/downtimes.conf: 5:1-5:52) for type 'ScheduledDowntime' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'icinga' (in /etc/icinga2/conf.d/services.conf: 73:1-73:22) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'load' (in /etc/icinga2/conf.d/services.conf: 81:1-81:20) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'procs' (in /etc/icinga2/conf.d/services.conf: 92:1-92:21) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'swap' (in /etc/icinga2/conf.d/services.conf: 100:1-100:20) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'users' (in /etc/icinga2/conf.d/services.conf: 108:1-108:21) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] warning/ApplyRule: Apply rule 'LinuxDiskUsage' (in /var/lib/icinga2/api/packages/director/36da15b7-af04-406a-ae54-353b772ee2ac/zones.d/director-global/service_apply.conf: 1:0-1:51) for type 'Service' does not match anywhere! [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 9 Services. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 InfluxdbWriter. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 IcingaApplication. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 3 Hosts. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 2 FileLoggers. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 2 NotificationCommands. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 6 Notifications. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 NotificationComponent. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 2 HostGroups. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 ApiListener. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 PerfdataWriter. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 CheckerComponent. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 3 Zones. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 ExternalCommandListener. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 Endpoint. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 ApiUser. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 User. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 IdoMysqlConnection. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 217 CheckCommands. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 1 UserGroup. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 3 ServiceGroups. [2019-03-19 12:22:36 +0530] information/ConfigItem: Instantiated 3 TimePeriods. [2019-03-19 12:22:36 +0530] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars' [2019-03-19 12:22:36 +0530] information/cli: Finished validating the configuration file(s).

Mikesch-mp commented 5 years ago

Dont use Base metrics dashbaord as default dashboard!

Mikesch-mp commented 5 years ago

I need your grafana module configuration to see whats going wrong.

nc-gsf commented 5 years ago

EDIT: I got it working, but:

Hey, chiming in because I have the same problem. To clarify: Why is there a default panel? I mean, I want the panel matching to the service in Icinga. So when e.g. the default panel ID is 1, it always shows the "Host Alive" panel. I get that it's doing what I am telling it to do, but it makes no sense. Please explain.

[2019-05-15 09:36:49 +0200] information/cli: Icinga application loader (version: r2.10.4-1)
[2019-05-15 09:36:49 +0200] information/cli: Loading configuration file(s).
[2019-05-15 09:36:49 +0200] information/ConfigItem: Committing config item(s).
[2019-05-15 09:36:49 +0200] information/ApiListener: My API identity: XXX
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 4 Services.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 InfluxdbWriter.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 IcingaApplication.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 5 Hosts.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 2 FileLoggers.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 3 NotificationCommands.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 9 Notifications.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 NotificationComponent.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 HostGroup.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 ApiListener.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 CheckerComponent.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 4 Zones.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 4 Endpoints.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 ApiUser.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 3 Users.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 215 CheckCommands.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 2 UserGroups.
[2019-05-15 09:36:49 +0200] information/ConfigItem: Instantiated 1 TimePeriod.
[2019-05-15 09:36:49 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2019-05-15 09:36:49 +0200] information/cli: Finished validating the configuration file(s).

I am using this dashboard: https://grafana.com/dashboards/381

This is my module config: image

Mikesch-mp commented 5 years ago

That dashboard is not made for usage with the module, its only a techdemo, Please use the provided icinga2-default dashboard. Makeing own or use provided dashboards for commands gives you the ability to show only those metrics that are important and also show the units correctly. Sadly there is no way until now to send the unit via api call to grafana.

vostorga commented 4 years ago

Hi, sorry to write in an old post

EDIT: I got it working, but:

* The documentation is confusing. Using the icinga-default dashboard is imho not really useful, because of the problem regarding the default panel ID.

* The second part of the documentation regarding the use of custom dashboards is also kind of confusing. Why not use this as the default dashboard? This way, all the services automatically show the matching graph in Grafana. You also do not have to create a dashboard for every service under the "Grafana Graphs" tab.

* Is there something I am not understanding correctly here? Because the way it is described in the documentation seems unefficient. If so: Please excuse my ignorance and explain it to me. If not: I will volunteer to update the documentation if wanted.

Hey, chiming in because I have the same problem. To clarify: Why is there a default panel? I mean, I want the panel matching to the service in Icinga. So when e.g. the default panel ID is 1, it always shows the "Host Alive" panel. I get that it's doing what I am telling it to do, but it makes no sense. Please explain.

How did you get it working?
I just hitted the panel ID issue, in which the same graphic shows for all metrics. I'm confused about how to use instead the icinga2-default to make it work.

Thanks,