Icinga / icinga2

The core of our monitoring platform with a powerful configuration language and REST API.
https://icinga.com/docs/icinga2/latest
GNU General Public License v2.0
1.99k stars 573 forks source link

Performance Data CRITICAL values not shown #9430

Closed mafri27 closed 2 years ago

mafri27 commented 2 years ago

Describe the bug

Warning and Critical values of the Performance Data are not shown at the icingadb-web service page. At the normal service page it is shown.

Expected behavior

Warning and Critical values at Perf list

Screenshots

icingadb-web: image normal view: image

Your Environment

$ icingacli --version
Icinga Web 2  2.11.0    
Git Commit    46998464ea9f9e3c2889d98f9fb6df639d972550 
PHP Version   7.4.28    
MODULE       VERSION   
grafana      1.4.2     
icingadb     1.0.0     
lazaroblanc  1.0.0     
monitoring   2.11.0
$ lsb_release -d
Description:    Debian GNU/Linux 11 (bullseye)
$ icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.13.4-1)

System information:
  Platform: Debian GNU/Linux
  Platform version: 11 (bullseye)
  Kernel: Linux
  Kernel version: 5.10.0-8-amd64
  Architecture: x86_64

Build information:
  Compiler: GNU 10.2.1
  Build host: runner-hh8q3bz2-project-298-concurrent-0
  OpenSSL version: OpenSSL 1.1.1n  15 Mar 2022
$ icinga2 feature list
Disabled features: 
Enabled features: api checker ido-pgsql influxdb mainlog syslo
$ icinga2 daemon -C
[2022-07-01 15:13:29 +0000] information/cli: Icinga application loader (version: r2.13.4-1)
[2022-07-01 15:13:29 +0000] information/cli: Loading configuration file(s).
[2022-07-01 15:13:29 +0000] information/ConfigItem: Committing config item(s).
[2022-07-01 15:13:29 +0000] warning/Zone: The Zone object 'checker' has more than two endpoints. Due to a known issue this type of configuration is strongly discouraged and may cause Icinga to use excessive amounts of CPU time.
[2022-07-01 15:13:29 +0000] information/ApiListener: My API identity: icinga-master-1.hetzner.com
[2022-07-01 15:13:39 +0000] information/WorkQueue: Icinga/icingadb-web#9 (ApiListener, RelayQueue) items: 0, rate:  0/s (0/min 0/5min 0/15min);
[2022-07-01 15:13:39 +0000] information/WorkQueue: Icinga/icingadb-web#10 (ApiListener, SyncQueue) items: 0, rate:  0/s (0/min 0/5min 0/15min);
[2022-07-01 15:13:39 +0000] information/WorkQueue: Icinga/icingadb-web#5 (DaemonUtility::LoadConfigFiles) items: 32, rate: 174.933/s (10496/min 10496/5min 10496/15min);
[2022-07-01 15:13:39 +0000] information/WorkQueue: Icinga/icingadb-web#6 (InfluxdbWriter, influxdb) items: 0, rate:  0/s (0/min 0/5min 0/15min);
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 106205 Notifications.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 IcingaApplication.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 10698 Dependencies.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 15 HostGroups.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 10474 Hosts.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 FileLogger.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 118 Downtimes.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 SyslogLogger.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 28 Comments.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 CheckerComponent.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 InfluxdbWriter.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 3 Zones.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 2 IdoPgsqlConnections.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 6 Endpoints.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 2 ApiUsers.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 ApiListener.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 177 CheckCommands.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 1 UserGroup.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 15 ServiceGroups.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 15 Users.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 251208 Services.
[2022-07-01 15:13:41 +0000] information/ConfigItem: Instantiated 3 NotificationCommands.
[2022-07-01 15:13:41 +0000] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars'
[2022-07-01 15:13:41 +0000] information/cli: Finished validating the configuration file(s).
yhabteab commented 2 years ago

Hii @mafri27 , thank you for the report!

$ icinga2 feature list Disabled features: Enabled features: api checker ido-pgsql influxdb mainlog syslo

I can't see the icingadb feature here, did you miss to fully copy paste the output of this command or don't have icingadb feature enabled? Could you also please post the complete raw output of the CheckCommand here, for which no warning/critical thresholds are not showing in Icinga DB Web.

mafri27 commented 2 years ago

you are right. I've done this at the HA-Master, but icingadb is running at the secondary system.

$ icinga2 feature list
Disabled features: 
Enabled features: api checker compatlog icingadb ido-pgsql livestatus mainlog syslog

the output of this plugin is:

# ./plugin options
0 errors|et_4_0_0_channel=921 et_4_0_0_cfec=682144595 et_4_0_0_ufec=0 et_4_0_0_temp=39.0;;0.0:78.0 et_4_0_0_snr=17.1;;12: et_4_0_0_tx=-7.6;;-11:0.0 et_4_0_0_rx=-0.1;;-5:2.0 et_4_0_0_cd=304.0;; et_4_0_0_osnr=34.2;;20: et_4_3_0_channel=923 et_4_3_0_cfec=679271258 et_4_3_0_ufec=0

| Interface       | Channel |       cFEC      |       uFEC     |   temp     |    snr     |    osnr    |     tx     |     rx     |     cd     |                  State                   |
+-----------------+---------+-----------------+----------------+------------+------------+------------+------------+------------+------------+------------------------------------------+
| et-4/0/0        |     921 |       682144595 |              0 |      39.00 |      17.10 |      34.20 |      -7.60 |      -0.10 |     304.00 | [OK]                                     |
| et-4/3/0        |     923 |       679271258 |              0 |      36.00 |      17.30 |      33.90 |      -8.30 |      -1.10 |     301.00 | [OK]                                     |
yhabteab commented 2 years ago

The perfData are normalized incorrectly by Icinga 2!

julianbrost commented 2 years ago

I think this might be a duplicate of #9038. Though I'm wondering why the threshold for et_4_0_0_temp doesn't show up as that's not a range.

yhabteab commented 2 years ago

They are normalized incorrectly. When you check the performance_data attr, the thresholds are all present, but normalized_performance_data doesn't contain any thresholds.

Not normalized:

et_4_0_0_temp=39.0;;0.0:78.0 et_4_0_0_snr=17.1;;12: et_4_0_0_tx=-7.6;;-11:0.0 et_4_0_0_rx=-0.1;;-5:2.0 et_4_0_0_cd=304.0;; et_4_0_0_osnr=34.2;;20: et_4_3_0_channel=923 et_4_3_0_cfec=679271258 et_4_3_0_ufec=0

Normalized:

et_4_0_0_temp=39 et_4_0_0_snr=17.100000 et_4_0_0_tx=-7.600000 et_4_0_0_rx=-0.100000 et_4_0_0_cd=304 et_4_0_0_osnr=34.200000 et_4_3_0_channel=923 et_4_3_0_cfec=679271258 et_4_3_0_ufec=0
Al2Klimov commented 2 years ago

why the threshold for et_4_0_0_temp doesn't show up as that's not a range

Isn’t 0.0:78.0 a range?

Al2Klimov commented 2 years ago

Duplicate of #9038

Al2Klimov commented 2 years ago

We have even unit tests verifying correct normalisation... ex. on ranges. -> #9038

macdems commented 6 months ago

I don't think this is a duplicate of #9038. The problem is that if the performance data contains empty value (like ;;) it is cut and also everything after it is removed. Please reopen and fix this bug.

Al2Klimov commented 6 months ago

Duplicate of #9634