�O��́AWeb�T�[�o�̊Ď��c�[���̑I��Ǝ��ۂ̃C���X�g�[����Ƃɂ��ĉ�����܂����B����́ANagios�̃R���t�B�O�t�@�C���̐ݒ�ɂ��āA�����������ݍ���������Ȃ���AICMP�ɂ��Ď��ɂ��ďЉ�܂��B�i�ҏW�ǁj
�@Nagios�ɂ��Ď��̐ݒ�́A�R���t�B�O�t�@�C���ɕK�v�Ȑݒ���L�q��������ł���B�Ƃ��낪�A�O��̋L���iWeb�T�[�o�̊Ď�?�Ď��c�[���̓����j�̌f�ڌ�Ɋ�ꂽ����̒��ɂ́A���̃R���t�B�O�̐ݒ�Ɍ˘f���Ă���������������B�����ŁA�����Nagios�̃R���t�B�O�t�@�C���ɂ��āA�����������ݍ���������������ŁA�ł���{�I��ICMP�iping�j�ɂ��Ď�����������Ƃ���܂ł�������邱�Ƃɂ����B
�@Nagios�ɂ͕����̃R���t�B�O�t�@�C��������BNagios�̃R���t�B�O�t�@�C���Q�́A�傫������5����ɕ�������B
�i1�j���C���R���t�B�O�t�@�C��
�i2�j���\�[�X�t�@�C��
�i3�j�I�u�W�F�N�g�R���t�B�O�t�@�C��
�i4�jCGI�R���t�B�O�t�@�C��
�i5�j�g���R���t�B�O�t�@�C��
�@�R���t�B�O�t�@�C���̃T���v���́ANagios���C���X�g�[�������f�B���N�g���z����/etc�f�B���N�g���i�W����/usr/local/nagios/etc�j�ɕۑ�����Ă���B�����̃T���v���t�@�C���𗘗p���āA�K�v�ȕ���������ύX����悤�ɂ��悤�B
�����C���R���t�B�O�t�@�C���inagios.cfg�j
�@Nagios���s���ɎQ�Ƃ���郁�C���̃R���t�B�O�t�@�C���ŁANagios�̎��s�ɕK�v�Ȋ���ݒ肷��BNagios�̎��s���W���[���ACGI�͂Ƃ��ɂ��̃t�@�C�����Q�Ƃ���B�܂��A�ق��Ɏg�p����R���t�B�O�t�@�C��������ꍇ�ɂ́A���́unagios.cfg�v���ɒ�`���Ȃ���Ȃ�Ȃ��B
�@���C���R���t�B�O�t�@�C���ɂ͔��ɑ����̐ݒ荀�ڂ����邪�A�����̓f�t�H���g�̐ݒ�̂܂܂ŗ��p�ł���B�Ď���ݒ肷��ꍇ�ɁA���ӂ��Ċm�F���Ȃ���Ȃ�Ȃ����ڂɂ́A���O�t�@�C���A�R���t�B�O�t�@�C���Ȃǂ̊Ď����ʂ���s���̃G���[���o�͂����t�@�C���ƁA�Ď������s���郆�[�U�[�Ȃǂ̎w����B�e�ݒ荀�ڂɂ͉p��ŃR�����g���L�q����Ă���̂ŁA�ύX����O�Ɋm�F���邱�ƁB
# LOG FILE
Nagios�����s����Ă���Ԃ̃C�x���g�����M���O����t�@�C���������Ŏw�肷��B�f�t�H���g�́u/usr/local/nagios/var/nagios.log�v�ł���B�t���p�X�Ńt�@�C�������w�肷�邱�ƂŁA�C�ӂ̃t�@�C���փ��O���o�͂���
�i��j
log_file=/usr/local/nagios/var/nagios.log
# OBJECT CONFIGRATION FILE(S)
�Ď��Ώۂ̏���ۊǂ���t�@�C���̃p�X���w�肷��B�W����/usr/local/nagios/etc/�ȉ��̃f�B���N�g���Ɋi�[�����R���t�B�O�t�@�C���Q�i�g���q��cfg�̃t�@�C���j�̂��ׂẴp�X���L�q����Ă��邱�Ƃ��m�F���悤
�i��j
cfg_file=/usr/local/nagios/etc/hosts.cfg
cfg_file=/usr/local/nagios/etc/checkcommands.cfg
# RESOURCE FILE
�v���O�C�����C���X�g�[�����Ă���f�B���N�g���ւ̃p�X���w�肷��
�i��j
resource_file=/usr/local/nagios/etc/resource.cfg
# STATUS FILE
���ׂĂ̊Ď��Ώۂ̃X�e�[�^�X���L�^����t�@�C�����w�肷��BNagios���N�����邽�тɂ��̃t�@�C���̓��e�̓N���A�����̂ŁA�t�@�C���̎Q�Ƃɂ͒��ӂ��K�v��
�i��j
status_file=/usr/local/nagios/var/status.log
# NAGIOS USER
# NAGIOS GROUP
Nagios�����s����Ƃ��̃��[�U������уO���[�v�����w�肷��B���[�U���A�O���[�v���̕������������UID�AGID�̂����ꂩ�Ŏw�肷��
�i��j
nagios_user=nagios
nagios_group=nagios
# LOG ROTATION METHOD
���O���[�e�[�V�����̕��@���w�肷��B�����ԁA�����A���T�A�����A����у��[�e�[�V�������Ȃ���5��ނ̂��������ꂩ���w�肷��
�i��j
log_rotation_method=d
# LOG ARCHIVE PATH
���O���[�e�[�V�����ɂ��A�[�J�C�u�����t�@�C����ۊǂ���f�B���N�g�����w�肷��
�i��j
log_archive_path=/usr/local/nagios/var/archives
# TIMEOUT VALUES
Nagios�����s����R�}���h�̃^�C���A�E�g�l��b�P�ʂŎw�肷��
�i��j
service_check_timeout=60
host_check_timeout=30
# INTERVAL LENGTH
�Ď��Ԋu��b�P�ʂŎw�肷��B�W����60�b
�i��j
interval_length=60
�@�����܂ł̐ݒ��nagios.cfg�̈��ł���BICMP�ɂ��a�ʊĎ����x�ł���A���̒��x�̐ݒ荀�ڂ��m�F����Ώ\�����낤�B�������A�ݒ�\�ȃI�v�V�����ɂ́A�Ď�����flapping�i�a�ʂ���ꂽ����Ȃ������肷�錻�ہj��F�m���邩�A�F�m������ꍇ�̂������l�͂ǂ����邩�ȂǂƂ��������ڂ��ݒ�ł���B���ׂ����ݒ���������ꍇ�ɂ́ANagios�̃h�L�������g���Q�Ƃ��Ăق����B
�����\�[�X�t�@�C���iresource.cfg�j
�@����ۊǂ��邽�߂̃t�@�C���ŁA���[�U�쐬�̃}�N���̒�`��A�f�[�^�x�[�X�Ƃ̐ڑ��ɕK�v�ȏ���ݒ肷�邽�߂Ɏg�p����B
���I�u�W�F�N�g�R���t�B�O�t�@�C��
�@�I�u�W�F�N�g�R���t�B�O�t�@�C���́A���̂悤�ȕ����̃t�@�C������`�������B
hosts.cfg
hostgroups.cfg
services.cfg
checkcommands.cfg
contacts.cfg
contactgroups.cfg
dependencies.cfg
escalations.cfg
misccommands.cfg
timeperiods.cfg
�@�����̃t�@�C���ɊĎ��Ώۂ̃z�X�g���A�T�[�r�X�A�ʒm��A���s�R�}���h�����`����BNagios�ւ̊Ď��ݒ�́A��ɂ����̃R���t�B�O�t�@�C���ɋL�q����B
�@ �����̃I�u�W�F�N�g�R���t�B�O�t�@�C���́A���ʐݒ�̃e���v���[�g�ƁA�����⊮����ʐݒ�Ƃ���2�d�\���ɂȂ��Ă���B�ŏ��Ƀt�@�C���S�̂֗L���ƂȂ�p�����[�^�ݒ���e���v���[�g�Ƃ��Ē�`���A���̌�Ɍʂ̐ݒ���L�q����\���ɂȂ��Ă���B�e���v���[�g�Œ�`�����p�����[�^�̐ݒ�l�͌ʐݒ�̒�`�̒��Ɍp���ł���̂ŁA�����̐ݒ�l��L���Ɋ��p����Ɛݒ肪�y�ɂȂ�B
�Ehosts.cfg
�Ď��Ώۋ@��̏����w�肷��B
�i�e���v���[�g�̋L�q�j
�@�t�@�C���S�̂ŋ��ʂȁi�������͂����Ă��̊Ď��Ώۂŋ��ʂɎg���Ǝv����j�p�����[�^���L�q�����e���v���[�g�ŁAdefine host{ }�ň͂܂ꂽ�͈͂Ƀp�����[�^�Ɛݒ�l���L�q����B�����ŋL�q���ꂽ�p�����[�^�́A�I�u�W�F�N�g�ɒ�`���ꂽ���O�Ŏ��ʂł���B��ɋL�q�����e�Ď��Ώۂ̐ݒ�ł́A���̃e���v���[�g�ɒ�`���ꂽ���O���w�肷�邱�ƂŁA�e���v���[�g�ŋL�q�����p�����[�^���e�Ď��ΏۂŌp�����邱�Ƃ��ł���B
�@�I�u�W�F�N�g�p�����[�^�t�@�C����2�d�\�����킩��ɂ������Ƃ��l������̂ŁA�L�q����ȉ��Ɏ����B���̗�ł̓e���v���[�g�Ƃ��Đݒ肷��I�u�W�F�N�g�̖��O���uname�v�Ƃ������O�Œ�`����B����name���ŋL�q�����p�����[�^�́A�e�Ď��Ώۗp�̃I�u�W�F�N�g�Łguse�h�p�����[�^�ɂ��l���p���ł���B�Ȃ�ׂ��Ď��ΏۑS�̂ɋ��ʂ���p�����[�^��I��Œ�`���A�e�Ď����ڌ����̃I�u�W�F�N�g�ŗL�����p�ł���悤�ɂ������B
�@ �܂��Aregister �p�����[�^�͕W���Łg1�h���ݒ肳��ANagios�v���O���������̃I�u�W�F�N�g�����s�����ׂ��I�u�W�F�N�g�ł���ƔF������B�ݒ肵���I�u�W�F�N�g���e���v���[�g�Ƃ��Ďg�������Ƃ��́Aregister
�p�����[�^�Ɂg0�h���I�ɐݒ肷��K�v������B
�y��z
# Generic host definition template define host{ name generic-host ; The name of this host template - referenced in other host definitions, used for template recursion/resolution notifications_enabled 1 ; Host notifications are enabled event_handler_enabled 1 ; Host event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! }
�E�e�Ď��Ώۂ̏��ݒ�
�@�Ď��Ώۋ@��̃z�X�g���A�Ď��Ώۋ@��̐����AIP�A�h���X�A�Ď��Ɏg�p����R�}���h�A�Ď����̃X�e�[�^�X�m�F���{�A�A���[�g�Ɋւ���ݒ�Ȃǂ��L�q����B�e���v���[�g�Ŏw�肳��Ă���p�����[�^�Ƃ��̌ʂ̊Ď��Ώۋ@��̃p�����[�^���d�����Ďw�肳�ꂽ�ꍇ�A�ʂ̊Ď��Ώۋ@��̒�`�̕����L���ƂȂ�B
�y��z
# 'hoge' host definition define host{ use generic-host ; Name of host template to use host_name hoge alias Test Server #1 address xxx.xxx.xxx.xxx check_command check-host-alive }
�Ehostgroups.cfg
hosts.cfg�Őݒ肵���e�Ď��Ώۂ��O���[�v�Ƃ��Ē�`�������̂ł���B�A���[�g�̒ʒm�悪�����Ď��Ώۋ@���1�̃O���[�v�Ƃ��Ă܂Ƃ߂ċL�q����t�@�C���ƍl����Ƃ킩��₷���B
�Eservices.cfg
�e�Ď��Ώۋ@��ɁA�ǂ̂悤�ȊĎ������s����̂����w�肷��B
�Echeckcommands.cfg
Nagios���Ď��Ώۂɑ��Ď��s����R�}���h���`����BNagios���C���X�g�[��������ԂŎ�������Ă���R�}���h�́A�Ď��ɕK�v�ȃR�}���h�̑命����ԗ����Ă��邽�߁Ahosts.cfg�t�@�C����������services.cfg�t�@�C���Ŏw�肵�Ă���check_command�p�����[�^�ɂ́A���̃t�@�C������K�v�ȔC�ӂ̃R�}���h���w�肷�邾���ŏ\�����낤�B
�Econtacts.cfg�Acontactgroups.cfg
Nagios����Q�����m�����ꍇ�ɁA�A���[�g��ʒm�������w�肷��B
�Eescalations.cfg
��Q���ɒʒm����悪�Acontactgroups.cfg�Őݒ肵���ǂ̒ʒm��O���[�v�ɑ����Ă��邩���w�肷��B
�Emisccommands.cfg
�A���[�g�ʒm�p�̃R�}���h���w�肷��Bcommand_name�Őݒ肵���p�����[�^�l�́Acontacts.cfg�t�@�C������service_notification_commands�Ahost_notification_commands �Ŏw�肷��B
�Etimeperiods.cfg
�Ď����鎞�ԑт��w�肷��B
��CGI�R���t�B�O�t�@�C���icgi.cfg�j
�@�ucgi.cfg�v�́ACGI�֘A�̐ݒ���L�q����R���t�B�O�t�@�C���ł���B
���g���R���t�B�O�t�@�C��
�@CGI�Ŏg����z�X�g����уT�[�r�X�ɑ���t�������`���邽�߂Ɏg�p����R���t�B�O�t�@�C���B�A�C�R���̒�`���Ɏg���B
�������ł͌��y���Ȃ����ANagios��Web�C���^�t�F�[�X�𗘗p����ɂ́ANagios�̃R���t�B�O�t�@�C���ȊO��Web�T�[�o�v���O�����iapache�Ȃǁj�̃R���t�B�O�t�@�C���̏C�����K�v�ł���BCGI��HTML�t�@�C���ւ̃A�N�Z�X���\�ɂȂ�悤�A�g�p���Ă���Web�T�[�o�v���O�������Ƃɐݒ肵�Ăق����B
�@���ۂɃR���t�B�O�t�@�C���̃p�����[�^�̈Ӗ������ɒ��ӂ��Ȃ���A�V�X�e���Ď��̊�{�ł���ICMP�ɂ��a�ʊm�F�����I�Ɏ��s����悤�ɐݒ肵�Ă݂悤�B�ݒ肷��Ď��Ώۂ̏��͎��̂Ƃ���B
�Ď��Ώۋ@�햼 | www.yahoo.co.jp |
---|---|
�Ď����� | ICMP�iping�j�ɂ��a�ʊĎ� |
�Ď��Ԋu | 1�� |
�ُ�Ɣ��f������� | 5���ԁAping�ɂ�鉞�����A�����ĂȂ����� |
�ʒm�� | [email protected] |
��hosts.cfg�̐ݒ�
�@hosts.cfg�ɂ́A�Ď��Ώۋ@��̃z�X�g�ݒ���L�q����B�e���v���[�g�Ƃ��ẴI�u�W�F�N�g�́A�f�t�H���g�̂܂܁B
# Generic host definition template define host{ name generic-host ; The name of this host template - referenced in other host definitions, used for template recursion/resolution notifications_enabled 1 ; Host notifications are enabled event_handler_enabled 1 ; Host event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE! }
�@�ʂ̊Ď��Ώۋ@��̐ݒ�͎��̂Ƃ���B�e���v���[�g�̐ݒ���p�����A�z�X�g���AIP�A�h���X�A���s����R�}���h�A�Ď��Ώۂ����S�Ƀ_�E�����Ă���ƔF�m����܂ł̒l�A�A���[�g�ʒm�Ɋ֘A����ݒ�i�ĘA���܂ł̎��ԁA�ʒm�̎��ԑсA�ʒm���e�j��ݒ肷��B
# 'speech' host definition define host{ use generic-host ; Name of host template to use host_name www.yahoo.co.jp alias Yahoo Server #1 address www.yahoo.co.jp check_command check-host-alive max_check_attempts 5 notification_interval 0 notification_period 24x7 notification_options d,u,r }
��hostsgroups.cfg
�@hostsgroups.cfg�ɂ́A�Ď��Ώۂ̃z�X�g�̃O���[�v��ݒ肷��B�Ď��Ώۂ�www.yahoo.co.jp�́Atest-servers�Ƃ����z�X�g�O���[�v�ɑ����A�ʒm��̃O���[�v��test-admins��ݒ肷��B
# 'test' host group definition define hostgroup{ hostgroup_name test-servers alias Test Servers contact_groups test-admins members www.yahoo.co.jp }
��escalations.cfg
�@escalations.cfg�ɂ́A�A���[�g�̒ʒm���@��ݒ肷��B���̗�ł́A5��ځA6��ڂ�ping�a�ʕs�ŁAcontact_groups�֒ʒm������悤�ɐݒ肵�Ă���B
# Serviceescalation definition define serviceescalation{ host_name www.yahoo.co.jp service_description PING first_notification 5 last_notification 6 contact_groups test-admins notification_interval 0 }
��services.cfg
�@services.cfg�ɂ́A�e�Ď��Ώۋ@��ɂǂ̂悤�ȊĎ������s����̂����w�肷��Bhosts.cfg�Ɠ��l�A�܂��e���v���[�g�I�u�W�F�N�g���`���邪�A����͕W���̂܂ܗ��p���邱�Ƃɂ����B
# Generic service definition template define service{ name generic-service ; The 'name' of this service template, referenced in other service definitions active_checks_enabled 1 ; Active service checks are enabled passive_checks_enabled 1 ; Passive service checks are enabled/accepted parallelize_check 1 ; Active service checks should be parallelized (disabling this can lead to major performance problems) obsess_over_service 1 ; We should obsess over this service (if necessary) check_freshness 0 ; Default is to NOT check service 'freshness' notifications_enabled 1 ; Service notifications are enabled event_handler_enabled 1 ; Service event handler is enabled flap_detection_enabled 1 ; Flap detection is enabled process_perf_data 1 ; Process performance data retain_status_information 1 ; Retain status information across program restarts retain_nonstatus_information 1 ; Retain non-status information across program restarts register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE! }
�@���ɁA����̊Ď��ΏہAwww.yahoo.co.jp���ʂ̊Ď��Ώۋ@��Ƃ��Ē�`����B�e���v���[�g�̐ݒ���p�����A�z�X�g���A�Ď��Ώۂ����S�Ƀ_�E�����Ă���ƔF�m����܂ł̉A����ł��邱�Ƃ�F�m����A���m�����ُ���m�F����A�ʒm�O���[�v�A�A���[�g�ʒm�Ɋ֘A����ݒ�i�ĘA���܂ł̎��ԁA�ʒm�̎��ԑсA�ʒm���e�j�A���s�R�}���h��ݒ肷��B
# Service definition define service{ use generic-service ; Name of service template to use host_name www.yahoo.co.jp service_description PING is_volatile 0 check_period 24x7 max_check_attempts 5 normal_check_interval 5 retry_check_interval 1 contact_groups test-admins notification_interval 0 notification_period 24x7 notification_options c,r check_command check-host-alive } #
�@notification_interval�́A�X�e�[�^�X�ُ��ʒm��A���̎��Ԃ�u���Ă���ēx���̃X�e�[�^�X�ُ��ʒm����ݒ�ł���B����́g0�h�ɐݒ肵�āA��x�ʒm���ꂽ�X�e�[�^�X�ُ�͍ēx���M���Ȃ��B
��timeperiods.cfg
�@�X�e�[�^�X�ُ�����m�����Ƃ��ɁA�A���[�g��ʒm���鎞�ԑт��`����B�Ď����������ԑт����̃t�@�C���Œ�`���Atimeperiod_name�Œ�`�������O���ق��̃t�@�C���ŌĂяo���Ďg�p����B
# '24x7' timeperiod definition define timeperiod{ timeperiod_name 24x7 alias 24 Hours A Day, 7 Days A Week sunday 00:00-24:00 monday 00:00-24:00 tuesday 00:00-24:00 wednesday 00:00-24:00 thursday 00:00-24:00 friday 00:00-24:00 saturday 00:00-24:00 }
��contactgroups.cfg
�@�ق��̃R���t�B�O�t�@�C���Łucontacts_group�v�Ƃ��Ē�`����Ă���ݒ���L�q����R���t�B�O�t�@�C���B�����o�[�Ƃ��Ē�`���ꂽ�p�����[�^�l�́Acontacts.cfg�Œ�`����B
# 'test-admins' contact group definition define contactgroup{ contactgroup_name test-admins alias Test Administrators members nagios }
��contacts.cfg
�ucontactgroups.cfg�v����A�R���t�B�O�t�@�C���̃����o�[�Ƃ��ČĂяo�����ݒ���`����B
## 'nagios' contact definition define contact{ contact_name nagios alias Nagios Admin service_notification_period 24x7 host_notification_period 24x7 service_notification_options w,u,c,r host_notification_options d,u,r service_notification_commands notify-by-email host_notification_commands host-notify-by-email email nagios@localhost }
�@ �����ŁAservice_notification_options�̋L�q�ɂ́A���̂悤�ȈӖ�������B
w | warning |
---|---|
u | unreachable |
c | critical |
r | recoverey |
�@�܂��Ahost_notification_options�̋L�q�ɂ́A���̂悤�ȈӖ�������B
d | down |
---|---|
u | unreachable |
r | recoverey |
�@service_notification �Ƃ��Ē�`����Ă���A���[�g�̒ʒm�́A�֘A����host���Ď����ԊO�̏ꍇ�ɂ͏ȗ������B�܂��A���炩�ُ̈�X�e�[�^�X��ʒm���Ă����ꍇ�̂݁A�����X�e�[�^�X�̑��M���s���悤�ɐݒ肳��Ă���B�i�܂�A�����X�e�[�^�X�݂̂̒ʒm�͍s��Ȃ��j�ʒm��́Aemail�I�v�V�����֒��ڋL�q���A�ʒm���e�Ǝ��ۂɔ��s����R�}���h�́uservice_notification_commands�v����сuhost_notification_commands�v����Q�Ƃ����umisccommands.cfg�v�ɋL�q����B
��misccommands.cfg
�@�ُ�����m�����ꍇ�ɁA���̃A���[�g��ʒm���邽�߂̃R�}���h���`����Bcommand_name�Œ�`�����I�u�W�F�N�g�̖��O�ŁAcommand_line�ɋL�q�����R�}���h�����s����B�@�@�@�@�@�@�@
�@contacts.cfg���ŁAservice_notification_commands��host_notification_commands����A�����Œ�`���ꂽ�R�}���h�I�u�W�F�N�g�̖��O���g�p����B
# 'notify-by-email' command definition define command{ command_name notify-by-email command_line /usr/bin/printf "%b" "***** Nagios 1.0b6 *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" | /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$ } # 'host-notify-by-email' command definition define command{ command_name host-notify-by-email command_line /usr/bin/printf "%b" "***** Nagios 1.0b6 *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $OUTPUT$\n\nDate/Time: $DATETIME$\n" | /bin/mail -s "Host $HOSTSTATE$ alert for $HOSTNAME$!" $CONTACTEMAIL$ }
��checkcommands.cfg
�@�Ď��̂��߂ɔ��s����R�}���h���`����Bcommand�Ƃ��Ē�`�����I�u�W�F�N�g�̖��O��check-host-alive�ŁA���̖��O��check_command�Œ�`����ƁAcommand_line�̂悤�Ɏ��s�����B
# 'check-host-alive' command definition define command{ command_name check-host-alive command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 1 }
�@check-host-alive�́Aping�R�}���h�s����check_ping�R�}���h���C���������̂ŁA3�b�Ԃ�80���̃p�P�b�g���X�����m�����ꍇ��Warning�A5�b�Ԃ�100���̃p�P�b�g���X�����m�����ꍇ��Critical�G���[�ƔF������B�����ŁA-w�I�v�V������-c�v�V�����ɂ�����P�ʂ́Ams�i�~���b�j�ł���B�܂��A-p�I�v�V�����ɂ���āA1��ɔ��s����ICMP�p�P�b�g�̐����`�ł��A���̃R�}���h�ł́A�g1�h�ł���B
�@�Ď��ɕK�v�Ȃ��ׂĂ̐ݒ���R���t�B�O�t�@�C���֎w�肵����A�R���t�B�O�t�@�C���̐��������m�F����B�R���t�B�O�t�@�C���̃`�F�b�N�́ANagios�̎��s�R�}���h��-v�I�v�V���������ă��C���R���t�B�O�t�@�C�����w�肵�Ď��s����B
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
�@����ɂ���āA���C���R���t�B�O�t�@�C���ł���nagios.cfg��ǂݍ��݁A����Ɏw�肳��Ă��邷�ׂẴR���t�B�O�t�@�C���̐��������m�F���邱�Ƃ��o����B
�@-v �I�v�V�����ɂ���Ċm�F�����_�́A���̂Ƃ���ł���B
�@-v�I�v�V�������s��ɃG���[���o���ꍇ�A�����̃|�C���g��O���ɒu���Ċe�R���t�B�O�t�@�C�����m�F���悤�B
�y��z
�@�@[nagios@nagios etc]$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg �@�@Nagios 1.0b6 �@�@Copyright (c) 1999-2002 Ethan Galstad ([email protected]) �@�@Last Modified: 09-15-2002 �@�@License: GPL �@�@Reading configuration data... �@�@Running pre-flight check on configuration data... �@�@Checking services... �@�@ Checked 3 services. �@�@Checking hosts... �@�@ Checked 3 hosts. �@�@Checking host groups... �@�@ Checked 2 host groups. �@�@Checking contacts... �@�@ Checked 1 contacts. �@�@Checking contact groups... �@�@ Checked 2 contact groups. �@�@Checking service escalations... �@�@ Checked 3 service escalations. �@�@Checking host group escalations... �@�@ Checked 0 host group escalations. �@�@Checking service dependencies... �@�@ Checked 0 service dependencies. �@�@Checking host escalations... �@�@ Checked 0 host escalations. �@�@Checking host dependencies... �@�@ Checked 0 host dependencies. �@�@Checking commands... �@�@ Checked 22 commands. �@�@Checking time periods... �@�@ Checked 4 time periods. �@�@Checking for circular paths between hosts... �@�@Checking for circular service execution dependencies... �@�@Checking global event handlers... �@�@Checking obsessive compulsive service processor command... �@�@Checking misc settings... �@�@Total Warnings: 0 �@�@Total Errors: 0 �@�@Things look okay - No serious problems were detected during the pre-flight check �@�@[nagios@nagios etc]$
�@�R���t�B�O�t�@�C���̏������I�������ANagios�ɐV�����R���t�B�O�t�@�C����F�������邽�߂Ƀ��X�^�[�g����K�v������BNagios�����s�����Ă��Ȃ��ꍇ�ɂ́A���ʂɎ��s���邾���Ŗ��Ȃ��B
�@��{�I�ɊĎ��c�[�����~���邱�Ƃ͋H�ł���B���̂��߁A�Ď��c�[���̃v���O�����̓o�b�N�O���E���h�Ŏ��s������ׂ��ł���B�C���X�g�[������init�X�N���v�g���C���X�g�[�������̂ŁA���̃X�N���v�g���g�p���Ē�~�E�N���E�ċN������Ƃ������낤�B�����̍�Ƃ�root�Ŏ��s���邱�ƁB
/usr/rc.d/init.d/nagios stop
/usr/rc.d/init.d/nagios start
/usr/rc.d/init.d/nagios restart
�y��z
�@�@[root@nagios etc]# /etc/init.d/nagios restart �@�@Running configuration check...done �@�@Stopping network monitor: nagios �@�@Starting network monitor: nagios �@�@PID TTY TIME CMD �@�@21671 ? 00:00:00 nagios �@�@[root@nagios etc]#
�@�������A�R���t�B�O�t�@�C�����C�����ă\�t�g�E�F�A�̍ċN�����|�������Ƃ��́A�R���t�B�O�t�@�C����ǂݍ��܂��邽�߂̃I�v�V�������p�ӂ���Ă���̂ŁA���̃I�v�V�����𗘗p���悤�B
/usr/rc.d/init.d/nagios reload
�@Nagios���N��������A���ۂɎ��s����Ă��邩�ǂ����v���Z�X�̎��s�Ŋm�F����B
ps axu | grep nagios�@
�@���̃R�}���h�����s���ē���ꂽpid���g���Akill�R�}���h���g�����ƂŁANagios���~������ċN���������肷�邱�Ƃ��ł���B
kill pid
kill -HUP pid
�@�����Nagios�ɂ��w��URL�̊Ď���ݒ肵�AWeb�T�[�o�̉ғ�����ɊĎ�����^�p�ɂ��Č��y����\��ł���B
Copyright © ITmedia, Inc. All Rights Reserved.