observability
Axiom
Connect your Axiom organization to let agents run APL queries, monitor alert statuses, and explore your datasets. Agents can analyze your telemetry data to help troubleshoot issues and understand system performance.
連接
從終端機連接Axiom。傳入--help可查看Axiom接受的旗標。
Terminal
polylane integration connect --type axiom範圍限於你想讓代理查詢的資料集的API權杖。
連接Axiom,讓代理可以用APL(Axiom Processing Language)查詢你的日誌與事件資料。
設定
- 在Axiom → Organization Settings中找到你的區域(US是
api.axiom.co,EU是api.eu1.axiom.co)。 - 在Axiom中前往Settings → API Tokens並建立一個新權杖。
- 授予該權杖對你想讓代理查詢的資料集的讀取存取。
- 把權杖貼到Polylane。Polylane驗證它並完成連接。
你的權杖在儲存前會先加密,代理永遠看不到它。
連接會建立一個名為polylane的自訂webhook通知器並把它加到每個監控器,所以監控器警示會落到Polylane並在觸發時被分流。
代理能做什麼
- 跨你的資料集執行APL查詢
- 探索資料集的結構描述與欄位
- 在調查期間監看警示狀態
中斷連接
在Polylane中斷Axiom的連接,然後在Axiom中撤銷該API權杖。中斷連接會從你的監控器中移除polylane通知器,所以請同時從Terraform設定中拿掉它。
把Axiom的警示與你以Terraform管理的資源一起註冊到Polylane。
一個週期性同步會把polylane通知器加到每個監控器,所以以Terraform管理的監控器在該通知器id也進入其Terraform設定之前會顯示漂移。在Axiom的Monitors → Notifiers底下(名為polylane的通知器)或透過Axiom API的GET /v2/notifiers找到該id,然後把它加到每個監控器:
resource "axiom_monitor" "example" {
# ...
notifier_ids = concat(var.notifier_ids, [var.polylane_notifier_id])
}
中斷整合的連接會從你的監控器中移除polylane通知器,所以請同時從Terraform設定中拿掉它。
中斷連接
中斷連接會停止所有同步與檢查,並刪除Polylane持有的憑證。 Polylane在Axiom中建立的一切也會一併移除;不會留下任何東西。
Terminal
polylane integration disconnect <id>工具
9代理可以在對話串中執行的操作。
Api
Call any Axiom REST endpoint that lacks a dedicated tool
Queries
Run an Axiom query (APL for logs/traces/events, MPL for metrics)
Datasets
Read Axiom datasets and their fields
Dashboards
Read or create Axiom dashboards
Monitors
Read or create Axiom monitors
Views
Read or create Axiom saved views
Annotations
List or create Axiom annotations
Virtual Fields
List or create Axiom virtual fields
List Notifiers
List alert notifiers in Axiom