Zabbix Howto

  • Uploaded by: Sharjeel Sayed
  • 0
  • 0
  • October 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Zabbix Howto as PDF for free.

More details

  • Words: 685
  • Pages: 6
How to Install Zabbix 1.1.4 # References # http://www.zabbix.com/manual/v1.1/ # http://www.howtoforge.org/zabbix_network_monitoring # Download Zabbix from http://www.zabbix.com/ # Installing the Zabbix server cd /tmp wget http://jaist.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.1.4.tar.gz tar zxvf zabbix-1.1.4.tar.gz cd zabbix-1.1.4 mysql -u root -p create database zabbix; quit; cd create/mysql cat schema.sql |mysql -u root -p zabbix # Enter Mysql root password when prompted cd ../data cat data.sql |mysql -u root -p zabbix # Enter Mysql root password when prompted cat images.sql |mysql -u root -p zabbix # Enter Mysql root password when prompted cd tmp/zabbix-1.1.4 ./configure --enable-server --with-mysql make install cd /etc mkdir zabbix cp -a /tmp/zabbix-1.1.4/misc/conf/zabbix_server.conf /etc/zabbix/ vi /etc/zabbix/zabbix_server.conf # Edit the following fields as shown below ########### #LogFile=/tmp/zabbix_server.log

LogFile=/var/log/zabbix_server.log # Database name DBName=zabbix # Database user #DBUser=root DBUser=zabbix # Database password # Comment this line if no password used #DBPassword=<password> DBPassword=yourpassword ########### chown root.root /etc/zabbix chmod -R 755 /etc/zabbix chown zabbix.zabbix /etc/zabbix/zabbix_server.conf cd /tmp/zabbix-1.1.4/misc/init.d/fedora/core cp -a zabbix_server zabbix_server_orig vi zabbix_server ########## # Modify the lines as shown below # BASEDIR=/opt/zabbix BASEDIR=/usr/local ########## :wq! cp -a zabbix_server /etc/init.d/ /sbin/chkconfig --add zabbix_server chkconfig zabbix_server on /usr/sbin/groupadd zabbix /usr/sbin/useradd -c 'Zabbix' -g zabbix -s /dev/null zabbix cd /var/log touch zabbix_server.log chown zabbix.zabbix zabbix_server.log chown root.root /etc/rc.d/init.d/zabbix_server /etc/rc.d/init.d/zabbix_server start

# Creating the web Interface yum install gd yum install libpng yum install php-gd cd /var/www/ mkdir yourdomainname vi /etc/httpd/conf/virtualhostsconf/yourdomain.conf ##### ServerAdmin postmaster@yourdomain DocumentRoot /var/www/yourdomain ServerName yourdomain ErrorLog /etc/httpd/logs/yourdomain_error_log CustomLog /etc/httpd/logs/yourdomain_access_log common # Block access: SLAC addition RewriteEngine On RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) RewriteRule .* - [F] # End block access rule ######## cd /tmp/zabbix-1.1.4/frontends/php/include/ cp -a db.inc.php db.inc.php.orig mysql -u root -p # Enter Mysql root password when prompted mysql> GRANT ALL PRIVILEGES ON zabbix.* TO 'zabbix'@'localhost' 'your_password' WITH GRANT OPTION;

IDENTIFIED BY

# Configurating Zabbix Agent (Active) types for all monitored clients # The following query when run will assign all the Agent type as Zabbix Agent (Active) so that there wont be any need to open ports at the monitored clients. mysql -u root -p #Enter Mysql root password when prompted use zabbix; update items set type=7 where type=0; vi db.inc.php # Edit the following lines ######### $DB_SERVER ="localhost"; $DB_DATABASE ="zabbix"; $DB_USER ="zabbix"; $DB_PASSWORD ="yourpassword";

######### cp -R /tmp/zabbix-1.1.4/frontends/php/* /var/www/monitor.megaesecure.com /etc/rc.d/init.d/httpd restart # Logrotate setup for Zabbix Server logs cd /etc/logrotate.d vi zabbix_server ### /var/log/zabbix_server.log { missingok notifempty copytruncate } #### chown root.root zabbix_server chmod 644 zabbix_server # Open the domian name in your web browser and Login as Admin with a blank password # Go to Configuration->Users and assign a strong password to the Admin account and the guest account

#

Installing the Zabbix Agent

# Windows Agent installation Reference: http://www.zabbix.com/manual/v1.1/processes_agent_win.php # Download Zabbix Windows agent from http://www.zabbix.com/download.php #Download Zabbix source from http://superbeast.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.1.6.tar.gz # Create folder C:\Program Files\Zabbix_agent\ and copy zabbix_agentd.conf from the zabbix source /zabbix-1.1.6\misc\conf\ # Copy the ZabbixW32.exe file in C:\Program Files\Zabbix_agent\ and exectute the following commands in command line ( Start->Run->cmd ) cd c:\Program Files\Zabbix_agent ZabbixW32.exe --config "C:\Program Files\Zabbix_agent\zabbix_agentd.conf" install # Go to Services and start the Zabbix Agent # Non recommended but easy:You can also use the third party Zabbix agent installer on http://sholari.free.fr/wiki/static/ZabbixOnWindows.html

# Linux agent installation cd /tmp wget http://superb-east.dl.sourceforge.net/sourceforge/zabbix/zabbix-1.1.6.tar.gz tar zxvf zabbix-1.1.6.tar.gz rm -rf zabbix-1.1.6.tar.gz cd zabbix-1.1.6 ./configure --enable-agent make make install # Create Zabbix directory in /etc if it does not exist mkdir -p /etc/zabbix # Create Zabbix user and group if it does not exist /usr/sbin/groupadd zabbix /usr/sbin/useradd -c 'Zabbix' -g zabbix -s /dev/null zabbix cp -a /tmp/zabbix-1.1.6/misc/conf/zabbix_agentd.conf /etc/zabbix/ chown root.root /etc/zabbix chmod -R 755 /etc/zabbix chown zabbix.zabbix /etc/zabbix/zabbix_agentd.conf vi /etc/zabbix/zabbix_agentd.conf # Edit values as required.Ensure that all the agent is configured for active checks and paramaters related to active checks are configured. cp -a /tmp/zabbix-1.1.6/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/ vi /etc/init.d/zabbix_agentd ######## # Modify the lines as shown below # BASEDIR=/opt/zabbix BASEDIR=/usr/local ######## :wq! chown root.root /etc/rc.d/init.d/zabbix_agentd cd /var/log

touch zabbix_agentd.log chown zabbix.zabbix zabbix_agentd.log /sbin/chkconfig --add zabbix_agentd /sbin/chkconfig zabbix_agentd on /etc/rc.d/init.d/zabbix_agentd start # Log roatation for Zabbix Agent logs cd /etc/logrotate.d vi zabbix_agent ### /var/log/zabbix_agentd.log { missingok notifempty copytruncate } ### chown root.root zabbix_agent chmod 644 zabbix_agent cd /tmp rm -rf zabbix-1.1.6 Add this host in the Zabbix frontend and apply the unix_t template

Related Documents

Zabbix Howto
October 2019 42
Howto
May 2020 48
Howto
May 2020 35
Zabbix Manual V1.6
December 2019 14
Dcn-howto
November 2019 50
Shorewall Howto
November 2019 42

More Documents from "Sharjeel Sayed"