HOWTO: Zabbix installation on OMV

  • HOWTO: Zabbix installation on OMV


    1) Default OMV v0.5x installation server
    2) Add omv-extra, follow the instruction on: http://omv-extras.org/simple/i…install-omv-extras-plugin
    3) Install the omv-extra plugins: MYSQL, Websites
    4) Enable the MYSQL in your OMV panel.
    5) Go to: https://www.zabbix.com/documen…rom_distribution_packages, or follow the instructions below:


    # wget http://repo.zabbix.com/zabbix/…ease_2.2-1+wheezy_all.deb
    # dpkg -i zabbix-release_2.2-1+wheezy_all.deb
    # apt-get update


    # apt-get install zabbix-server-mysql zabbix-frontend-php
    # apt-get install zabbix-agent (if you want to monitor your OMV server too, allways handy...)
    # apt-get install libapache2-mod-php5

    => the installer will ask for the MYSQL master password, default is this: openmediavault but you can change that in the MYSQL plugin management.
    => the installer will populate the Zabbix database, that will take a while...
    => you will asked for a zabbix password 2 times: enter something like 'zabbix123' (without quotes)


    (Database configuration is stored in the configuration file of zabbix: /usr/share/zabbix/conf/zabbix.conf.php)


    Apache configuration file for Zabbix frontend is located in /etc/apache2/conf.d/zabbix. Some PHP settings are already configured.
    It's necessary to uncomment the “date.timezone” setting and set the correct timezone for you. After changing the configuration file restart the apache web server:


    => Make some changes in php.ini :
    # nano /etc/php5/apache2/php.ini


    php_value max_execution_time 300
    php_value memory_limit 128M
    php_value post_max_size 16M
    php_value upload_max_filesize 2M
    php_value max_input_time 300
    php_value date.timezone Europe/Amsterdam


    => and restart apache2:
    # service apache2 restart


    REBOOT SERVER with:


    # reboot


    =>> After this all: you will have ZABBIX server running: it's not Zabbix v2.2.1 but Zabbix v1.8.2, weird but ok.


    Zabbix frontend is available at http://your_server_ip/zabbix in the browser. Default username/password is Admin/zabbix.


    Ok, have fun with Zabbix on your OMV-server !!!
    And maybe somebody can make a nice ZABBIX-plugin for OMV too..


    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Notes:


    1) if you don't have the nice editor 'nano' installed yet:
    # apt-get install nano


    2) if you want to search for a specific file on your server via ssh, use for example the command:
    # locate php.ini


    3) if you don't have the nice filefinder 'locate' installed yet:
    # apt-get install mlocate
    # updatedb


    4) if you go to zabbix->administration->configuration, you will see an error. Info can be found here: https://www.zabbix.com/forum/showthread.php?t=21125
    I have attached the missing setup.php file to this post, just add the file to the folder /usr/share/zabbix
    After you have the missing file on the right place, you can walktrough this configuration menu, but it's not needed !!!


    5) if you use Windows and need a nice tool to place files to your OMV server like the setup.php file mentioned in note 4, you can use for example: Winscp (http://winscp.net/eng/download.php)


    6) Zabbix is new for me also, so if somebody can add some examples to monitor a website, a DirectAdmin environment (hostingpanel) or something, that would be great !



    UPDATE ZABBIX - NOT WORKING YET !!!
    ==================================


    # cd ~
    # wget http://downloads.sourceforge.n…2.2.3/zabbix-2.2.3.tar.gz
    # tar -zxvf zabbix-2.2.3.tar.gz
    # /etc/init.d/zabbix-server stop
    # cd zabbix-2.2.3
    # apt-get install of libmysqlclient-dev
    # apt-get install libmysqld-dev
    # apt-get install libsnmp-dev
    # apt-get install ca-certificates comerr-dev libcurl3 libcurl4-openssl-dev libglib2.0-0 libglib2.0-data libidn11-dev libkrb5-dev libldap2-dev libssh2-1 libssh2-1-dev libssl-dev pkg-config
    # ./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl
    # make install
    # mv /usr/local/bin/zabbix_sender /usr/bin/zabbix_sender
    # mv /usr/local/bin/zabbix_get /usr/bin/zabbix_get
    # mv /usr/local/sbin/zabbix_agent /usr/bin/zabbix_agent
    # mv /usr/local/sbin/zabbix_agentd /usr/sbin/zabbix_agentd
    # mv /usr/local/sbin/zabbix_server /usr/sbin/zabbix_server


    ----------------------------
    Normally you can update your old database with the following instructions, but for an unknown reason I couldn't get it done:
    # mysql -u zabbix -pzabbix123 -h localhost zabbix < /root/zabbix-2.2.3/upgrades/dbpatches/2.0/mysql/patch.sql


    Note: zabbix is the database name, zabbix123 is the database password
    ---------------------------


    # cd frontends/php
    # cp -a . /usr/share/zabbix


    NEW database: remove the old zabbix database (drop it via omv mysql management, so you get some experience with it) and let's create a new one:


    # cd ~/zabbix-2.2.3/database
    # mysql -u<username> -p<password>
    # create database zabbix character set utf8 collate utf8_bin;
    # quit;
    # mysql -u<username> -p<password> -h localhost zabbix < mysql/schema.sql
    # mysql -u<username> -p<password> -h localhost zabbix < mysql/images.sql
    # mysql -u<username> -p<password> -h localhost zabbix < mysql/data.sql


    Last things:


    # chmod 777 /usr/share/zabbix/conf/zabbix.conf.php


    New Zabbix frontend is now available at http://your_server_ip/zabbix in the browser. Default username/password is Admin/zabbix.
    Go to the Administration-Installation menu and enter your database details and follow the instructions.


    After that, protect the config file again with:
    # chmod 555 /usr/share/zabbix/conf/zabbix.conf.php


    And start the zabbix server:
    # /etc/init.d/zabbix-server start


    ==>> After this update, the zabbix server is not running, don't know why yet... Dashboard works..

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!