Skip to content
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

[dev.icinga.com #5219] Cluster support for modified attributes #977

Closed
icinga-migration opened this issue Nov 26, 2013 · 22 comments

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Nov 26, 2013

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

Created by gbeutner on 2013-11-26 12:56:55 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2014-08-26 15:20:04 +00:00)
Target Version: 2.1.0
Last Update: 2014-08-26 15:20:04 +00:00 (in Redmine)


EnableNotifications   x
EnableActiveChecks    x
EnablePassiveChecks   x
EnableFlapping        x
EnableEventHandler    o
EnablePerfdata        o
CheckInterval         o
RetryInterval         o
EventCommand          o
CheckCommand          o
MaxCheckAttempts      o
CheckPeriod           o        
Vars                  o

Changesets

2014-05-10 15:24:39 +00:00 by (unknown) 7730cc9

ModifiedAttributes for Enable* must call signals.

Refs #6151
Refs #5219

2014-05-19 16:17:47 +00:00 by (unknown) af95181

Add MessageOrigin to OnVarsChanged.

Refs #6187
Refs #5219

2014-08-26 09:48:46 +00:00 by (unknown) 6f7f2f6

Add OnEnableEventHandlerChanged event

refs #5219

2014-08-26 10:02:55 +00:00 by (unknown) 2cdf2a5

Add On{Check,Retry}IntervalChanged event

refs #5219

2014-08-26 11:13:12 +00:00 by (unknown) 501e9eb

Add On{Event,Check}CommandChanged event

refs #5219

2014-08-26 11:18:02 +00:00 by (unknown) 94282fe

Add OnMaxCheckAttemptsChanged event

refs #5219

2014-08-26 11:25:15 +00:00 by (unknown) 6f54c7b

Add OnCheckPeriodChanged event

refs #5219

2014-08-26 12:59:55 +00:00 by (unknown) e452777

Modify OnVarsChanged event to pass values

refs #5219

2014-08-26 14:40:13 +00:00 by (unknown) 378861b

Add cluster api events for modified attributes support

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) d53fced

Add OnEnableEventHandlerChanged event

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) 3899601

Add On{Check,Retry}IntervalChanged event

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) 552d0a7

Add On{Event,Check}CommandChanged event

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) 0db1b50

Add OnMaxCheckAttemptsChanged event

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) 31c9406

Add OnCheckPeriodChanged event

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) aedef8a

Modify OnVarsChanged event to pass values

refs #5219

2014-08-26 15:11:19 +00:00 by (unknown) 626a68e

Add cluster api events for modified attributes support

refs #5219

2014-08-26 15:16:11 +00:00 by (unknown) 520884f

Merge branch 'feature/mod-attr-cluster-5219'

fixes #5219

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 3, 2013

Updated by mfriedrich on 2013-12-03 08:21:52 +00:00

  • Target Version changed from 0.0.5 to 0.0.6
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Dec 18, 2013

Updated by mfriedrich on 2013-12-18 15:47:14 +00:00

  • Target Version changed from 0.0.6 to 0.0.7
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 6, 2014

Updated by mfriedrich on 2014-02-06 10:12:28 +00:00

  • Target Version changed from 0.0.7 to 0.0.8
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 10, 2014

Updated by mfriedrich on 2014-03-10 16:47:05 +00:00

  • Target Version changed from 0.0.8 to 0.0.9
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 31, 2014

Updated by mfriedrich on 2014-03-31 12:14:19 +00:00

  • Target Version changed from 0.0.9 to 0.0.10
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Apr 29, 2014

Updated by mfriedrich on 2014-04-29 12:14:03 +00:00

  • Target Version changed from 0.0.10 to 0.0.11
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented May 10, 2014

Updated by mfriedrich on 2014-05-10 15:18:48 +00:00

One problem I see:

OnVarsChanged() is owned by libbase. In order to add the MessageOrigin, libbase must link against libremote.

Possible solution:

Add IcingaObject in between DynamicObject and Checkable, User, Command and add ModifiedAttributes, Vars, etc over there, leaving DynamicObject untouched.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented May 16, 2014

Updated by gbeutner on 2014-05-16 09:45:29 +00:00

  • Target Version changed from 0.0.11 to 2.0 Beta 1
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented May 21, 2014

Updated by mfriedrich on 2014-05-21 13:07:18 +00:00

  • Target Version changed from 2.0 Beta 1 to 2.1.0
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 10, 2014

Updated by mfriedrich on 2014-07-10 08:21:48 +00:00

  • Target Version deleted 2.1.0
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 11, 2014

Updated by gbeutner on 2014-07-11 09:45:30 +00:00

  • Target Version set to 2.1.0
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 11, 2014

Updated by gbeutner on 2014-07-11 10:28:29 +00:00

  • Subject changed from Implement cluster support for modified attributes to Cluster support for modified attributes
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 11, 2014

Updated by gbeutner on 2014-07-11 10:31:08 +00:00

  • Assigned to deleted gbeutner
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 11, 2014

Updated by gbeutner on 2014-07-11 10:39:10 +00:00

  • Estimated Hours set to 24
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jul 11, 2014

Updated by gbeutner on 2014-07-11 10:40:12 +00:00

Required changes:

  • Figure out what's working so far
  • Discuss changes
  • Finish implementation
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 08:09:52 +00:00

  • Assigned to set to mfriedrich
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 08:10:22 +00:00

  • Status changed from New to Assigned
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 09:37:03 +00:00

  • Description updated
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 14:41:36 +00:00

The most difficult example:

CV os=FOOBAROS -> change

michi@nbmif ~ $ echo "[`date +%s`] CHANGE_CUSTOM_HOST_VAR;localhost;os;abc" >> /home/michi/coding/icinga/icinga2-tests/ha/icinga2a/run/icinga2/cmd/icinga2.cmd

icinga2a (config master, command pipe receiver)

[2014-08-26 16:26:27 +0200] information/ExternalCommandListener: Executing external command: [1409063187] CHANGE_CUSTOM_HOST_VAR;localhost;os;abc
[2014-08-26 16:26:27 +0200] notice/ExternalCommandProcessor: Changing custom var 'os' for host 'localhost' to value 'abc'
[2014-08-26 16:26:27 +0200] notice/ApiListener: Relaying 'event::SetVars' message
[2014-08-26 16:26:27 +0200] notice/ApiListener: Sending message to 'icinga2b'

icinga2b (with db ido mysql enabled)

[2014-08-26 16:26:27 +0200] notice/ApiClient: Received 'event::SetVars' message from 'icinga2a'
[2014-08-26 16:26:27 +0200] debug/DbObject: Vars changed for object 'localhost'
[2014-08-26 16:26:27 +0200] notice/ApiListener: Relaying 'event::SetVars' message
[2014-08-26 16:26:27 +0200] debug/DbObject: Updating object vars for 'localhost'
[2014-08-26 16:26:27 +0200] debug/DbObject: object customvar key: 'os' value: 'abc' overridden: 1
[2014-08-26 16:26:27 +0200] debug/DbObject: object customvar key: 'sla' value: '24x7' overridden: 1
[2014-08-26 16:26:27 +0200] debug/IdoMysqlConnection: Query: UPDATE icinga_customvariablestatus SET has_been_modified = '1',  instance_id = 1,  object_id = 16434,  status_update_time = FROM_UNIXTIME(1409063187),  varname = 'os',  varvalue = 'abc' WHERE object_id = 16434 AND varname = 'os'
[2014-08-26 16:26:27 +0200] debug/IdoMysqlConnection: Query: UPDATE icinga_customvariablestatus SET has_been_modified = '1',  instance_id = 1,  object_id = 16434,  status_update_time = FROM_UNIXTIME(1409063187),  varname = 'sla',  varvalue = '24x7' WHERE object_id = 16434 AND varname = 'sla'

db ido mysql before and after

MariaDB [icinga]> select * from icinga_customvariablestatus cvs join icinga_objects ocvs on cvs.object_id=ocvs.object_id where ocvs.name1='localhost';
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
| customvariablestatus_id | instance_id | object_id | status_update_time  | has_been_modified | varname | varvalue | endpoint_object_id | object_id | instance_id | objecttype_id | name1     | name2  | is_active |
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
|                   14671 |           1 |     16434 | 2014-08-26 16:24:27 |                 1 | os      | FOOBAROS |               NULL |     16434 |           1 |             1 | localhost | NULL   |         1 |
|                   14672 |           1 |     16434 | 2014-08-26 16:24:27 |                 1 | sla     | 24x7     |               NULL |     16434 |           1 |             1 | localhost | NULL   |         1 |
|                   14674 |           1 |     16542 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16542 |           1 |             2 | localhost | disk   |         1 |
|                   14681 |           1 |     16752 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16752 |           1 |             2 | localhost | ping6  |         1 |
|                   14682 |           1 |     16755 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16755 |           1 |             2 | localhost | ping4  |         1 |
|                   14678 |           1 |     16799 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16799 |           1 |             2 | localhost | icinga |         1 |
|                   14675 |           1 |     16800 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16800 |           1 |             2 | localhost | ssh    |         1 |
|                   14677 |           1 |     16803 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16803 |           1 |             2 | localhost | load   |         1 |
|                   14676 |           1 |     16804 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16804 |           1 |             2 | localhost | procs  |         1 |
|                   14673 |           1 |     16806 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16806 |           1 |             2 | localhost | http   |         1 |
|                   14679 |           1 |     16807 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16807 |           1 |             2 | localhost | users  |         1 |
|                   14680 |           1 |     16809 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16809 |           1 |             2 | localhost | swap   |         1 |
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
12 rows in set (0.00 sec)

MariaDB [icinga]> select * from icinga_customvariablestatus cvs join icinga_objects ocvs on cvs.object_id=ocvs.object_id where ocvs.name1='localhost';
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
| customvariablestatus_id | instance_id | object_id | status_update_time  | has_been_modified | varname | varvalue | endpoint_object_id | object_id | instance_id | objecttype_id | name1     | name2  | is_active |
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
|                   14671 |           1 |     16434 | 2014-08-26 16:26:27 |                 1 | os      | abc      |               NULL |     16434 |           1 |             1 | localhost | NULL   |         1 |
|                   14672 |           1 |     16434 | 2014-08-26 16:26:27 |                 1 | sla     | 24x7     |               NULL |     16434 |           1 |             1 | localhost | NULL   |         1 |
|                   14674 |           1 |     16542 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16542 |           1 |             2 | localhost | disk   |         1 |
|                   14681 |           1 |     16752 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16752 |           1 |             2 | localhost | ping6  |         1 |
|                   14682 |           1 |     16755 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16755 |           1 |             2 | localhost | ping4  |         1 |
|                   14678 |           1 |     16799 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16799 |           1 |             2 | localhost | icinga |         1 |
|                   14675 |           1 |     16800 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16800 |           1 |             2 | localhost | ssh    |         1 |
|                   14677 |           1 |     16803 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16803 |           1 |             2 | localhost | load   |         1 |
|                   14676 |           1 |     16804 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16804 |           1 |             2 | localhost | procs  |         1 |
|                   14673 |           1 |     16806 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16806 |           1 |             2 | localhost | http   |         1 |
|                   14679 |           1 |     16807 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16807 |           1 |             2 | localhost | users  |         1 |
|                   14680 |           1 |     16809 | 2014-08-26 16:24:27 |                 0 | sla     | 24x7     |               NULL |     16809 |           1 |             2 | localhost | swap   |         1 |
+-------------------------+-------------+-----------+---------------------+-------------------+---------+----------+--------------------+-----------+-------------+---------------+-----------+--------+-----------+
12 rows in set (0.00 sec)
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 14:55:47 +00:00

  • Relates set to 7012
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by mfriedrich on 2014-08-26 14:58:46 +00:00

  • Relates set to 7013
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Aug 26, 2014

Updated by Anonymous on 2014-08-26 15:20:04 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 520884f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.