您可以為在 Windows 上執行的 vRealize Log Insight 代理程式設定或變更目標 vRealize Log Insight 伺服器。您最多可將記錄事件傳送至三個目的地,並篩選每個目的地的輸出。
預設目的地可透過 liagent.ini 檔案的 [server] 區段來設定。預設目的地一律存在,且依預設會將主機名稱設為 loginsight。若要新增多個目標目的地,請為每個目標建立一個 [server|<dest_id>] 區段。您必須指定唯一的主機名稱,做為每個其他連線的目的地識別碼。您可以針對預設的 [server] 區段將相同選項用於其他目的地。請不要為自動升級設定其他目的地,或將這些目的地用於代理程式設定。您可以指定兩個額外目的地。
依預設,代理程式會將所有收集的記錄傳送至所有目的地。您可以使用 file 選項來篩選記錄,以將不同的記錄傳送至不同的目的地。如需詳細資訊,請參閱篩選來自 vRealize Log Insight 代理程式的記錄事件。
必要條件
- 登入已安裝 vRealize Log Insight Windows 代理程式的 Windows 機器,然後啟動服務管理員以確認 vRealize Log Insight 代理程式服務已安裝。
- 如果您的 vRealize Log Insight 叢集已啟用整合式負載平衡器,請參閱啟用整合式負載平衡器,以了解自訂 SSL 憑證的特定需求。
程序
範例
下列組態範例會設定使用受信任憑證授權機構的目標
vRealize Log Insight 伺服器。
[server] proto=cfapi hostname=LOGINSIGHT port=9543 ssl=yes; ssl_ca_path=/etc/pki/tls/certs/ca.pem
下列範例說明包含每個目的地之篩選訊息的多目的地組態。
; The first (default) destination receives all collected events.
[server]
hostname=prod1.licf.vmware.com
; The second destination receives just syslog events through the plain syslog protocol.
[server|syslog-audit]
hostname=third_party_audit_management.eng.vmware.com
proto=syslog
ssl=no
filter={filelog; syslog; }
; The third destination receives vRealize Operations events if they have the level field equal to "error" or "warning"
; and they are collected by sections whose name begins with "vrops-"
[server|licf-prod1]
hostname=vrops-errors.licf.vmware.com
filter={; vrops-.*; level == "error" || level == "warning"}
; Collecting syslog messages.
[filelog|syslog]
directory=/var/log
include=messages
; various vROPs logs. Note that all section names begin with a "vrops-" prefix, which is used in third destination filter.
[filelog|vrops-ANALYTICS-analytics]
directory=/data/vcops/log
include=analytics*.log*
exclude=analytics*-gc.log*
parser=auto
[filelog|vrops-COLLECTOR-collector]
directory=/data/vcops/log
include=collector.log*
event_marker=^\d{4}-\d{2}-\d{2}[\s]\d{2}:\d{2}:\d{2}\,\d{3}
parser=auto
[filelog|vrops-COLLECTOR-collector_wrapper]
directory=/data/vcops/log
include=collector-wrapper.log*
event_marker=^\d{4}-\d{2}-\d{2} [\s]\d{2}:\d{2}:\d{2}\.\d{3}
parser=auto
下一步
您可以針對 vRealize Log Insight 代理程式設定其他 SSL 選項。請參閱設定伺服器與 Log Insight 代理程式之間的 SSL 連線。