Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #3981] Migrate old filter to new ones #1109

Closed
icinga-migration opened this issue Apr 18, 2013 · 3 comments
Closed

[dev.icinga.com #3981] Migrate old filter to new ones #1109

icinga-migration opened this issue Apr 18, 2013 · 3 comments

Comments

@icinga-migration
Copy link

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

Created by mhein on 2013-04-18 10:33:36 +00:00

Assignee: mhein
Status: Resolved (closed on 2013-04-18 13:57:31 +00:00)
Target Version: 1.9
Last Update: 2013-04-18 13:59:04 +00:00 (in Redmine)


As a user I want to use my old filter definitions in custom cronks also with the new system.

Realized with a phing build target.

Changesets

2013-04-18 12:26:14 +00:00 by mhein 6fe69ed

Migrate old filter to new ones

Rewrite the cronk upgrade system. Move iterator
into a abstract iterator class to implement
specific hooks into own classes.

refs #3981

2013-04-18 13:53:24 +00:00 by mhein e3e0433

Migrate old filter to new ones

Implements phing build task which uses old filter
structs in state of custom cronks and convert it
into new format (refs #3260). So filter can be
used beyond version.

fixes #3981

Relations:

@icinga-migration
Copy link
Author

Updated by mhein on 2013-04-18 13:11:18 +00:00

Explanations of datastructure

The state implements a couple of data which belongs to filter.

New structure

New filter stored in key "filter" with encoded json data, e.g.:

{"AND":[{"field":"host_name","label":"Host","operator":"contain","value":"bayerpharma-lb"}]}

Old structore

Important data is stored in the key "filter_params", e.g.:

  array(2) {
    'f[service_name-operator]' =>
    string(2) "60"
    'f[service_name-value]' =>
    string(4) "disk"
  }

A query item contains to entries, suffixed with "-operator" (Integer SQL constant) and on '-value' (Value for query).

There is also data for the filter box with additional information. Stored in key "filter_types". This key can be dropped completely

New operators:

Operators are translated btw, current list we support:

  • is
  • contain
  • =
  • >
  • <

@icinga-migration
Copy link
Author

Updated by mhein on 2013-04-18 13:57:31 +00:00

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

Applied in changeset e3e0433.

@icinga-migration
Copy link
Author

Updated by mhein on 2013-04-18 13:59:04 +00:00

To upgrade filter of all cronks

$ cd etc/
$ ../bin/phing upgrade-cronk-filter

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

No branches or pull requests

1 participant