nagios引數詳解

2021-09-21 10:57:21 字數 2619 閱讀 8575

global_host_event_handler        --全域性事件處理命令

enable_event_handler           --是否啟用或禁用事件處理程式

notification_interval          --報警時間間隔

check_interval               --檢測服務時間間隔

max_check_attempts            --觸發到這個值就報警

check_interval               --服務狀態恢復報警時間

enable_flap_detection          --在nagios主配置檔案中定義,啟用"擺動"檢測

flap_detection_enable          --在host和service中定義,啟用"擺動"檢測

active_checks_enabled          --阻止nagios主動檢測服務

passive_checks_enabled          --啟用nagios被動檢測服務

parents 主機名               --子主機名繼承父主機名

1.配置檔案詳解

host定義:

host_name    --定義一台主機,這個名字將會被用在hostgroup和service定義中.

alias       --定義描述符標識一台主機.

address     --監控該主機的ip位址.

hostgroups    --定義主機屬於哪個主機組.

max_check_attempts    --定義nagios嘗試主機檢測命令的次數.

contacts          --通知聯絡人

contacts_groups      --通知聯絡人組

notification_interval  --服務處於"down"狀態下重新通知聯絡人之前等待的時間

notifications_enabled  --啟用主機通知

use_regexp_matching   --啟用正規表示式,0 表示不啟用,1 表示啟用正規表示式

2.hostgroup定義

hostgroup_name       --定義主機組

alias            --定義乙個組的描述符

members           --主機組的成員

hostgroup_members    --繼承子主機組

3.service定義

host_name            --定義主機的名稱

hostgroup_name         --定義主機組

service_description      --服務描述符

servicegroups          --屬於哪個服務組

check_command          --檢測服務狀態的命令名字

check_interval         --指定時間內檢測服務,預設是60秒.

passive_checks_enabled    --是否啟用主動檢測或被動檢測,0 禁用被動服務檢測,1  啟用被動服務檢測.

dependent_host_name      --依賴指定的主機

dependent_hostgroup_name   --依賴指定的主機組

dependent_sevice_description    --依賴指定的服務

inherits_parent             --依賴的服務是否被繼承

notification_failure_criteria   --指定什麼情況下不會向依賴服務傳送通知報警

dependency_period           --指定時間依賴服務生效

4.servicegroup定義

sevicegroup_name       --服務組名

alias              --服務組的描述符

members            --服務組中包括哪些主機

servicegroup_members    --服務組包括子服務組

5.contact定義

contact_name         --定義乙個聯絡人

alias             --聯絡人描述符

contactgroups        --定義乙個聯絡人組

host_notifications_enabled     --主機發生故障時是否通知聯絡人

service_notifications_enabled   --服務發生故障時是否通知聯絡人

service_notifications_options   --定義服務在什麼狀態下通知聯絡人

email                   --定義乙個電子郵件通知聯絡人

pager                   --定義乙個手機號碼

6.contactgroup定義

contactgroup_name        --定義聯絡人組

alias                --定義組的描述符

members               --聯絡組中的成員(聯絡人)

contactgroup_members      --服務組中包括子聯絡組

nagios 總結 nagios簡要總結

今天初步搞定了nagios監控,寫下心得 只論nagios,不說apache等 必要安裝的東西 nagios 主程式軟體 nagios plugins 監控架設的外掛程式 nrpe 資訊狀態返回的外掛程式 檔案介紹 檔案作用的物件 聯絡人contact出了問題像誰報告?一般當然是系統管理員了 監控時...

Nagios監控HTTP服務的使用和引數描述

監控主機設定檔案 define host 在nagios的官方配置檔案中,是使用generic host來作為繼承引數。我在實際測試中發現無法通過nagios監測,提示錯誤為error invalid max check attempts value for host remotehost1 即使新...

監控軟體nagios之配置檔案詳解

1.nagios根目錄 root tong1 nagios 4.0.8 ll total 28 drwxrwxr x.2 nagios nagios 4096 apr 1 14 50 bin 二進位制檔案 drwxrwxr x.3 nagios nagios 4096 apr 1 15 27 etc...