尊龙凯时人生就是博

ÔõÑùÔÚLinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢¼à¿Ø

ÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢¼à¿Ø

ÔÚÏÖ´úµÄITÇéÐÎÖУ¬ÍøÂç´æ´¢ÊÇÒ»¸öÒªº¦×é¼þ£¬ÓÃÓÚ´æ´¢ºÍÖÎÀíº£Á¿µÄÊý¾Ý¡£ÎªÁËÈ·±£Êý¾ÝµÄ¿É¿¿ÐԺ͸߿ÉÓÃÐÔ£¬¶ÔÍøÂç´æ´¢µÄ¼à¿ØºÍ¹ÊÕϻָ´ÊǺÜÊÇÖ÷ÒªµÄ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚlinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢¼à¿Ø£¬²¢Ìṩ´úÂëʾÀý¡£

µÚÒ»²½£º×°Öüà¿Ø¹¤¾ß

ÔÚLinuxÉÏ£¬ÎÒÃÇ¿ÉÒÔʹÓÃÒ»¸ö¿ªÔ´µÄ¼à¿Ø¹¤¾ßÀ´¼à¿ØÍøÂç´æ´¢£¬ºÃ±ÈNagios¡£Ê×ÏÈ£¬ÎÒÃÇÐèҪװÖÃNagios¡£

·­¿ªÖնˣ¬²¢ÒÔÖÎÀíÔ±Éí·ÝÖ´ÐÐÒÔÏÂÏÂÁî×°ÖÃNagios£º

sudo apt-get install nagios3

µÇ¼ºó¸´ÖÆ

×°ÖÃÍê³Éºó£¬ÎÒÃÇÐèÒªÉèÖÃNagios¡£¿ÉÒÔÔÚÖÕ¶ËÖÐÖ´ÐÐÒÔÏÂÏÂÁî±à¼­ÉèÖÃÎļþ£º

sudo nano /etc/nagios3/nagios.cfg

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÚÉèÖÃÎļþÖУ¬ÎÒÃÇÐèÒªÉèÖüà¿ØÄ¿µÄ¡¢²å¼þ·¾¶µÈ¡£Æ¾Ö¤ÍøÂç´æ´¢µÄÏêϸÇéÐξÙÐÐÏìÓ¦µÄÉèÖá£

ÉúÑIJ¢¹Ø±ÕÉèÖÃÎļþ£¬È»ºóÖØÆôNagiosЧÀÍ£º

sudo service nagios3 restart

µÇ¼ºó¸´ÖÆ

µÚ¶þ²½£ºÉèÖüà¿ØÄ¿µÄ

ÔÚ×°ÖúÍÉèÖúÃNagiosºó£¬ÎÒÃÇÐèÒªÉèÖüà¿ØÄ¿µÄ¡£ÒÔÏÂÊÇÒ»¸öʾÀýÉèÖÃÎļþ£¬ÓÃÓÚ¼à¿ØÒ»¸öÍøÂç´æ´¢×°±¸£º

define host {
    use             linux-server
    host_name       network_storage
    alias           Network Storage
    address         192.168.1.100
}

define service {
    use                     generic-service
    host_name               network_storage
    service_description     Ping
    check_command           check_ping!100.0,20%!500.0,60%
}

define service {
    use                     generic-service
    host_name               network_storage
    service_description     Disk Usage
    check_command           check_disk!20%!10%!/
}

define service {
    use                     generic-service
    host_name               network_storage
    service_description     CPU Load
    check_command           check_load!5.0!4.0!3.0!10.0!6.0!4.0
}

define service {
    use                     generic-service
    host_name               network_storage
    service_description     Memory Usage
    check_command           check_memory!90%!95%
}

µÇ¼ºó¸´ÖÆ

ÉÏÊöÉèÖÃÎļþÊÇÒ»¸öʾÀýÉèÖ㬿ÉÒÔƾ֤ÏÖÕæÏàÐξÙÐÐÐ޸ġ£ÔÚÉèÖÃÎļþÖУ¬ÎÒÃÇÉèÖÃÁ˼à¿ØÄ¿µÄµÄÃû³Æ¡¢IPµØµã£¬ÒÔ¼°Òª¼à¿ØµÄЧÀÍÀàÐÍ£¨ÈçPing¡¢Ó²ÅÌʹÓÃÂÊ¡¢CPU¸ºÔØ¡¢ÄÚ´æʹÓÃÂʵȣ©¡£ÕâÑù£¬Nagios¾Í»áͨ¹ý°´ÆÚÖ´ÐÐÕâЩ¼ì²éÏÂÁîÀ´¼à¿ØÍøÂç´æ´¢×°±¸µÄ״̬¡£

µÚÈý²½£ºÉèÖùÊÕϻָ´

µ±±¬·¢¹ÊÕÏʱ£¬ÎÒÃÇÏ£ÍûÄܹ»×Ô¶¯¾ÙÐйÊÕϻָ´¡£ÔÚNagiosÖУ¬¿ÉÒÔʹÓÃÊÂÎñ´¦ÀíÆ÷À´ÊµÏÖ¹ÊÕϻָ´µÄ×Ô¶¯»¯¡£

½¨ÉèÒ»¸öÊÂÎñ´¦ÀíÆ÷¾ç±¾£¬ÒÔ±ãÔÚ±¬·¢¹ÊÕÏʱִÐлָ´²Ù×÷¡£ÒÔÏÂÊÇÒ»¸öʾÀý¾ç±¾£º

#!/bin/bash

case "$1" in
    HOST)
        /etc/init.d/network_storage_recovery restart
        ;;
    *)
        echo "Unknown type: $1"
        exit 1
        ;;
esac

exit 0

µÇ¼ºó¸´ÖÆ

ÉÏÊö¾ç±¾Æ¾Ö¤²î±ðµÄ¹ÊÕÏÀàÐÍÖ´Ðвî±ðµÄ¹ÊÕϻָ´²Ù×÷¡£¾ç±¾ÐèҪƾ֤ÏÖÕæÏàÐξÙÐÐÐ޸ģ¬ÒÔÈ·±£ÔÚ±¬·¢¹ÊÕÏʱ¿ÉÒÔÓÐÓõػָ´Ð§ÀÍ¡£

±à¼­NagiosÉèÖÃÎļþ£¬½«ÊÂÎñ´¦ÀíÆ÷¾ç±¾Ìí¼Óµ½ÉèÖÃÎļþÖС£ÔÚÖÕ¶ËÖÐÖ´ÐÐÒÔÏÂÏÂÁ

sudo nano /etc/nagios3/nagios.cfg

µÇ¼ºó¸´ÖÆ µÇ¼ºó¸´ÖÆ

ÔÚÉèÖÃÎļþÖУ¬ÕÒµ½ÒÔÏÂÐУº

event_handler_enabled=0

µÇ¼ºó¸´ÖÆ

½«Æä¸ÄΪ£º

event_handler_enabled=1

µÇ¼ºó¸´ÖÆ

È»ºóÕÒµ½ÒÔÏÂÐУº

event_handler=/path/to/event_handler

µÇ¼ºó¸´ÖÆ

½«Æä¸ÄΪ£º

event_handler=/path/to/event_handler_script

µÇ¼ºó¸´ÖÆ

ÉúÑIJ¢¹Ø±ÕÉèÖÃÎļþ£¬²¢ÖØÐÂÆô¶¯NagiosЧÀÍ¡£

ͨ¹ýÉÏÊö°ì·¨£¬ÎÒÃÇ¿ÉÒÔÔÚLinuxÉÏÉèÖø߿ÉÓõÄÍøÂç´æ´¢¼à¿Ø¡£Ê¹ÓÃNagios×÷Ϊ¼à¿Ø¹¤¾ß£¬ÎÒÃÇ¿ÉÒÔ°´ÆÚ¼ì²éÍøÂç´æ´¢×°±¸µÄ״̬£¬²¢ÔÚ±¬·¢¹ÊÕÏʱ¾ÙÐÐ×Ô¶¯µÄ¹ÊÕϻָ´¡£ÕâÑù¿ÉÒÔÈ·±£ÍøÂç´æ´¢µÄ¿ÉÓÃÐÔºÍÊý¾ÝµÄÇå¾²ÐÔ¡£

±¾ÎÄÌṩÁËÒ»¸ö»ù±¾µÄÉèÖÃʾÀý£¬¶ÁÕß¿ÉÒÔƾ֤ÏÖÕæÏàÐξÙÐÐÏìÓ¦µÄÐ޸ĺÍÀ©Õ¹¡£Í¨¹ýʹÓÃÊʵ±µÄ¼à¿Ø¹¤¾ßºÍÏà¹ØÉèÖ㬿ÉÒÔÌá¸ßÍøÂç´æ´¢µÄ¿É¿¿ÐԺ͸߿ÉÓÃÐÔ£¬ÑÚ»¤Ö÷ÒªÊý¾ÝµÄÇå¾²¡£

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

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

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是博

18523999891

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

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

QR code
sitemap¡¢ÍøÕ¾µØͼ