ÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄϵͳ¼à¿Ø
ÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõÄϵͳ¼à¿Ø
СÐò£º
ÔÚÏÖ´ú»¯µÄÐÅÏ¢ÊÖÒÕÉú³¤ÖУ¬ÔÚÆóÒµ¼¶Ó¦ÓÃÖУ¬ÏµÍ³¼à¿ØÊÇÖÁ¹ØÖ÷ÒªµÄÒ»»·¡£Í¨¹ý¶ÔϵͳµÄ¼à¿Ø£¬¿ÉÒÔʵʱÕÆÎÕϵͳµÄÔËÐÐÇéÐΡ¢·¢Ã÷DZÔÚµÄÎÊÌ⣬²¢ÊµÊ±½ÓÄÉÏìÓ¦²½·¥¾ÙÐÐÐÞ¸´£¬´Ó¶øÌáÉýϵͳµÄ¿ÉÓÃÐÔºÍÎȹÌÐÔ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõÄϵͳ¼à¿Ø£¬²¢ÌṩÏà¹ØµÄ´úÂëʾÀý¡£
Ò»¡¢×°Öüà¿ØÈí¼þ
Ñ¡ÔñºÏÊʵļà¿ØÈí¼þÊǵÚÒ»²½¡£³£¼ûµÄϵͳ¼à¿ØÈí¼þÓÐZabbix¡¢Nagios¡¢PrometheusµÈ¡£ÕâÀïÒÔZabbixΪÀý¾ÙÐÐÏÈÈÝ¡£
ÏÂÔØZabbix×°Öðü£º
wget https://cdn.zabbix.com/zabbix/sources/stable/5.2/zabbix-5.2.3.tar.gz
µÇ¼ºó¸´ÖÆ
½âѹװÖðü²¢½øÈë½âѹºóµÄĿ¼£º
tar -zxvf zabbix-5.2.3.tar.gz cd zabbix-5.2.3
µÇ¼ºó¸´ÖÆ
×°ÖñàÒëÒÀÀµ£º
sudo apt-get install build-essential
µÇ¼ºó¸´ÖÆ
ÔËÐÐconfigure¾ç±¾¾ÙÐÐÉèÖãº
./configure --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl
µÇ¼ºó¸´ÖÆ
±àÒë²¢×°Öãº
make sudo make install
µÇ¼ºó¸´ÖÆ
¶þ¡¢ÉèÖüà¿ØÖÎÀí½çÃæ
ÉèÖüà¿ØÖÎÀí½çÃæ¿ÉÒÔÀû±ãÖÎÀíºÍ¼à¿Øϵͳ¡£ÒÔÏÂΪ¸Ã°ì·¨µÄ´úÂëʾÀý£º
½¨ÉèZabbixÊý¾Ý¿â£º
mysql -uroot -p create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password'; flush privileges; exit;
µÇ¼ºó¸´ÖÆ
µ¼ÈëÊý¾Ý¿âÄ£°å£º
cd database/mysql/ mysql -uroot -p zabbix < schema.sql mysql -uroot -p zabbix < images.sql mysql -uroot -p zabbix < data.sql
µÇ¼ºó¸´ÖÆ
ÉèÖÃZabbixЧÀÍÆ÷£º
cd /usr/local/etc/zabbix_server.conf sudo vim zabbix_server.conf
µÇ¼ºó¸´ÖÆ
½«ÒÔÏÂÉèÖÃÌ滻Ϊ×Ô¼ºµÄÉèÖãº
DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=password
µÇ¼ºó¸´ÖÆ
Æô¶¯ZabbixЧÀÍÆ÷£º
sudo /usr/local/sbin/zabbix_server
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ÉèÖÃZabbixÇ°¶Ë£º
½«ÒÔÏÂÉèÖÃÌí¼Óµ½/usr/local/etc/apache2/conf.d/zabbix.conf£º
Alias /zabbix /usr/local/share/zabbix <Directory "/usr/local/share/zabbix"> Options FollowSymLinks AllowOverride None Require all granted </Directory>
µÇ¼ºó¸´ÖÆ
ÖØÆôApacheЧÀÍÆ÷£º
sudo service apache2 restart
µÇ¼ºó¸´ÖÆ
»á¼ûhttp://your_server_ip/zabbix£¬¼´¿É½øÈëZabbixµÄÖÎÀí½çÃæ¡£
Èý¡¢Ìí¼ÓÖ÷»úºÍ¼à¿ØÏî
ÉèÖüà¿ØÏî¿ÉÒÔʵʱ¼à¿ØϵͳµÄÔËÐÐ״̬¡£
µÇ¼ZabbixÖÎÀí½çÃ棬µã»÷×ó²àµÄ¡°ÉèÖá±->¡°Ö÷»ú¡±£¬½øÈëÖ÷»úÒ³Ãæ¡£
µã»÷¡°½¨ÉèÖ÷»ú¡±£¬ÌîдÖ÷»úÃû³ÆºÍ¿É¼ûÃû³Æ£¬²¢Ñ¡ÔñËùÊôµÄÄ£°å¡£
µã»÷¡°Ìí¼Ó¡±°´Å¥£¬²¢Ñ¡ÕªÒª¼à¿ØµÄÏîÄ¿¡£
ÉèÖüà¿ØÏî²ÎÊý£¬Èç¼à¿ØÏîÀàÐÍ¡¢¼üÖµ¡¢µ¥Î»µÈ£¬²¢µã»÷¡°Ìí¼Ó¡±°´Å¥¡£
ÉèÖô¥·¢Æ÷£¬ÉèÖô¥·¢Ìõ¼þºÍ±¨¾¯·½·¨¡£
ÉúÑÄÉèÖò¢×îÏȼà¿Ø¡£
ËÄ¡¢ÉèÖø߿ÉÓÃ
ΪÁË°ü¹Üϵͳ¼à¿ØµÄ¸ß¿ÉÓÃÐÔ£¬Ò»Ì¨Ð§ÀÍÆ÷¿ÉÄÜÎÞ·¨Öª×ãÐèÇó¡£ÍƼöʹÓÃÖ÷-´Óģʽ¾ÙÐÐÉèÖá£
ÉèÖÃZabbixµÄÖ÷ЧÀÍÆ÷£º
ÐÞ¸ÄÖ÷ЧÀÍÆ÷µÄÉèÖÃÎļþ£º
sudo vim /usr/local/etc/zabbix_server.conf
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ÉèÖÃFrontend²ÎÊýΪÆäËüZabbixЧÀÍÆ÷µÄIPµØµã¡£
Frontend="192.168.1.100"
µÇ¼ºó¸´ÖÆ
ÉèÖÃZabbixµÄ´ÓЧÀÍÆ÷£º
Ð޸ĴÓЧÀÍÆ÷µÄÉèÖÃÎļþ£º
sudo vim /usr/local/etc/zabbix_server.conf
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ÉèÖÃDBHost²ÎÊýΪÖ÷ЧÀÍÆ÷µÄIPµØµã¡£
DBHost="192.168.1.200"
µÇ¼ºó¸´ÖÆ
Æô¶¯Zabbix´ÓЧÀÍÆ÷£º
sudo /usr/local/sbin/zabbix_server
µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ
ͨ¹ýÒÔÉÏÉèÖã¬ÊµÏÖÁËZabbixЧÀÍÆ÷µÄÖ÷-´ÓģʽµÄ¸ß¿ÉÓð²ÅÅ¡£
½áÂÛ£º
ͨ¹ýÒÔÉÏ°ì·¨£¬ÎÒÃÇ¿ÉÒÔÔÚLinuxÉÏÉèÖø߿ÉÓõÄϵͳ¼à¿Ø¡£Ñ¡ÔñºÏÊʵļà¿ØÈí¼þ£¬×°ÖÃÉèÖüà¿ØÖÎÀí½çÃ棬Ìí¼ÓÖ÷»úºÍ¼à¿ØÏ²¢ÉèÖø߿ÉÓ㬿ÉÒÔʵʱ¼à¿ØϵͳÔËÐÐ״̬£¬²¢ÔÚ·ºÆðÎÊÌâʱʵʱ×÷³öÏìÓ¦µÄÓ¦¶Ô²½·¥¡£Õ⽫´ó´óÌáÉýϵͳµÄ¿ÉÓÃÐÔºÍÎȹÌÐÔ¡£
´úÂëʾÀý£º
ÓÉÓÚƪ·ùÏÞÖÆ£¬±¾ÎĽöÌṩÁËÖ÷ÒªµÄÉèÖð취ºÍ˼Ð÷£¬²¢Î´°üÀ¨ÍêÕûµÄ´úÂëʾÀý¡£¶ÁÕß¿ÉÒÔƾ֤ËùÑ¡È¡µÄ¼à¿ØÈí¼þ£¬²Î¿¼¹Ù·½ÎĵµºÍÉçÇø½Ì³Ì£¬¾ÙÐиüÏêϸµÄÉèÖúͲÙ×÷¡£
ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄϵͳ¼à¿ØµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡