graylogのアラートメールにhost addrやdest addrを乗せる

■ graylogのアラートメールにhost addrやdest addrを乗せる
graylogのアラートメールにfull messageを乗せる

□ backlog massage
https://community.graylog.org/t/problem-with-create-alerts/2411
Alerts→Manage conditions→メール送信用conditionを選択→condition detailsの「edit」を選択
「Message Backlog」を0以外に設定する(1で良い。設定した数だけmessageが出力される)
f:id:Saw84:20181206164605p:plain

□ メール本文の設定方法
##########
Alert Description: ${check_result.resultDescription}
Date: ${check_result.triggeredAt}
Stream ID: ${stream.id}
Stream title: ${stream.title}
Stream description: ${stream.description}
Alert Condition Title: ${alertCondition.title}
${if stream_url}Stream URL: ${stream_url}${end}

Triggered condition: ${check_result.triggeredCondition}
##########

${if backlog}Last messages accounting for this alert:
${foreach backlog message}${message}
Src_addr: ${message.fields.src_addr}
Dst_addr: ${message.fields.dst_addr}
Full message: ${message.fields.full_message}

${end}${else}
${end}

${foreach backlog message}から${end}${else}…の間に、
${message.fields.フィールド名}を設置することで、application_nameやdst_portといった項目の値をメールに載せることができる。