Skip to content

Discrepancy in IDO connection status in Icingaweb2 v(2.12.2) #10386

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
yolanjoy opened this issue Mar 18, 2025 · 2 comments
Open

Discrepancy in IDO connection status in Icingaweb2 v(2.12.2) #10386

yolanjoy opened this issue Mar 18, 2025 · 2 comments

Comments

@yolanjoy
Copy link

yolanjoy commented Mar 18, 2025

Hello,

I'm seeing this Discrepancy in the new installation of Icinga2 cluster (r2.14.5-1). I asked about it on the community side but no response was received. So I'm putting it here. I couldn't figure out the cause and scratching my head. I suspect it maybe a bug but I'm not sure. Please advise. Thank you.

Config Master (icingam-002)

 [2025-03-14 20:38:34 +0000] information/DbConnection: Pausing IDO connection: ido-mysql
[2025-03-14 20:38:34 +0000] information/IdoMysqlConnection: Disconnected from 'ido-mysql' database 'icinga'.
[2025-03-14 20:38:34 +0000] information/IdoMysqlConnection: 'ido-mysql' paused.

Secondary Master (icingam-003)

 [2025-03-14 21:49:04 +0000] information/DbConnection: Resuming IDO connection: ido-mysql
[2025-03-14 21:49:04 +0000] information/IdoMysqlConnection: MySQL IDO instance id: 1 (schema version: '1.15.1')
[2025-03-14 21:49:04 +0000] information/IdoMysqlConnection: Finished reconnecting to 'ido-mysql' database 'icinga' in 0.217954 second(s).
[2025-03-14 21:49:14 +0000] information/IdoMysqlConnection: Pending queries: 5 (Input: 6/s; Output: 13/s)
[2025-03-14 21:54:14 +0000] information/IdoMysqlConnection: Pending queries: 5 (Input: 4/s; Output: 4/s)
[2025-03-14 21:59:14 +0000] information/IdoMysqlConnection: Pending queries: 5 (Input: 4/s; Output: 5/s)

Icingaweb2 cli repot

 icingacli monitoring list services --host=icingam-002.x.com --service=icinga2-ido-mysql --columns "service_output" --format='$service_output$'
Connected to the database server (Schema version: '1.15.1'). Queries per second: 3.667 Pending queries: 0.000. Last failover: 2025-03-14 20:39:04 +0000.


 icingacli monitoring list services --host=icingam-003.x.com --service=icinga2-ido-mysql --columns "service_output" --format='$service_output$'
DB IDO connection is temporarily disabled on this cluster instance.

From Active DB

mysql> SELECT status_update_time, endpoint_name FROM icinga_programstatus;
+---------------------+------------------------------------------+
| status_update_time  | endpoint_name                            |
+---------------------+------------------------------------------+
| 2025-03-14 23:33:54 | icingam-003.x.com |
+---------------------+------------------------------------------+
1 row in set (0.00 sec)

From Inactive DB

mysql>  SELECT status_update_time, endpoint_name FROM icinga_programstatus;
+---------------------+------------------------------------------+
| status_update_time  | endpoint_name                            |
+---------------------+------------------------------------------+
| 2025-03-14 21:48:54 | icingam-003.x.com |
+---------------------+------------------------------------------+
1 row in set (0.00 sec)
# icinga2 --version
icinga2 - The Icinga 2 network monitoring daemon (version: r2.14.5-1)

Copyright (c) 2012-2025 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

System information:
  Platform: Ubuntu
  Platform version: 24.04.2 LTS (Noble Numbat)
  Kernel: Linux
  Kernel version: 6.8.0-54-generic
  Architecture: x86_64

Build information:
  Compiler: GNU 13.3.0
  Build host: runner-hh8q3bz2-project-575-concurrent-0
  OpenSSL version: OpenSSL 3.0.13 30 Jan 2024

Application information:

General paths:
  Config directory: /etc/icinga2
  Data directory: /var/lib/icinga2
  Log directory: /var/log/icinga2
  Cache directory: /var/cache/icinga2
  Spool directory: /var/spool/icinga2
  Run directory: /run/icinga2

Old paths (deprecated):
  Installation root: /usr
  Sysconf directory: /etc
  Run directory (base): /run
  Local state directory: /var

Internal paths:
  Package data directory: /usr/share/icinga2
  State path: /var/lib/icinga2/icinga2.state
  Modified attributes path: /var/lib/icinga2/modified-attributes.conf
  Objects path: /var/cache/icinga2/icinga2.debug
  Vars path: /var/cache/icinga2/icinga2.vars
  PID path: /run/icinga2/icinga2.pid
@nilmerg nilmerg transferred this issue from Icinga/icingaweb2 Mar 20, 2025
@yhabteab
Copy link
Member

Hi, thanks for the report!

Are you using a single database for both of your masters or different ones? And what exactly is the problem you are facing? If you have configured the IDO feature in HA mode, only one of them will write something to the database at a time. So I'm not sure I understand what the actual issue is.

@yolanjoy
Copy link
Author

I’ve “enable_ha” enabled on both masters. I’ve 2 separate hosts running mysql 8 on them. Only one of them (FQDN hóstiame) is added in the IDO config on both masters. I set up “icinga” and “icingaweb2” databases as per documentation. Then I enabled replica on both DB servers so each server is a master and a replica of another. It worked as expected as one of the masters will write to one DB host and it shown above. The secondary master has the control of writing to IDO and the config master has IDO access "paused". But in the icingaweb2, the check "icinga2-ido-mysql" reports exactly opposite status i.e. the secondary IDO access is "disabled" and the config master has IDO access.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants