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
2k stars 575 forks source link

API will not return some comment objects from IDO-MySQL #7954

Closed vladimir-pachnik closed 2 years ago

vladimir-pachnik commented 4 years ago

Describe the bug

When the API is queried for comment objects that are positively present in the IDO MySQL backend DB, it returns empty set.

The objects are visible in icingaweb2 UI (but cannot be deleted from there in turn).

To Reproduce

Provide a link to a live example, or an unambiguous set of steps to reproduce this issue. Include configuration, logs, etc. to reproduce, if relevant.

  1. objects are positively in the DB
    
    MariaDB [icinga]> select comment_id as c_id,instance_id as i_id,object_id as o_id,comment_time as c_time,internal_comment_id as int_c_id,name,endpoint_object_id as end_o_id, expires as exp, expiration_time  as e_time from icinga_comments where name like 'carbon-cache11%';
    +------+------+-------+---------------------+----------+------------------------------------------------------------------------------------------+----------+------+---------------------+
    | c_id | i_id | o_id  | c_time              | int_c_id | name                                                                                     | end_o_id | exp  | e_time              |
    +------+------+-------+---------------------+----------+------------------------------------------------------------------------------------------+----------+------+---------------------+
    |  283 |    1 | 49207 | 2020-03-30 14:13:32 |       45 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!3136fabd-0d7d-4d9f-bf22-7a4408306fde |       90 |    1 | 2020-03-30 14:14:32 |
    |  284 |    1 | 49207 | 2020-03-30 14:13:33 |       46 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!42f4e718-43d5-4d19-80e0-bfa87551fadc |       90 |    1 | 2020-03-30 14:14:33 |
    |  286 |    1 | 49207 | 2020-03-30 14:13:33 |       48 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!5a5b75c9-fb29-4813-8849-cd2bddbf0e72 |       90 |    1 | 2020-03-30 14:14:33 |
    |  287 |    1 | 49207 | 2020-03-30 14:13:34 |       49 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!08ab8caf-2710-497d-a6cb-c4af018f49cd |       90 |    1 | 2020-03-30 14:14:34 |
    |  288 |    1 | 49207 | 2020-03-30 14:13:34 |       50 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!39e36dc5-701d-413c-8b48-fb6d9eaa151c |       90 |    1 | 2020-03-30 14:14:34 |
    |  290 |    1 | 49207 | 2020-03-30 14:13:35 |       52 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!f02f19a7-423b-47e1-9813-2c431affe5ea |       90 |    1 | 2020-03-30 14:14:35 |
    |  292 |    1 | 49207 | 2020-03-30 14:13:35 |       54 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!f039d9de-fd88-4064-84ba-218e1513440b |       90 |    1 | 2020-03-30 14:14:35 |
    |  294 |    1 | 49207 | 2020-03-30 14:13:36 |       56 | carbon-cache11.int.eu1.intgdc.com!splunk-forwarders!9fb9a8b9-6c57-411a-b9dd-bdf712ad312d |       90 |    1 | 2020-03-30 14:14:36 |
    |  309 |    1 | 28340 | 2020-03-30 15:08:49 |       56 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!8cb91af5-f787-4331-a6fd-e6b217f5f570   |       90 |    1 | 2020-03-30 15:09:49 |
    |  326 |    1 | 28340 | 2020-03-30 16:42:14 |       41 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!3f21446f-4285-4f2c-82a9-dc63e1b8db9e   |       90 |    1 | 2020-03-30 16:55:37 |
    |  328 |    1 | 28340 | 2020-03-30 16:42:15 |       43 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!95beccc7-8053-4d57-9bf3-312b4930dd56   |       90 |    1 | 2020-03-30 16:57:08 |
    |  331 |    1 | 28340 | 2020-03-30 16:42:16 |       46 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!ec6d6909-e991-440e-a363-425947f9682c   |       90 |    1 | 2020-03-30 17:01:08 |
    |  335 |    1 | 28340 | 2020-03-30 16:42:17 |       50 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!1072f53a-936e-4161-8778-7c2d299d7cdf   |       90 |    1 | 2020-03-30 17:04:17 |
    |  337 |    1 | 28340 | 2020-03-30 16:42:18 |       52 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!78b6c78d-1f06-4afc-a8bb-9c8cb6b2ae48   |       90 |    1 | 2020-03-30 17:07:19 |
    |  338 |    1 | 28340 | 2020-03-30 16:42:18 |       53 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!12bd9815-1186-4e8f-9b24-ea86e473ec81   |       90 |    1 | 2020-03-30 17:07:20 |
    |  340 |    1 | 28340 | 2020-03-30 16:42:19 |       55 | carbon-cache11.int.eu1.intgdc.com!splunkd-process!2ce12a70-379f-417b-a0bc-60776c0681dd   |       90 |    1 | 2020-03-30 17:12:45 |
    +------+------+-------+---------------------+----------+------------------------------------------------------------------------------------------+----------+------+---------------------+

MariaDB [icinga]> select * from icinga_objects where icinga_objects.object_id in(49207,28340,1354,90); +-----------+-------------+---------------+------------------------------------+-------------------+-----------+ | object_id | instance_id | objecttype_id | name1 | name2 | is_active | +-----------+-------------+---------------+------------------------------------+-------------------+-----------+ | 90 | 1 | 13 | icinga2-master01.int.na.intgdc.com | NULL | 1 | | 1354 | 1 | 1 | carbon-cache11.int.eu1.intgdc.com | NULL | 1 | | 28340 | 1 | 2 | carbon-cache11.int.eu1.intgdc.com | splunkd-process | 1 | | 49207 | 1 | 2 | carbon-cache11.int.eu1.intgdc.com | splunk-forwarders | 1 | +-----------+-------------+---------------+------------------------------------+-------------------+-----------+

MariaDB [icinga]> select service_id,instance_id,host_object_id,service_object_id as s_o_id,display_name from icinga_services where icinga_services.service_object_id in('49207','28340'); +------------+-------------+----------------+--------+----------------------+ | service_id | instance_id | host_object_id | s_o_id | display_name | +------------+-------------+----------------+--------+----------------------+ | 24549 | 1 | 1354 | 28340 | Splunk process check | | 46207 | 1 | 1354 | 49207 | Splunk forwarders | +------------+-------------+----------------+--------+----------------------+

MariaDB [icinga]> select host_id,host_object_id,alias,display_name, address from icinga_hosts where icinga_hosts.host_object_id = 1354; +---------+----------------+-----------------------------------+-----------------------------------+--------------+ | host_id | host_object_id | alias | display_name | address | +---------+----------------+-----------------------------------+-----------------------------------+--------------+ | 1007 | 1354 | carbon-cache11.int.eu1.intgdc.com | carbon-cache11.int.eu1.intgdc.com | 10.8.147.167 | +---------+----------------+-----------------------------------+-----------------------------------+--------------+


2. API request will not show them

curl -k -u root:REDACTED -H 'Accept: application/json' -H 'X-HTTP-Method-Override: GET' -X POST https://localhost:5665/v1/objects/comments -d '{ "type": "Comment", "filter": "comment.host_name==\"carbon-cache11.int.eu1.intgdc.com\"","pretty": true }' { "results": [] }

curl -s -k -u root:REDACTED -H 'Accept: application/json' -H 'X-HTTP-Method-Override: GET' -X POST https://localhost:5665/v1/objects/comments| jq '.'| grep carbon-cache11

``` though it will show some other: ``` curl -s -k -u root:__REDACTED__ -H 'Accept: application/json' -H 'X-HTTP-Method-Override: GET' -X POST https://localhost:5665/v1/objects/comments -d '{ "type": "Comment", "filter": "comment.host_name==\"carbon-cache12.int.eu1.intgdc.com\"","pretty": true }'|jq '.results[]| .name,.type' "carbon-cache12.int.eu1.intgdc.com!splunk-forwarders!06b0bfff-378a-45b2-9452-6da32d8b5717" "Comment" ``` 3. the icingaweb2 UI will show the comments (see screenshot) icinga_screenshot ## Expected behaviour API should return all objects from the backed when the filter matches ## Screenshots If applicable, add screenshots to help explain your problem. ## Your Environment Include as many relevant details about the environment you experienced the problem in * Version used (`icinga2 --version`): icinga2.x86_64 2.11.2-1.el7.icinga icinga2-bin.x86_64 2.11.2-1.el7.icinga icinga2-common.x86_64 2.11.2-1.el7.icinga icinga2-ido-mysql.x86_64 2.11.2-1.el7.icinga * Operating System and version: CentOS Linux release 7.7.1908 (Core) * Enabled features (`icinga2 feature list`): Disabled features: compatlog debuglog elasticsearch gelf graphite influxdb livestatus opentsdb perfdata statusdata syslog Enabled features: api checker command ido-mysql mainlog notification * Icinga Web 2 version and modules (System - About): Icinga Web 2 Version 2.7.3 Git commit 06cabfe8ba28cf545a42c92f25484383191a4e51 Git commit date 2019-10-18 * Config validation (`icinga2 daemon -C`): [2020-04-01 10:18:14 +0200] information/cli: Icinga application loader (version: 2.11.2-1) [2020-04-01 10:18:14 +0200] information/cli: Loading configuration file(s). [2020-04-01 10:18:14 +0200] information/ConfigItem: Committing config item(s). [2020-04-01 10:18:14 +0200] information/ApiListener: My API identity: icinga2-master01.int.na.intgdc.com [2020-04-01 10:18:24 +0200] information/WorkQueue: #4 (DaemonUtility::LoadConfigFiles) items: 0, rate: 13.2/s (792/min 792/5min 792/15min); [2020-04-01 10:18:24 +0200] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 0, rate: 0/s (0/min 0/5min 0/15min); [2020-04-01 10:18:24 +0200] information/WorkQueue: #5 (ApiListener, RelayQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min); [2020-04-01 10:18:24 +0200] information/WorkQueue: #6 (ApiListener, SyncQueue) items: 0, rate: 0/s (0/min 0/5min 0/15min); [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'lcm-mail-host' (in /etc/icinga2/zones.d/global/notifications.conf: 559:1-559:42) for type 'Notification' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'lcm-mail-service' (in /etc/icinga2/zones.d/global/notifications.conf: 570:1-570:48) for type 'Notification' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'ms-pd-host' (in /etc/icinga2/zones.d/global/notifications.conf: 591:1-591:39) for type 'Notification' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'ms-pd-service' (in /etc/icinga2/zones.d/global/notifications.conf: 613:1-613:45) for type 'Notification' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'cfal2-j4p_memory_heap' (in /etc/icinga2/zones.d/global/services-cfal.conf: 2:1-2:37) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'cfal2-j4p_memory_g1' (in /etc/icinga2/zones.d/global/services-cfal.conf: 16:1-16:35) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'cfal2-j4p_memory_gc_parallel' (in /etc/icinga2/zones.d/global/services-cfal.conf: 31:1-31:44) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'cfal-restapi-health' (in /etc/icinga2/zones.d/global/services-cfal.conf: 58:1-58:35) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'varnish-80' (in /etc/icinga2/zones.d/global/services-common.conf: 308:1-308:26) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vertica dc management' (in /etc/icinga2/zones.d/global/services-common.conf: 394:1-394:37) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vertica-ebs-space' (in /etc/icinga2/zones.d/global/services-common.conf: 423:1-423:33) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vertica-temp' (in /etc/icinga2/zones.d/global/services-common.conf: 478:1-478:28) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'gcf-running-tasks-limit' (in /etc/icinga2/zones.d/global/services-cps.conf: 55:1-55:39) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'sgcheck' (in /etc/icinga2/zones.d/global/services-cure.conf: 100:1-100:23) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_backend' (in /etc/icinga2/zones.d/global/services-cure.conf: 167:1-167:26) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'Status of vm_apiserver01' (in /etc/icinga2/zones.d/global/services-cure.conf: 179:1-179:40) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_apiserver02' (in /etc/icinga2/zones.d/global/services-cure.conf: 191:1-191:30) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_apiproxy01' (in /etc/icinga2/zones.d/global/services-cure.conf: 203:1-203:29) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_deploy' (in /etc/icinga2/zones.d/global/services-cure.conf: 215:1-215:25) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_glance01' (in /etc/icinga2/zones.d/global/services-cure.conf: 227:1-227:27) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_serverspec' (in /etc/icinga2/zones.d/global/services-cure.conf: 239:1-239:29) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_cml' (in /etc/icinga2/zones.d/global/services-cure.conf: 251:1-251:22) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vm_cmdb' (in /etc/icinga2/zones.d/global/services-cure.conf: 263:1-263:23) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'extfrag' (in /etc/icinga2/zones.d/global/services-cure.conf: 279:1-279:23) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vmswap' (in /etc/icinga2/zones.d/global/services-cure.conf: 292:1-292:22) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'drbd' (in /etc/icinga2/zones.d/global/services-cure.conf: 353:1-353:20) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'netappaggrs' (in /etc/icinga2/zones.d/global/services-cure.conf: 365:1-365:27) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'netappaggrs-aggr0' (in /etc/icinga2/zones.d/global/services-cure.conf: 394:1-394:33) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'mgmt-service-libvirt04' (in /etc/icinga2/zones.d/global/services-cure.conf: 564:1-564:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'mgmt-service-libvirt05' (in /etc/icinga2/zones.d/global/services-cure.conf: 576:1-576:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'mgmt-service-storage04' (in /etc/icinga2/zones.d/global/services-cure.conf: 588:1-588:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'mgmt-service-storage05' (in /etc/icinga2/zones.d/global/services-cure.conf: 600:1-600:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'control-service-libvirt01' (in /etc/icinga2/zones.d/global/services-cure.conf: 654:1-654:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'control-service-libvirt02' (in /etc/icinga2/zones.d/global/services-cure.conf: 666:1-666:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'control-service-storage01' (in /etc/icinga2/zones.d/global/services-cure.conf: 678:1-678:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'control-service-storage02' (in /etc/icinga2/zones.d/global/services-cure.conf: 690:1-690:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'keystone-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1160:1-1160:32) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'rabbitmq-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1232:1-1232:32) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'cman-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1321:1-1321:28) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'modclusterd-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1333:1-1333:35) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'rgmanager-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1345:1-1345:33) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'ricci-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1357:1-1357:29) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'serverspec-file-check' (in /etc/icinga2/zones.d/global/services-cure.conf: 1441:1-1441:37) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'serverspec-lastrun-check' (in /etc/icinga2/zones.d/global/services-cure.conf: 1452:1-1452:40) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'serverspec-lastrun-check-15m' (in /etc/icinga2/zones.d/global/services-cure.conf: 1467:1-1467:44) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'xdm-process' (in /etc/icinga2/zones.d/global/services-cure.conf: 1531:1-1531:27) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'remote ssh' (in /etc/icinga2/zones.d/global/services-cure.conf: 1560:1-1560:26) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'keysecure nae-xml port' (in /etc/icinga2/zones.d/global/services-cure.conf: 1574:1-1574:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'keysecure kmip port' (in /etc/icinga2/zones.d/global/services-cure.conf: 1587:1-1587:35) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'keysecure cluster port' (in /etc/icinga2/zones.d/global/services-cure.conf: 1600:1-1600:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'keysecure mgmt' (in /etc/icinga2/zones.d/global/services-cure.conf: 1613:1-1613:30) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'eureka-instances' (in /etc/icinga2/zones.d/global/services-eureka.conf: 1:0-1:31) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'minimac-load' (in /etc/icinga2/zones.d/global/services-ga.conf: 271:1-271:28) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'minimac-disk' (in /etc/icinga2/zones.d/global/services-ga.conf: 279:1-279:28) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'check-audio' (in /etc/icinga2/zones.d/global/services-ga.conf: 303:1-303:27) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'eureka-exceptions-hds' (in /etc/icinga2/zones.d/global/services-hds.conf: 41:1-41:37) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'eureka-exceptions-jdbc-proxy' (in /etc/icinga2/zones.d/global/services-hds.conf: 50:1-50:44) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'eureka-query-hostnames-hds' (in /etc/icinga2/zones.d/global/services-hds.conf: 59:1-59:42) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'eureka-query-hostnames-jdbc-proxy' (in /etc/icinga2/zones.d/global/services-hds.conf: 67:1-67:49) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'splunk-index-' (in /etc/icinga2/zones.d/global/services-monitoring.conf: 343:1-343:103) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'splunk-search-bundle-replication' (in /etc/icinga2/zones.d/global/services-monitoring.conf: 366:1-366:48) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'icinga_delayed' (in /etc/icinga2/zones.d/global/services-monitoring.conf: 505:1-505:30) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'ebs-space-carbon-cache' (in /etc/icinga2/zones.d/global/services-monitoring.conf: 705:1-705:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'fsmount-smoke' (in /etc/icinga2/zones.d/global/services-plat.conf: 70:1-70:29) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'foreman-openstack-diff' (in /etc/icinga2/zones.d/global/services-plat.conf: 450:1-450:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'jira-http' (in /etc/icinga2/zones.d/global/services-qa.conf: 15:1-15:25) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'backup-s3-backup_pgsql_sonar' (in /etc/icinga2/zones.d/global/services-qa.conf: 132:1-132:44) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'vault-is-unsealed' (in /etc/icinga2/zones.d/global/services-qa.conf: 165:1-165:33) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'jenkins-long-running-jobs' (in /etc/icinga2/zones.d/global/services-qa.conf: 219:1-219:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'docker-registry-port' (in /etc/icinga2/zones.d/global/services-qa.conf: 270:1-270:36) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'proxysql-connections' (in /etc/icinga2/zones.d/global/services-rolap.conf: 27:1-27:36) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'sdc-space' (in /etc/icinga2/zones.d/global/services-rolap.conf: 69:1-69:25) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'j4p_memory_heap' (in /etc/icinga2/zones.d/global/services-webapp.conf: 111:1-111:31) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'j4p_memory_pools_parallel' (in /etc/icinga2/zones.d/global/services-webapp.conf: 125:1-125:41) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] warning/ApplyRule: Apply rule 'j4p_memory_gc_parallel' (in /etc/icinga2/zones.d/global/services-webapp.conf: 139:1-139:38) for type 'Service' does not match anywhere! [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 FileLogger. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 62317 Dependencies. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 4 NotificationCommands. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 NotificationComponent. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 119114 Notifications. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 IcingaApplication. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 96 HostGroups. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 2129 Hosts. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 EventCommand. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 318 Downtimes. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 141 Comments. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 CheckerComponent. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 9 Zones. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 13 Endpoints. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 ExternalCommandListener. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 2 ApiUsers. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 18 UserGroups. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 ApiListener. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 1 IdoMysqlConnection. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 82 CheckCommands. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 2 TimePeriods. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 33 Users. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 64246 Services. [2020-04-01 10:18:49 +0200] information/ConfigItem: Instantiated 4 ServiceGroups. [2020-04-01 10:18:49 +0200] information/ScriptGlobal: Dumping variables to file '/var/cache/icinga2/icinga2.vars' [2020-04-01 10:18:49 +0200] information/cli: Finished validating the configuration file(s). * If you run multiple Icinga 2 instances, the `zones.conf` file (or `icinga2 object list --type Endpoint` and `icinga2 object list --type Zone`) from all affected nodes. [root@icinga2-master01:~] icinga2 object list --type Endpoint Object 'icinga2-satellite02.int.eu1.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 55:1-55:56 * __name = "icinga2-satellite02.int.eu1.intgdc.com" * host = "78.136.8.40" % = modified in '/etc/icinga2/zones.conf', lines 56:3-56:22 * log_duration = 86400 * name = "icinga2-satellite02.int.eu1.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 55 * last_column = 56 * last_line = 55 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite02.int.eu1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 55:1-55:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite01.int.eu1.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 52:1-52:56 * __name = "icinga2-satellite01.int.eu1.intgdc.com" * host = "78.136.2.247" % = modified in '/etc/icinga2/zones.conf', lines 53:3-53:23 * log_duration = 86400 * name = "icinga2-satellite01.int.eu1.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 52 * last_column = 56 * last_line = 52 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite01.int.eu1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 52:1-52:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite02.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 22:1-22:55 * __name = "icinga2-satellite02.int.na.intgdc.com" * host = "icinga2-satellite02.int.na.intgdc.com" % = modified in '/etc/icinga2/zones.conf', lines 23:3-23:48 * log_duration = 86400 * name = "icinga2-satellite02.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 22 * last_column = 55 * last_line = 22 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite02.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 22:1-22:55 * type = "Endpoint" * zone = "" Object 'icinga2-satellite02.int.na3.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 44:1-44:56 * __name = "icinga2-satellite02.int.na3.intgdc.com" * host = "148.62.70.143" % = modified in '/etc/icinga2/zones.conf', lines 45:3-45:24 * log_duration = 86400 * name = "icinga2-satellite02.int.na3.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 44 * last_column = 56 * last_line = 44 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite02.int.na3.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 44:1-44:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite02.int.ca1.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 65:1-65:56 * __name = "icinga2-satellite02.int.ca1.intgdc.com" * host = "" * log_duration = 86400 * name = "icinga2-satellite02.int.ca1.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 65 * last_column = 56 * last_line = 65 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite02.int.ca1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 65:1-65:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite03.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 14:1-14:55 * __name = "icinga2-satellite03.int.na.intgdc.com" * host = "icinga2-satellite03.int.na.intgdc.com" % = modified in '/etc/icinga2/zones.conf', lines 15:3-15:48 * log_duration = 86400 * name = "icinga2-satellite03.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 14 * last_column = 55 * last_line = 14 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite03.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 14:1-14:55 * type = "Endpoint" * zone = "" Object 'icinga2-satellite01.prague.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 72:1-72:55 * __name = "icinga2-satellite01.prague.intgdc.com" * host = "" * log_duration = 86400 * name = "icinga2-satellite01.prague.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 72 * last_column = 55 * last_line = 72 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite01.prague.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 72:1-72:55 * type = "Endpoint" * zone = "" Object 'icinga2-satellite01.int.ca1.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 63:1-63:56 * __name = "icinga2-satellite01.int.ca1.intgdc.com" * host = "" * log_duration = 86400 * name = "icinga2-satellite01.int.ca1.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 63 * last_column = 56 * last_line = 63 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite01.int.ca1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 63:1-63:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite04.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 30:1-30:55 * __name = "icinga2-satellite04.int.na.intgdc.com" * host = "icinga2-satellite04.int.na.intgdc.com" % = modified in '/etc/icinga2/zones.conf', lines 31:3-31:48 * log_duration = 86400 * name = "icinga2-satellite04.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 30 * last_column = 55 * last_line = 30 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite04.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 30:1-30:55 * type = "Endpoint" * zone = "" Object 'icinga2-satellite01.int.na3.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 41:1-41:56 * __name = "icinga2-satellite01.int.na3.intgdc.com" * host = "148.62.70.142" % = modified in '/etc/icinga2/zones.conf', lines 42:3-42:24 * log_duration = 86400 * name = "icinga2-satellite01.int.na3.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 41 * last_column = 56 * last_line = 41 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite01.int.na3.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 41:1-41:56 * type = "Endpoint" * zone = "" Object 'icinga2-satellite05.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 33:1-33:55 * __name = "icinga2-satellite05.int.na.intgdc.com" * host = "icinga2-satellite05.int.na.intgdc.com" % = modified in '/etc/icinga2/zones.conf', lines 34:3-34:48 * log_duration = 86400 * name = "icinga2-satellite05.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 33 * last_column = 55 * last_line = 33 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite05.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 33:1-33:55 * type = "Endpoint" * zone = "" Object 'icinga2-satellite01.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 11:1-11:55 * __name = "icinga2-satellite01.int.na.intgdc.com" * host = "icinga2-satellite01.int.na.intgdc.com" % = modified in '/etc/icinga2/zones.conf', lines 12:3-12:48 * log_duration = 86400 * name = "icinga2-satellite01.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 11 * last_column = 55 * last_line = 11 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-satellite01.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 11:1-11:55 * type = "Endpoint" * zone = "" Object 'icinga2-master01.int.na.intgdc.com' of type 'Endpoint': % declared in '/etc/icinga2/zones.conf', lines 5:1-5:52 * __name = "icinga2-master01.int.na.intgdc.com" * host = "" * log_duration = 86400 * name = "icinga2-master01.int.na.intgdc.com" * package = "_etc" * port = "5665" * source_location * first_column = 1 * first_line = 5 * last_column = 52 * last_line = 5 * path = "/etc/icinga2/zones.conf" * templates = [ "icinga2-master01.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 5:1-5:52 * type = "Endpoint" * zone = "" 20/04/01 10:20:39 rack-na/icinga2_master (icinga2-master), Infrastructure NA1 INTGDC (id 801) [root@icinga2-master01:~] icinga2 object list --type Zone Object 'master' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 7:1-7:20 * __name = "master" * endpoints = [ "icinga2-master01.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 8:3-8:52 * global = false * name = "master" * package = "_etc" * parent = "" * source_location * first_column = 1 * first_line = 7 * last_column = 20 * last_line = 7 * path = "/etc/icinga2/zones.conf" * templates = [ "master" ] % = modified in '/etc/icinga2/zones.conf', lines 7:1-7:20 * type = "Zone" * zone = "" Object 'eu1' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 58:1-58:17 * __name = "eu1" * endpoints = [ "icinga2-satellite01.int.eu1.intgdc.com", "icinga2-satellite02.int.eu1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 59:3-59:98 * global = false * name = "eu1" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 60:3-60:19 * source_location * first_column = 1 * first_line = 58 * last_column = 17 * last_line = 58 * path = "/etc/icinga2/zones.conf" * templates = [ "eu1" ] % = modified in '/etc/icinga2/zones.conf', lines 58:1-58:17 * type = "Zone" * zone = "" Object 'na-pc' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 36:1-36:19 * __name = "na-pc" * endpoints = [ "icinga2-satellite04.int.na.intgdc.com", "icinga2-satellite05.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 37:3-37:96 * global = false * name = "na-pc" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 38:3-38:19 * source_location * first_column = 1 * first_line = 36 * last_column = 19 * last_line = 36 * path = "/etc/icinga2/zones.conf" * templates = [ "na-pc" ] % = modified in '/etc/icinga2/zones.conf', lines 36:1-36:19 * type = "Zone" * zone = "" Object 'na' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 17:1-17:16 * __name = "na" * endpoints = [ "icinga2-satellite01.int.na.intgdc.com", "icinga2-satellite03.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 18:3-18:96 * global = false * name = "na" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 19:3-19:19 * source_location * first_column = 1 * first_line = 17 * last_column = 16 * last_line = 17 * path = "/etc/icinga2/zones.conf" * templates = [ "na" ] % = modified in '/etc/icinga2/zones.conf', lines 17:1-17:16 * type = "Zone" * zone = "" Object 'na-dev' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 25:1-25:20 * __name = "na-dev" * endpoints = [ "icinga2-satellite02.int.na.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 26:3-26:55 * global = false * name = "na-dev" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 27:3-27:19 * source_location * first_column = 1 * first_line = 25 * last_column = 20 * last_line = 25 * path = "/etc/icinga2/zones.conf" * templates = [ "na-dev" ] % = modified in '/etc/icinga2/zones.conf', lines 25:1-25:20 * type = "Zone" * zone = "" Object 'na3' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 47:1-47:17 * __name = "na3" * endpoints = [ "icinga2-satellite01.int.na3.intgdc.com", "icinga2-satellite02.int.na3.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 48:3-48:98 * global = false * name = "na3" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 49:3-49:19 * source_location * first_column = 1 * first_line = 47 * last_column = 17 * last_line = 47 * path = "/etc/icinga2/zones.conf" * templates = [ "na3" ] % = modified in '/etc/icinga2/zones.conf', lines 47:1-47:17 * type = "Zone" * zone = "" Object 'global' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 1:0-1:19 * __name = "global" * endpoints = null * global = true % = modified in '/etc/icinga2/zones.conf', lines 2:3-2:15 * name = "global" * package = "_etc" * parent = "" * source_location * first_column = 0 * first_line = 1 * last_column = 19 * last_line = 1 * path = "/etc/icinga2/zones.conf" * templates = [ "global" ] % = modified in '/etc/icinga2/zones.conf', lines 1:0-1:19 * type = "Zone" * zone = "" Object 'offices' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 74:1-74:21 * __name = "offices" * endpoints = [ "icinga2-satellite01.prague.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 75:3-75:55 * global = false * name = "offices" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 76:3-76:19 * source_location * first_column = 1 * first_line = 74 * last_column = 21 * last_line = 74 * path = "/etc/icinga2/zones.conf" * templates = [ "offices" ] % = modified in '/etc/icinga2/zones.conf', lines 74:1-74:21 * type = "Zone" * zone = "" Object 'ca1' of type 'Zone': % declared in '/etc/icinga2/zones.conf', lines 67:1-67:17 * __name = "ca1" * endpoints = [ "icinga2-satellite01.int.ca1.intgdc.com", "icinga2-satellite02.int.ca1.intgdc.com" ] % = modified in '/etc/icinga2/zones.conf', lines 68:3-68:98 * global = false * name = "ca1" * package = "_etc" * parent = "master" % = modified in '/etc/icinga2/zones.conf', lines 69:3-69:19 * source_location * first_column = 1 * first_line = 67 * last_column = 17 * last_line = 67 * path = "/etc/icinga2/zones.conf" * templates = [ "ca1" ] % = modified in '/etc/icinga2/zones.conf', lines 67:1-67:17 * type = "Zone" * zone = "" ## Additional context Add any other context about the problem here.
lippserd commented 4 years ago

Hi,

I also think that this problem originated from the command pipe usage. The deletion of the comment in Icinga 2 itself worked but the deletion from the database not. Is it true that you tried to delete all those comments in Web 2? How did you create those comments in the first place? And do they appear with icinga2 object list --type Comment | grep carbon-cache11?

Comments in Icinga 2 itself are DSL objects and thus can be listed with the above command.

All the best, Eric

vladimir-pachnik commented 4 years ago

Hello,

Best regards

tomabg commented 3 years ago

i have this same issue.. created comments via API are not possible to delete anymore Whether by IcingaWeb2 nor by API

tomabg commented 3 years ago

however after restarting icinga2 the comments are deleted. for UI created comments its possible to delete via UI/API

julianbrost commented 2 years ago

The icinga2 process is the source of truth which comments currently do exist, so the issue here is that these weren't deleted from the IDO database rather than not being returned in the API. Given that Icinga DB was now released and the IDO was deprecated, this issue most likely won't receive anymore attention. Should you observe something similar with Icinga DB, please open another issue.