2016-08-09 12 views
0

私は人形でnagiosインフラストラクチャをやり直していますが、現在は一見単純な問題(おそらく設定問題)で停止しています。Nagiosのホスト通知が電子メールまたはロギングで送信されない

人形を使って、ディスク上にいくつかの基本的なNagios設定ファイルを吐き出しました。 Nagiosはうまく再ロードされ、UIではすべてが正常に見えますが、ホストを停止しても通知は送信されません。

nagios.log示す:

[1470699491]外部コマンド: PROCESS_HOST_CHECK_RESULT; divcont01; 1;試験通知

[1470699491] PASSIVEホストチェック:divcont01; 1;試験通知

[1470699491]ホストアラート:divcont01;ダウン;ハード; 1;テスト通知

produ ction(私は何も変更されていない)、私は(UIでホストをダウンマーキング後)nagios.logに参照:

[1470678186]外部コマンド: PROCESS_HOST_CHECK_RESULT; PALTL12; 1;試験EY

[1470678187] PASSIVEホストチェック:PALTL12; 1;試験EY

[1470678187] HOSTアラート:PALTL12; DOWN; HARD; 1;試験EY

[1470678187] HOST通知: pal_infra; PALTL12、DOWN。ホスト通知 - ポ - ム;テストey

[1470678187] HOST通知: pal_infra; PALTL12、DOWN、ホスト通知バイメール;試験EY

[1470678192] HOSTアラート:PALTL12; UP; HARD; 1; PING OK - パケット損失= 0%、 RTA = 0.81 MS

[1470678192] HOST通知: pal_infra; PALTL12; UP;ホスト通知バイPOM; PING OK - パケット損失= 0%、 RTA = 0.81 MS

[1470678192]ホスト通知: pal_infra; PALTL12; UP;電子メールによるホスト通知; PING OK - パケット損失= 0%、 RTA = 0.81 MSログに見られるように

は、HOST通知が記録され、PROD内のホスト警告直後に送信があります。私は徹底的に今日の設定ファイルを比較していて、新しい設定が通知の手前で停止する理由を見つけることができません。

通知がトップレベルで有効になっていることを確認しました。私はこのボックスから電子メールを送信できることを確認しました(ただし、電子メールではなく機能を確認するためにログを使用しています)。私も複数の他のGoogleの提案を試みた(と私の検索も続ける)。

下記の関連する設定の詳細。私の設定と不十分なスタックオーバフローフォーマットの冗長さを許してください。前もって感謝します。

hosts/divcont01。CFG:

ホストを定義{

address    snip 
    host_name divcont01      
    use   generic-host-puppetized 

}

ホストテンプレート/ジェネリック・ホストpuppetized.cfg:

ホスト{

check_command     check-host-alive 
    check_interval     1 
    contact_groups     generic-contactgroup 
    checks_enabled     1 
    event_handler_enabled   0 
    flap_detection_enabled   0 
    name       generic-host-puppetized 
    hostgroups      +generic-host-puppetized 
    max_check_attempts    4 
    notification_interval   4 
    notification_options   d,u,r 
    notification_period   24x7 
    notifications_enabled   1 
    process_perf_data    0 
    register      0 
    retain_nonstatus_information 1 
    retain_status_information  1 
を定義

}

ホストグループ/ジェネリック・ホストpuppetized.cfg:

定義ホストグループ{

hostgroup_name     generic-host-puppetized 

}

CONTACTGROUPS /ジェネリック-contactgroup.cfg

CONTACTGROUP {

contactgroup_name    generic-contactgroup 
    members      generic-puppetized-contact 

}

コンタクト/ジェネリック-puppetized-contact.cfg

接触を定義する{

use       generic-contact 
    contact_name     generic-puppetized-contact 
    email       <my email> 

}

を定義

オブジェクト/ templates.cfg(一般接触設定のみ)

接触{

use        my email 
    name       generic-contact   ; The name of this contact template 
    service_notification_period  24x7     ; service notifications can be sent anytime 
    host_notification_period  24x7     ; host notifications can be sent anytime 
    host_notification_commands  generic-puppetized-contact-host-notify-by-email-low 
    service_notification_commands notify-by-email,service-notify-by-pom 
    service_notification_options u,c,r,f   ; send notifications for all service states, flapping events, and scheduled downtime events 
    host_notification_options  d,r,f   ; send notifications for all host states, flapping events, and scheduled downtime events 

    register      0      ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE! 

}

コマンド/ジェネリック-puppetized-接触宿主 - を定義します通知メールによる通知 - low.cfg:

コマンドを定義{

command_line     /etc/nagios/global/scripts/nagios-mailx.sh -t my email -s "** notification Host Alert: hostname is hoststate **" -m "***** Nagios ***** Notification Type: notification type Host: host State: hoststate Address: address Info: output Date/Time: date" 
    command_name     generic-puppetized-contact-host-notify-by-email-low 

}

答えて

0

が...私は別の既存システム(危険、私が知っている)の中に私のシステムを構築して、私の連絡先が実際に指したことを考え出しました通知を無効にした汎用連絡先。

おっと:

関連する問題