Nagios 初次摸搜。

2021-07-14 06:24:20 字數 1461 閱讀 5193

nagios監控實現是通過外掛程式來實現

nagios啟動後,會自動週期性的呼叫外掛程式去檢測伺服器狀態,同時nagios會維持乙個佇列,所有外掛程式返回來的狀態資訊都進入佇列,nagios每次都從隊首開始讀取資訊,並進行處理後,把狀態結果通過web顯示出來

安裝軟體gcc glibc glibc-common gd gd-devel xinetd openssl-devel nagios nagios-plugin php php-gd php-mcrypt php-mbstring php-mysql php-pdo httpd

修改nagios/apache的使用者和使用者組為nagios

directoryindex index.html index.php

#setting for nagios

scriptalias /nagios/cgi-bin "/usr/local/nagios/sbin"

authtype basic

options execcgi

allowoverride none

order allow,deny

allow from all

authname "nagios access"

authuserfile /usr/local/nagios/etc/htpasswd

require valid-user

alias /nagios "/usr/local/nagios/share"

authtype basic

options none

allowoverride none

order allow,deny

allow from all

authname "nagios access"

authuserfile /usr/local/nagios/etc/htpasswd

require valid-user

htpasswd -c /usr/local/nagios/etc/htpasswd abc

cgi.cfg     控制cgi訪問的配置檔案

nagios.cfg   nagios 主配置檔案 並設定其他配置檔案。cgi.cfg除外

resource.cfg 定義執行檔案目錄。commands.cfg需要呼叫定義變數

commands.cfg 命令定義配置檔案和郵件命令,加設定引數,用 ! 傳遞

郵件需要在templates.cfg/contacts.cfg 使用 其他需要在templates.cfg或者server.cfg引用

contacts.cfg     定義聯絡人和聯絡人組 需要templates.cfg的contacts模板,告警郵件命令 可選使用者組

templates.cfg  大全 主機模板,聯絡人模板 服務模板 需要引用時間

timeperiods.cfg     定義nagios 監控時間段的配置檔案

nagios 總結 nagios簡要總結

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

nagios 總結 運維監控之nagios

無監控,不運維。沒有了監控,運維靠什麼排查問題?靠什麼調優?靠什麼規劃資源?因此,監控系統對於做好運維是必不可少的。目前,比較流行的開源監控有zabbix nagios pormetheus open falcon等。nagios是一款開源的伺服器和網路監視工具,能有效監控windows linux...

數學建摸總結

前言 在此感謝對我們進行長期培訓的老師們和在數學建模中的隊友們 致敬。正文 本人一名計算機專業的大二學生,在上大學之前從未聽說和接觸過數學建模。直到大一下學期才開始接觸建摸。我在大一上學期加入了學校acm演算法公關部,編碼能力和邏輯思維能力較強,因此數學學院的老師找到我們的老師希望我們參加數學建模比...