Splunk
Instana 支援將日誌與 Splunk整合。 啟用整合之後,您可以從 Instana 使用者介面重新導向至 Splunk 使用者介面,以檢視儲存在 Splunk中的日誌。 此整合可啟用 Instana 與 Splunk之間的流動工作流程。
您也可以透過在 Splunk中建立 Splunk 警示通道或檢視 Instana 應用程式及服務度量值,即時將警示通知傳送至 Splunk 。
從 Splunk
配置 Instana
若要將日誌與 Splunk整合,您需要遵循下列步驟來配置 Instana:
在 Instana 使用者介面中按一下 設定 > 日誌管理 > Splunk 。

依預設,不會啟用 Splunk 日誌管理。 若要啟用 Splunk 日誌整合,請將切換設為顯示
Splunk link on Hosts, Container and Pods。輸入下列資訊:
- 在 Splunk 實例 欄位中,輸入儲存日誌之已部署實例的 URL 或 IP 位址 (包括埠號)。
- 在 索引 欄位中,輸入您在 Splunk 平台中配置的索引名稱。 這是選用參數。
從 Instana 使用者介面存取 Splunk
若要存取 Splunk,請按一下位於每一個儀表板左上方的 Splunk:
- Kubernetes:
- 主機
- Pod
- Docker 儲存器
- 主機
- Docker 儲存器

如果整合多個日誌提供者,請按一下 跳至日誌 > Splunk。

從 Splunk 存取 Instana
使用下列任一選項,從 Splunk 日誌中啟用存取 Instana 相關實體 (例如主機及容器度量值):
配置現有 Splunk 儀表板。 將
_raw欄位新增至畫面的查詢,並將drilldown新增至panel區段。<drilldown> <link target="_blank">https://<ENVIRONMENT_URL_HERE>/#/integration/landing;config=$row._raw$</link> </drilldown>建立儀表板。 移至 Splunk中的 儀表板 區段。 按一下 建立新的儀表板,輸入名稱,然後按一下 儲存。 按一下 編輯儀表板,選取 來源,然後貼上下列內容:
<form theme="light"> <label>Instana</label> <fieldset submitButton="false" autoRun="true"> <input type="time" token="myTime" searchWhenChanged="true"> <label></label> <default> <earliest>-1@h</earliest> <latest>now</latest> </default> </input> </fieldset> <row> <panel> <title>Events</title> <table> <search> <query>sourcetype = * | table host docker.container_id kubernetes.pod_name _raw </query> <earliest>$myTime.earliest$</earliest> <latest>$myTime.latest$</latest> </search> <option name="count">15</option> <option name="drilldown">row</option> <option name="refresh.display">progressbar</option> <option name="rowNumbers">false</option> <option name="totalsRow">true</option> <option name="wrap">false</option> <fields>["host","docker.container_id","kubernetes.pod_name","_raw"]</fields> <drilldown> <link target="_blank">https://<ENVIRONMENT_URL_HERE>/#/integration/landing;config=$row._raw$</link> </drilldown> </table> </panel> </row> </form>
建立 Splunk 警示通道
若要即時將警示通知從 Instana 傳送至 Splunk ,請從 Splunkbase安裝附加程式及應用程式,然後建立 Splunk 警示通道。
若要建立 Splunk 警示通道,請按一下 設定 > 團隊設定 > 事件與警示 > 警示通道 > 新增警示通道。

下列 Splunk 事件會作為 HTTP POST 接收至已配置的 URL (HTTP 或 HTTP) ,警示將傳送至其中的位址。
請參閱下列範例:
在未解決的問題或發生事件上
{
"issue": {
"id": "53650436-8e35-49a3-a610-56b442ae7620",
"type": "issue",
"state": "OPEN",
"start": 1460537793322,
"severity": 5,
"text": "Garbage Collection Activity High (11%)",
"suggestion": "Tune your Garbage Collector, reduce allocation rate through code changes",
"link": "https://XXXXXXX/#/?snapshotId=rjhkZXdNzegliVVEswMScGNn0YY",
"zone": "prod",
"fqdn": "host1.demo.com",
"entity": "jvm",
"entityLabel": "Test jvm",
"tags": "production, documents, elasticsearch",
"container": "test-container"
}
}
在關閉問題或發生事件時
{
"issue": {
"id": "6596e1c9-d6e4-4a8e-85fd-432432eddac3",
"state": "CLOSED",
"end": 1460537777478
}
}
離線、線上或變更事件時
{
"issue": {
"id": "53650436-8e35-49a3-a610-56b442ae7620",
"type": "presence",
"start": 1460537793322,
"text": "online",
"description": "Java virtual machine on Host host1.demo.com",
"link": "https://XXXXXXX/#/?snapshotId=rjhkZXdNzegliVVEswMScGNn0YY",
"zone": "prod",
"fqdn": "host1.demo.com",
"entity": "jvm",
"entityLabel": "Test jvm",
"tags": "production, documents, elasticsearch",
"container": "test-container"
}
}