Skip to content
This repository has been archived by the owner. It is now read-only.

[dev.icinga.com #4479] idomod.cfg: allow to disable customvar status updates with dump_customvar_status=0|1 #1318

Closed
icinga-migration opened this issue Jul 30, 2013 · 7 comments
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Jul 30, 2013

This issue has been migrated from Redmine: https://dev.icinga.com/issues/4479

Created by mfriedrich on 2013-07-30 08:00:23 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2013-09-21 16:33:24 +00:00)
Target Version: 1.10
Last Update: 2014-12-08 14:38:12 +00:00 (in Redmine)


it's heavy impact on every host/service status update event, and should be made much more transparent in order to remove it from dumps.

Attachments

Changesets

2013-09-14 17:26:22 +00:00 by (unknown) 2c0e691

idoutils: allow to disable customvar status updates with dump_customvar_status=0|1 in idomod.cfg

this commit also contains a fix for not making a difference between
customvariable config and status data buffers.

the new default is disabling customvar status updates (if config option
is not set), as in most scenarios these updates/table remains useless
afterall. the customvar status updates are forcibly triggered on *every*
host/service (check) update and may decrease rdbms performance in large
scale systems having lots of custom variables applied (i.e. for
filters/restrictions in icinga web).

refs #4479

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 14, 2013

Updated by mfriedrich on 2013-09-14 17:19:33 +00:00

  • File added icinga_idoutils_1.10_dump_customvar_status_4479.png

using the following config to trigger customvar status updates on demand (found in git next tests/etc too)

icinga_idoutils_1.10_dump_customvar_status_4479.png

imagine /etc/icinga # tail -f /var/log/icinga/ido2db.debug | grep customvariablestatus
^C
imagine /etc/icinga # vim idomod.cfg
-dump_customvar_status=0
+dump_customvar_status=1
imagine /etc/icinga # rm /var/log/icinga/ido2db.debug ; service ido2db restart ; service icinga restart
Stopping ido2db: done.
Starting ido2db: done.
Running configuration check...OK
Stopping icinga: .Stopping icinga done.
Starting icinga: Starting icinga done.
imagine /etc/icinga # tail -f /var/log/icinga/ido2db.debug | grep customvariablestatus
Sat Sep 14 19:15:34 2013 .580021 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:34 2013 .580043 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178934), has_been_modified=0, varvalue='cv bumsti02' WHERE object_id=197 AND varname='CV'
Sat Sep 14 19:15:34 2013 .580193 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:34 2013 .580222 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:34 2013 .580237 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178934), has_been_modified=0, varvalue='uraergergeheim' WHERE object_id=197 AND varname='PASSWORD'
Sat Sep 14 19:15:34 2013 .580362 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:34 2013 .580392 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:34 2013 .580408 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178934), has_been_modified=0, varvalue='cn=icinga2-dev-svc,ou=icinga,ou=main,ou=IcingaConfig,ou=LConf,dc=icinga,dc=org' WHERE object_id=197 AND varname='DN'
Sat Sep 14 19:15:34 2013 .580539 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .218722 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .218763 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='cv bumsti02' WHERE object_id=197 AND varname='CV'
Sat Sep 14 19:15:38 2013 .219333 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .219433 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .219487 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='uraergergeheim' WHERE object_id=197 AND varname='PASSWORD'
Sat Sep 14 19:15:38 2013 .219948 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .220041 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .220099 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='cn=icinga2-dev-svc,ou=icinga,ou=main,ou=IcingaConfig,ou=LConf,dc=icinga,dc=org' WHERE object_id=197 AND varname='DN'
Sat Sep 14 19:15:38 2013 .220369 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .230698 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .230737 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='cv bumsti02' WHERE object_id=197 AND varname='CV'
Sat Sep 14 19:15:38 2013 .231086 [002.0] [pid=6347] [tid=140632475784960] SELECT customvariablestatus_id FROM icinga_customvariablestatus WHERE object_id=197 AND varname='CV'
Sat Sep 14 19:15:38 2013 .231428 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .231513 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .231566 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='uraergergeheim' WHERE object_id=197 AND varname='PASSWORD'
Sat Sep 14 19:15:38 2013 .231990 [002.0] [pid=6347] [tid=140632475784960] SELECT customvariablestatus_id FROM icinga_customvariablestatus WHERE object_id=197 AND varname='PASSWORD'
Sat Sep 14 19:15:38 2013 .232319 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end
Sat Sep 14 19:15:38 2013 .232417 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() start
Sat Sep 14 19:15:38 2013 .232466 [002.0] [pid=6347] [tid=140632475784960] UPDATE icinga_customvariablestatus SET instance_id=2, status_update_time=FROM_UNIXTIME(1379178938), has_been_modified=0, varvalue='cn=icinga2-dev-svc,ou=icinga,ou=main,ou=IcingaConfig,ou=LConf,dc=icinga,dc=org' WHERE object_id=197 AND varname='DN'
Sat Sep 14 19:15:38 2013 .232800 [002.0] [pid=6347] [tid=140632475784960] SELECT customvariablestatus_id FROM icinga_customvariablestatus WHERE object_id=197 AND varname='DN'
Sat Sep 14 19:15:38 2013 .233032 [001.2] [pid=6347] [tid=140632475784960] ido2db_query_insert_or_update_save_custom_variables_customvariablestatus_add() end

further, idoutils does not make a difference between customvars at config time and at runtime, which should be fixed too (introducing new data types for the protoapi).

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 14, 2013

Updated by mfriedrich on 2013-09-14 17:22:53 +00:00

dump_customvar_status=1

mysql> select count(*) from icinga_customvariables;
+----------+
| count(*) |
+----------+
|       68 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from icinga_customvariablestatus;
+----------+
| count(*) |
+----------+
|       68 |
+----------+
1 row in set (0.00 sec)

dump_customvar_status=0

mysql> select count(*) from icinga_customvariables;
+----------+
| count(*) |
+----------+
|       68 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from icinga_customvariablestatus;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 14, 2013

Updated by mfriedrich on 2013-09-14 17:29:05 +00:00

  • Subject changed from idomod.cfg: allow to disable customvar status updates to idomod.cfg: allow to disable customvar status updates with dump_customvar_status=0|1

    DUMP CUSTOMVAR STATUS

    Custom variables are dumped as required configuration on core startup,

    but also during runtime (there may be modifications via external commands).

    Since these updates happen on each host/service/contact status update without

    any possibility to filter via data_processing_options, this is made a seperate

    config option. In most scenarios, those updates are not required, therefore

    the default option is disabled.

    Values: 0 = disabled (default)

    1 = enabled

    dump_customvar_status=0

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 14, 2013

Updated by mfriedrich on 2013-09-14 17:30:42 +00:00

  • Status changed from Assigned to Feedback
  • Done % changed from 0 to 100
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 14, 2013

Updated by mfriedrich on 2013-09-14 17:30:51 +00:00

  • Category set to 82
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Sep 21, 2013

Updated by mfriedrich on 2013-09-21 16:33:24 +00:00

  • Status changed from Feedback to Resolved
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 8, 2014

Updated by mfriedrich on 2014-12-08 14:38:12 +00:00

  • Project changed from 18 to Core, Classic UI, IDOUtils
  • Category changed from 82 to IDOUtils
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant
You can’t perform that action at this time.