×ðÁú¿­Ê±¹ÙÍøµÇ¼

ÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõļà¿Ø±¨¾¯ÏµÍ³

ÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõļà¿Ø±¨¾¯ÏµÍ³

Ò»¡¢¸ÅÊö

Ëæ×ÅÆóÒµ¶ÔITϵͳ¿ÉÓÃÐÔµÄÒªÇóÔ½À´Ô½¸ß £¬ÉèÖÃÒ»¸ö¸ß¿ÉÓõļà¿Ø±¨¾¯ÏµÍ³±äµÃÖÁ¹ØÖ÷Òª¡£ÔÚLinuxÉϴһ¸ö¸ß¿ÉÓõļà¿Ø±¨¾¯ÏµÍ³ £¬¿ÉÒÔ×ÊÖúÎÒÃÇʵʱ·¢Ã÷ϵͳ»òÓ¦ÓóÌÐòµÄÒì³£ £¬²¢½ÓÄÉÏìÓ¦µÄ²½·¥¾ÙÐд¦Àí £¬Ìá¸ßϵͳµÄÎȹÌÐԺͿɿ¿ÐÔ¡£±¾ÎĽ«ÏÈÈÝÔõÑùʹÓÃZabbixºÍKeepalivedÀ´ÉèÖÃÒ»¸ö¸ß¿ÉÓõļà¿Ø±¨¾¯ÏµÍ³¡£

¶þ¡¢Zabbix¼ò½é

ZabbixÊÇÒ»¿î¿ªÔ´µÄÆóÒµ¼¶¼à¿Ø½â¾ö¼Æ»® £¬Ëü¿ÉÒÔ¼à¿ØЧÀÍÆ÷µÄÐÔÄÜÖ¸±ê¡¢ÍøÂç×°±¸µÄ״̬¡¢Ó¦ÓóÌÐòµÄÔËÐÐÇéÐεÈ¡£ZabbixµÄÌصã°üÀ¨Ò×ÓÃÐÔ¡¢ÎÞаÐÔ¡¢¿ÉÀ©Õ¹ÐԺ͸ßÐÔÄÜ¡£ÔÚ±¾ÎÄÖÐ £¬ÎÒÃǽ«Ê¹ÓÃZabbixÀ´ÊµÏÖ¼à¿ØºÍ±¨¾¯¹¦Ð§¡£

Èý¡¢Keepalived¼ò½é

KeepalivedÊÇÒ»¿î¿ªÔ´µÄ¸ß¿ÉÓÃÐÔ½â¾ö¼Æ»® £¬Ëü¿ÉÒÔÈ·±£¶ą̀ЧÀÍÆ÷µÄÒ»Á¬ÐÔ¡£KeepalivedʹÓÃÐéÄâ·ÓÉÈßÓàЭÒé(VRRP)À´ÊµÏÖЧÀÍÆ÷µÄ¹ÊÕÏÇл» £¬µ±Ò»Ì¨Ð§ÀÍÆ÷±¬·¢¹ÊÕÏʱ £¬KeepalivedÄܹ»×Ô¶¯½«Á÷Á¿Çл»µ½±¸ÓÃЧÀÍÆ÷ÉÏ¡£ÔÚ±¾ÎÄÖÐ £¬ÎÒÃǽ«Ê¹ÓÃKeepalivedÀ´ÊµÏÖ¼à¿Ø±¨¾¯ÏµÍ³µÄ¸ß¿ÉÓÃÐÔ¡£

ËÄ¡¢ÇéÐÎ×¼±¸

ÔÚ×îÏÈÉèÖÃ֮ǰ £¬ÎÒÃÇÐèҪ׼±¸ºÃÒÔÏÂÇéÐΣº

Á½Ì¨LinuxЧÀÍÆ÷ £¬Ò»Ì¨×÷ΪÖ÷½Úµã £¬Ò»Ì¨×÷Ϊ±¸½Úµã £»

ÔÚÁ½Ì¨Ð§ÀÍÆ÷ÉÏ»®·Ö×°ÖÃZabbixºÍKeepalived £»

Ò»¸ö¿ÉÓõÄSMTPЧÀÍÆ÷ £¬ÓÃÓÚ·¢ËÍÓʼþ¡£

Îå¡¢ÉèÖÃZabbixЧÀÍÆ÷

ÔÚÖ÷½ÚµãÉÏ×°Öò¢ÉèÖÃZabbixЧÀÍÆ÷ £»

sudo apt-get install zabbix-server
sudo nano /etc/zabbix/zabbix_server.conf

µÇ¼ºó¸´ÖÆ

ÔÚÉèÖÃÎļþÖÐÉèÖÃÊý¾Ý¿âÏà¹ØÐÅÏ¢ºÍSMTPЧÀÍÆ÷Ïà¹ØÐÅÏ¢¡£

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
...
AlertScriptsPath=/usr/lib/zabbix/alertscripts

µÇ¼ºó¸´ÖÆ

ÔÚ±¸½ÚµãÉÏ×°ÖÃZabbixÊðÀí¡£

sudo apt-get install zabbix-agent
sudo nano /etc/zabbix/zabbix_agentd.conf

µÇ¼ºó¸´ÖÆ

ÉèÖÃÎļþÖÐÉèÖÃZabbixЧÀÍÆ÷µÄIPµØµã¡£

Server=<Ö÷½ÚµãIP>

µÇ¼ºó¸´ÖÆ

ÐÞ¸ÄKeepalivedÉèÖÃÎļþ¡£

sudo nano /etc/keepalived/keepalived.conf

µÇ¼ºó¸´ÖÆ

½«ÉèÖÃÎļþÖеÄÐéÄâIPµØµã¸ÄΪÄú×Ô¼ºµÄIPµØµã¡£

virtual_ipaddress {
  <ÐéÄâIPµØµã>
}

µÇ¼ºó¸´ÖÆ

Æô¶¯²¢ÉèÖÿª»ú×ÔÆô¶¯¡£

sudo systemctl start zabbix-server
sudo systemctl enable zabbix-server
sudo systemctl start zabbix-agent
sudo systemctl enable zabbix-agent

µÇ¼ºó¸´ÖÆ

Áù¡¢ÉèÖÃZabbix¼à¿Ø

ÔÚä¯ÀÀÆ÷Öлá¼ûZabbix¿ØÖÆ̨¡£

http://<Ö÷½ÚµãIP>/zabbix

µÇ¼ºó¸´ÖÆ

ƾ֤½çÃæÖ¸Òý¾ÙÐгõʼ»¯ÉèÖà £¬²¢½¨ÉèÒ»¸öÖÎÀíÔ±ÕË»§¡£

Ìí¼Ó±»¼à¿ØÖ÷»ú¡£

ÔÚÖ÷½ÚµãµÄZabbix¿ØÖÆ̨ÖÐ £¬ÒÀ´Îµã»÷”Configuration” > “Hosts” > “Create host” £¬ÌîдÖ÷»úÏà¹ØÐÅÏ¢ £¬°üÀ¨Ãû³Æ¡¢¿É¼ûÃû³Æ¡¢IPµØµãµÈ¡£

Ìí¼Ó¼à¿ØÏî¡£

ÔÚÖ÷½ÚµãµÄZabbix¿ØÖÆ̨ÖÐ £¬ÒÀ´Îµã»÷”Configuration” > “Hosts” > “Item prototype” > “Create item prototype” £¬Æ¾Ö¤ÐèÒªÌîд¼à¿ØÏîµÄÃû³Æ¡¢¼ü¡¢´¥·¢Æ÷µÈÐÅÏ¢¡£

½¨Éè´¥·¢Æ÷¡£

ÔÚÖ÷½ÚµãµÄZabbix¿ØÖÆ̨ÖÐ £¬ÒÀ´Îµã»÷”Configuration” > “Hosts” > “Triggers” > “Create trigger” £¬Æ¾Ö¤ÐèÒªÌîд´¥·¢Æ÷µÄÃû³Æ¡¢º¯Êý¡¢±í´ïʽµÈÐÅÏ¢¡£

Æß¡¢²âÊÔºÍÑéÖ¤

ÔÚ±»¼à¿ØÖ÷»úÉÏÄ£Äâ·ºÆð¹ÊÕÏ»òÒì³£ÇéÐΡ£

¼ì²éZabbix¿ØÖÆ̨ÊÇ·ñÄܹ»×¼È·¼à²âµ½¹ÊÕÏ»òÒì³£ÇéÐÎ £¬²¢×¼È·´¥·¢±¨¾¯²Ù×÷¡£

°Ë¡¢×ܽá

ͨ¹ýÒÔÉÏ°ì·¨ £¬ÎÒÃÇÀֳɵØÉèÖÃÁËÒ»¸ö¸ß¿ÉÓõļà¿Ø±¨¾¯ÏµÍ³¡£ZabbixÌṩÁËÇ¿Ê¢µÄ¼à¿ØºÍ±¨¾¯¹¦Ð§ £¬¶øKeepalivedÈ·±£ÁËϵͳµÄ¸ß¿ÉÓÃÐÔ¡£Í¨¹ýºÏÀíµØÉèÖᢶ¨ÖƺͲâÊÔ £¬ÎÒÃÇ¿ÉÒÔÓÐÓõØÌá¸ßϵͳµÄÎȹÌÐԺͿɿ¿ÐÔ £¬ÊµÊ±·¢Ã÷²¢½â¾öÎÊÌâ £¬ÌṩÆóÒµ¼¶µÄ¼à¿Ø±¨¾¯Ð§ÀÍ¡£

ÒÔÉϾÍÊÇÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõļà¿Ø±¨¾¯ÏµÍ³µÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ