Rough guide to get your monitoring server up to Zabbix 2.4.x on CentOS 6.x
The upgrade needs to be done in 3 stages.
Stage 1 – Upgrade from 1.8.x to 2.0.x: All steps, with 4a;5a;
Stage 2 – Upgrade from 2.0.x to 2.2.x: Only steps 1;2;3;4b;5b;7;8;
Stage 3 – Upgrade from 2.2.x to 2.4.x: Only steps 1;2;3;4c;5c;7;8;9;
- Stop Zabbix Services
- Take a backup of zabbix configuration files (/etc/zabbix/*)
cp -r -p /etc/zabbix/* ~/etc_zabbix.bak
- Take a backup of Zabbix database (mysql)
mysqldump -u zabbix -p zabbix > ~/zabbix_dump.sql
- Remove your existing Zabbix Installation
a) yum erase zabbix*
b) yum erase zabbix20* – remove zabbix 2.0 –
c) yum erase zabbix22* – remove zabbix 2.2
Note! For version 2.0 and 2.2 installed via epel use commands below
- Install Zabbix
a) yum –enablerepo=epel install zabbix20-server-mysql zabbix20-agent zabbix20-web-mysql
b) yum install zabbix22-server-mysql zabbix22-agent zabbix22-web-mysql
c) Add 2.4 repo: rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm
Install zabbix 2.4: yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
- Upgrade DB Schema from 1.8.x to 2.0.x consists of 2 steps. (Only required for 1.8 to 2.0)
a) make upgrade script executable.
chmod +x /usr/share/zabbix-mysql/upgrades/2.0/upgrade
b) run the script
./upgrade -u zabbix -p zabbix Note! Bear in mind that upgrade will take a while and you will get multiple DB password prompts
Note2! for Stage2 and Stage3, mysql upgrade will happen automatically after you start Zabbix
- Next compare and update your configuration files. Old config files are in the zabbix folder (/etc/zabbix/) with the following extension .rpmsave
Use the following commands to compare:
diff /etc/zabbix/zabbix_agentd.conf.rpmsave /etc/zabbix_agentd.conf
diff /etc/zabbix/zabbix_server.conf.rpmsave /etc/zabbix_server.conf
Or use a tool called winmerge
- Start Zabbix-services
- Enable autostart for Zabbix services
chkconfig zabbix-server on
chkconfig zabbix-agent on
Note! This “fix” applies to RHEL / Red Hat / CentOS / Fedora.
Recently I noticed that our Squid was running a bit odd, getting stuck with CPU at 100%. After digging around in logs I found the following warning:
WARNING! Your cache is running out of filedescriptors
I found out that I just needed to rise the limit. There are multiple things that need doing.
First we will up the limit in the security/limits.conf file
Second we need to add the following line max_filedesc to squid.conf
Check the current limit:
squidclient -p 3128 mgr:info | grep ‘file descri’
Maximum number of file descriptors: 1024
Available number of file descriptors: 338
Reserved number of file descriptors: 100
So the default limit is 1024 which is not a lot if you have over 50+ clients using the Squid.
Edit the following file :
and add the following limit:
* – nofile 4096
Log off from squid (close ssh session etc) and log back in.
Run the following command to see if the new limit is in place.
ulimit -a | grep ‘open files’
open files (-n) 4096
Modify the Squid.conf and add the following line (somewhere to the bottom of the config)
Note! You can make it higher than 4096
Now restart the squid with the following command
service squid restart
Run the command from above again to verify that new limits are in place.
PowerShell (EMS) command to enable remote archiving after the mailbox has been migrated to Office 365.
Run the following command on your On-premises Exchange 2010 or Exchange 2013 server.
Enable-RemoteMailbox -Identity MailboxName –Archive
Enable-RemoteMailbox -Identity John.Smith –Archive
Today is the International Day Against DRM and my favourite book publishers are running a campaign to celebrate it. For 24 hours all of their content is available for $10 – over 2000+ ebooks and Videos. Go take a look at http://bit.ly/1F5wnES
A quick PowerShell command to get a list of all the Active Directory User objects, showing only phone numbers and exporting it to CSV. In the example below showing user names and phone numbers.
Get-ADUser -filter * -Properties * | select Name, SamAccountName, telephoneNumber, Mobile, IPphone | Export-csv C:\Temp\Phones.csv