Zabbix Upgrade 2.0 to 2.2 on RHEL 6 PostgreSQL with Paritioning

This post is not yet complete!

Upgrade Zabbix from 2.0.x to 2.2.x on RHEL.

My install is based on PostgreSQL 9.2.4 and partitioned to avoid the performance hit of the housekeeper process.

Stats as of Jan 2014:

  • Server: 64G RAM, Dual Intel(R) Xeon(R) CPU E5-2670 0 @ 2.60GHz
  • Database Size: 340G (RAID10 15k SAS)
  • Hosts: 931
  • Items: 54,023
  • Triggers: 13,387
  • Values Per Second: 1,154
  • Proxies: 6

The Zabbix 2.0 server package in EPEL is called zabbix20-server and the 2.2 package is... zabbix22-server. So you can't just yum update, you'll have to replace the packages.

Steps

  • read the docs
  • stop the zabbix-server
  • uninstall zabbix20 RPMs
  • install zabbix22 RPMs

Read the docs

See these Zabbix docs:

  • Upgrade Notes The takeaway... Housekeeping disabled by default, but now more configurable.
  • What's New The takeaway... VMware monitoring, web templates, watch for warnings in log and consider increasing ValueCacheSize
  • descriptions of settings

Install the new version of Zabbix Server

rpm -e \
    zabbix20-2.0.9-2.el6.x86_64 \
    zabbix20-server-2.0.9-2.el6.x86_64 \
    zabbix20-server-pgsql-2.0.9-2.el6.x86_64 \
    zabbix20-web-pgsql-2.0.9-2.el6.noarch \
    zabbix20-web-2.0.9-2.el6.noarch

rpm -Uvh \
        zabbix22-2.2.1-1.el6.x86_64.rpm \
        zabbix22-server-2.2.1-1.el6.x86_64.rpm \
        zabbix22-server-pgsql-2.2.1-1.el6.x86_64.rpm \
        zabbix22-web-2.2.1-1.el6.noarch.rpm \
        zabbix22-web-pgsql-2.2.1-1.el6.noarch.rpm

Configure Zabbix 2.2 Server

Look at all the new settings in the server config

--- zabbix_server.conf.rpmsave  2013-12-31 13:12:03.381520625 -0800
+++ zabbix_server.conf  2013-12-26 17:51:26.000000000 -0800
@@ -108,7 +108,7 @@
 #
 # Mandatory: no
 # Default:
-DBPassword=039ea38bf55151d627bzabbix-upgrade
+# DBPassword=

 ### Option: DBSocket
 #      Path to MySQL socket.
@@ -185,6 +185,16 @@
 # Default:
 # StartHTTPPollers=1

+### Option: StartTimers
+#      Number of pre-forked instances of timers.
+#      Timers process time-based trigger functions and maintenance periods.
+#      Only the first timer process handles the maintenance periods.
+#
+# Mandatory: no
+# Range: 1-1000
+# Default:
+# StartTimers=1
+
 ### Option: JavaGateway
 #      IP address (or hostname) of Zabbix Java gateway.
 #      Only required if Java pollers are started.
@@ -209,6 +219,32 @@
 # Default:
 # StartJavaPollers=0

+### Option: StartVMwareCollectors
+#      Number of pre-forked vmware collector instances.
+#
+# Mandatory: no
+# Range: 0-250
+# Default:
+# StartVMwareCollectors=0
+
+### Option: VMwareFrequency
+#      How often Zabbix will connect to VMware service to obtain a new data.
+#
+# Mandatory: no
+# Range: 10-86400
+# Default:
+# VMwareFrequency=60
+
+### Option: VMwareCacheSize
+#      Size of VMware cache, in bytes.
+#      Shared memory size for storing VMware data.
+#      Only used if VMware collectors are started.
+#
+# Mandatory: no
+# Range: 256K-2G
+# Default:
+# VMwareCacheSize=8M
+
 ### Option: SNMPTrapperFile
 #      Temporary file used for passing data from SNMP trap daemon to the server.
 #      Must be the same as in zabbix_trap_receiver.pl or SNMPTT configuration file.
@@ -257,14 +293,6 @@
 # Default:
 # MaxHousekeeperDelete=500

-### Option: DisableHousekeeping
-#      If set to 1, disables housekeeping.
-#
-# Mandatory: no
-# Range: 0-1
-# Default:
-# DisableHousekeeping=0
-
 ### Option: SenderFrequency
 #      How often Zabbix will try to send unsent alerts (in seconds).
 #
@@ -281,7 +309,6 @@
 # Range: 128K-2G
 # Default:
 # CacheSize=8M
-CacheSize=32M

 ### Option: CacheUpdateFrequency
 #      How often Zabbix will perform update of configuration cache, in seconds.
@@ -326,6 +353,16 @@
 # Default:
 # HistoryTextCacheSize=16M

+### Option: ValueCacheSize
+#      Size of history value cache, in bytes.
+#      Shared memory size for caching item history data requests
+#      Setting to 0 disables value cache.
+#
+# Mandatory: no
+# Range: 0,128K-64G
+# Default:
+# ValueCacheSize=8M
+
 ### Option: NodeNoEvents
 #      If set to '1' local events won't be sent to master node.
 #      This won't impact ability of this node to propagate events from its child nodes.
@@ -418,7 +455,7 @@
 # Fping6Location=/usr/sbin/fping6

 ### Option: SSHKeyLocation
-#      Location of public and private keys for SSH checks and actions
+#      Location of public and private keys for SSH checks and actions.
 #
 # Mandatory: no
 # Default:
-TmpDir=/var/lib/zabbixsrv/tmp
-
-### Option: Include
-#      You may include individual files or all files in a directory in the configuration file.
-#      Installing Zabbix will create include directory in /etc, unless modified during the compile time.
-#
-# Mandatory: no
-# Default:
-# Include=
-
-# Include=/etc/zabbix_server.general.conf
-# Include=/etc/zabbix_server.conf.d/
+# TmpDir=/tmp

 ### Option: StartProxyPollers
 #      Number of pre-forked instances of pollers for passive proxies.
@@ -477,3 +503,44 @@
 # Range: 1-3600
 # Default:
 # ProxyDataFrequency=1
+
+### Option: AllowRoot
+#      Allow the server to run as 'root'. If disabled and the server is started by 'root', the server
+#      will try to switch to user 'zabbix' instead. Has no effect if started under a regular user.
+#      0 - do not allow
+#      1 - allow
+#
+# Mandatory: no
+# Default:
+# AllowRoot=0
+
+### Option: Include
+#      You may include individual files or all files in a directory in the configuration file.
+#      Installing Zabbix will create include directory in /etc, unless modified during the compile time.
+#
+# Mandatory: no
+# Default:
+# Include=
+
+# Include=/etc/zabbix_server.general.conf
+# Include=/etc/zabbix_server.conf.d/
+
+####### LOADABLE MODULES #######
+
+### Option: LoadModulePath
+#      Full path to location of server modules.
+#      Default depends on compilation options.
+#
+# Mandatory: no
+# Default:
+# LoadModulePath=${libdir}/modules
+
+### Option: LoadModule
+#      Module to load at server startup. Modules are used to extend functionality of the server.
+#      Format: LoadModule=
+#      The modules must be located in directory specified by LoadModulePath.
+#      It is allowed to include multiple LoadModule parameters.
+#
+# Mandatory: no
+# Default:
+# LoadModule=

Create new config. Here is diff from stock config for the moment. May need to bump value cache and vmware settings after testing...

111c111
 DBPassword=039ea38bf55151d627bzabbix-upgrade
196a197
> StartTimers=2
228a230
> StartVMwareCollectors=1
311a314
> CacheSize=32M

Start the Db Upgrade

Since Zabbix 2.0.x, changes made to the database schema are automatically performed the first time the server is started.

  • begin a tail of the postgres log
  • begin a tail of the zabbix-server.log
  • start the zabbix-server and watch upgrade logs and wait for db to upgrade. this took less than 4min for me:
    • 20140101 14:28:28 starting automatic database upgrade
    • 20140101 14:32:14 database upgrade fully completed

zabbix_server.log will show the progress of the schema update

 27805:20140101:142828.862 current database version (mandatory/optional): 02010000/02010000
 27805:20140101:142828.862 required mandatory version: 02020000
 27805:20140101:142828.862 starting automatic database upgrade
 27805:20140101:142829.330 completed 0% of database upgrade
...
 27805:20140101:143214.174 completed 100% of database upgrade
 27805:20140101:143214.174 database upgrade fully completed

Tags:

Syndicate

Subscribe to Syndicate