I love really appreciate Zabbix. Since I am working with Zabbix for quite some time now, I’m eager to test new releases, which I do. The most simple way is to grab the appliance from the main repo and swing it into WMware workstation (or Virtualbox for that matter).
As I know the boys and girls at Zabbis SIA are really doing there best, I have noticed some bugs configuration errors which really are annoying. Within this post I will summarize what I have found within the nice Zabbix appliances and hopefully will help you on your own Zabbix way.

Appliance version 3.0.1

First up, time differences.

Yeah I know, it’s a real small one, but still annoying.
When looking at the Zabbix frontend I noticed a big time shift within the interface. Hitting “date” within the bash shell gave me a 1 hour offset:

Tue May 31 11:39:29 CEST 2016

Mmm, that’s a difference of an whole hour. Let’s change the localtime (as there are many way to do this, I prefer to copy the correct zoneinfo onto the localtime)

sudo cp /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime

This copies the correct zoneinfo onto the localtime file, in my case I replaced the /etc/localtime with the Amsterdam file. And yes, I live in the Amsterdam timezone 😉 Now my “date” command gives me:

Tue May 31 10:39:29 CEST 2016

Which is the correct time,.YAY!

But we are not there yet.
As we all know, ahum, PHP uses its own time configuration. In some cases it is really needed (think of owning a server that’s a million miles away and is using localtime, what fun would that be?). So lets change the PHP time setting:

sudo nano /etc/php5/apache2/php.ini
command nano not found

Damn,.,.no nano. Let’s install nano:

sudo apt-get install nano


sudo nano /etc/php5/apache2/php.ini

Find the date.timezone line within the file (use within nano “CTRL w” search for date.timezone) and adjust it:

date.timezone = Europe/Amsterdam

Restart Apache with:

sudo service apache2 restart

Victory!!!! But wait, there is more (that’s amazing Mike). Browsing the Zabbix frontend still gives us a wrong timing, still off by an hour. *SIGH*. Lets create a phpinfo file and see what’s wrong.

sudo touch /usr/share/zabbix/phpinfo.php
sudo nano /usr/share/zabbix/phpinfo.php



And browse to http://yourip/zabbix/phpinfo.php
Find date.timezone via “CTRL F”. It seems Zabbix is using it’s own date.timezone, ignoring the global value (WHY?). So let’s change that!
After a grep on all files there is a file called zabbix.conf where Zabbix stores its Apache and PHP values in. So edit:

sudo nano /etc/apache2/conf-available/zabbix.conf

And edit the:

php_value date.timezone


php_value date.timezone Europe/Amsterdam

Again, restart Apache or reboot the vm!

Tadadada dadadadadadadadadada dadada dadadada dadadada dadadada datadada.
Finally, within the frontend and backend, all timings are correct!

To summarize this. Usually you use Zabbix in a production environment thus not using the appliance. When setting up a Linux server and install the Zabbix server afterwards you usually don’t have these issues. It would be a big plus when Zabbix SIA would append a script correcting time difference during the deployment of the appliance. Or, we could build it on our own 🙂

2 Responses to Zabbix Appliance Glitches

  1. errorex says:

    thank you.
    The part of tutorial I most like was
    Tadadada dadadadadadadadadada dadada dadadada dadadada dadadada datadada