See www.zabbix.com for the official Zabbix site.

Docs/specs/ZBXNEXT-1343

From Zabbix.org
Jump to: navigation, search

Remove support of old style DM

ZBXNEXT-1343

Status: v1.12

Owner: Alexei Vladishev

Summary

Current implementation of distributed monitoring (DM) has some limitations and cannot be reliably used for larger environments. The limitations will be resolved in next generation DM planned to be implemented in the future (no ETA).

Specification

Support of node-based DM should be removed from all components of Zabbix.

Details

General
  • All node-based DM functionality will be removed
  • Configuration and historical information will be preserved for all nodes
  • Database structure will be modified to have more constraints
  • Documentation will be modified to explain it
  • Maximum value for all IDs is extended to unsigned 64 bit integer. Node ID is no longer part of IDs.
Upgrade path from existing DM setup
  • If Zabbix is running in DM setup each node will be transformed into standalone Zabbix setup by keeping local node information and also information from other nodes.
Server side
  • Remove configuration options NodeID, NodeNoEvents and NodeNoHistory
  • Remove command line option -n
  • Remove support of {NODE.ID} and {NODE.NAME} macros
  • Remove support for zabbix[process, node watcher] internal item
Front-end side and API
  • Remove Administration -> DM -> Nodes
  • Rename Administration -> DM to Administration -> Proxies
  • Remove global selection of nodes
  • Remove displaying of node related information everywhere

Database changes

  • Remove tables nodes, node_cksum, history_sync, history_uint_sync and history_str_sync
  • Remove field ids.nodeid.
  • New or updated (if already exists non-unique) unique indexes: maintenances.name, slideshows.name, drules.name, valuemaps.name, media_type.description, users.alias, usrgrp.name, scripts.name, actions.name, graph_theme.description, globalmacro.macro, icon_map.name, sysmaps.name, regexps.name, images.name (remove existing imagetype+name)
    • Zabbix will verify that there is no duplicate data in the database before creating a new unique index. If duplicate data found, Zabbix will stop with critical error message "Duplicate data for field %s is found in table %s. Remove it manually and restart the process." in the log.
  • Primary key of ids should be modified to table_name+field_name
  • Delete the following data:
    • Entries with idx web.nodes.php.sortorder, web.popup_right.nodeid.last, web.nodes.switch_node, web.nodes.selected from the profiles table;
    • Audit records with resourcetype equal to 21 from the auditlog table (node related audit records);
    • Action conditions with conditiontype equal to 17 from the conditions table (node conditions), the actions themselves should remain unaltered.
  • Information from non-local nodes
    • The information will be preserved however values of unique fields will be modified
    • Affected fields: maintenances.name, hosts.host, hosts.name, groups.name, screens.name, slideshows.name, drules.name, valuemaps.name, media_type.description, users.alias, usrgrp.name, scripts.name, actions.name, graph_theme.description, globalmacro.macro, services.name, icon_map.name, sysmaps.name, regexps.name, images.name
    • All the fields will be prefixes with N<nodeid>_ in order to maintain uniqueness. If length of the new value exceeds max field size, it will be trimmed. Highly unlikely, but if the new value already exists in the database, the situation will be caught by a check on duplicates. Global macros will be processed in a special way by adding N<nodeid>_ after dollar sign, for example, {$N123_MACRO}.
  • Records from non-local nodes in table config will be deleted

Documentation

Jira

  • Close all DM related issues (ZBX, ZBXNEXT projects) as "Won't fix" with a link to the ZBXNEXT-1343

Test cases

  • Upgrade from 2.2 standalone setup must work fine
  • Upgrade from 2.2 DM setup must work fine
  • One of tables with new unique index has duplicate data. Zabbix should complain before applying any patches.
  • Server man pages are updated
  • Server online help (--help) is updated

ChangeLog

  • v1.1
    • Server side:
      • remove utils (it has only functionality of "node change")
      • remove nodewatcher process
      • remove nodes support from trapper
      • rename "nodecommand" in file names and functions to "command"
  • v1.2
    • Remove nodewatcher internal monitoring item from the default Zabbix server template
  • v1.3
    • Added a list of entries that should be removed from the database
  • v1.4
    • Added a list of removed macros
  • v1.5
    • Database changes: remove ZBX_SYNC, ZBX_HISTORY and ZBX_HISTORY_SYNC flags from schema
    • Server side: remove ZBX_SYNC, ZBX_HISTORY and ZBX_HISTORY_SYNC flags from the code
  • v1.6
    • It is decided to preserve existing configuration and historical data for non-local nodes.
  • 1.7
    • Removed hosts.host, hosts.name unique indexes; they can't be created since proxies can have an identical name with a host
  • 1.8
    • Removed groups.name unique index; it can't be created since can have identical groups prototypes
    • Removed screens.name unique index; it can't be created since can have identical templated screens
  • 1.9
    • Removed automatic adding of extra '_' if such object already exists
    • Added information about processing of global macros
  • 1.10
    • Records from non-local nodes in table config will be deleted
  • 1.11
    • Removed services.name unique index; it can't be created since services can have identical names
  • 1.12
    • Added information about zabbix[process, node watcher] item removal