You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: v2.6.x/site/en/adminGuide/monitor/configure_grafana_loki.md
+96-14Lines changed: 96 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,36 @@ This guide provides instructions on how to configure Loki to collect logs and Gr
10
10
11
11
In this guide, you will learn how to:
12
12
13
-
- Deploy [Loki](https://grafana.com/docs/loki/latest/get-started/overview/) and [Promtail](https://grafana.com/docs/loki/latest/send-data/promtail/) on a Milvus cluster using Helm.
13
+
- Deploy [Loki](https://grafana.com/docs/loki/latest/get-started/overview/) and [Alloy](https://grafana.com/docs/alloy/latest/) on a Milvus cluster using Helm.
14
14
- Configure object storage for Loki.
15
15
- Query logs using Grafana.
16
16
17
+
For reference, [Promtail](https://grafana.com/docs/loki/latest/send-data/promtail/#promtail-agent) will be deprecated.
18
+
So we instead introduce Alloy, which has been officially suggested by Grafana Labs as the new agent.
19
+
20
+
# Introduction
21
+
22
+
Before diving into how to build a logging system with Milvus, we’d like to first introduce the mechanisms of the logging system being used.
23
+
Broadly speaking, there are two main structures you can apply.
24
+
Please note that the mechanism to be introduced can be applied regardless of whether the [log functionality](https://milvus.io/docs/configure_log.md) in Milvus is enabled.
25
+
26
+
## 1. Using host volumes of kubernetes worker node
27
+
28
+
kubernetes worker nodes periodically write stream logs generated from pods scheduled on those nodes to a specific path in the node’s file system as files with a `.log` extension, we will leverage this feature.
29
+
Next, we will deploy Alloy, which acts as an agent, as a DaemonSet on the worker nodes.
30
+
This Alloy will share the path where the log files are stored on the worker nodes via a host volume.
31
+
As a result, the log files from the Milvus pods will be visible inside the Alloy pod, and Alloy will read these files and send them to Loki.
32
+
33
+

34
+
35
+
## 2. Using kubernetes API server
36
+
37
+
kubernetes API server is one of the control plane components. Alloy doesn't necessarily need to be deployed as a DaemonSet. It works well as a Deployment.
38
+
Instead, Alloy must request to kubernetes API server for fetching stream logs of milvus pods and get them.
39
+
Finally, Alloy will send the stream logs to Loki.
40
+
41
+

42
+
17
43
## Prerequisites
18
44
19
45
- You have [installed a Milvus cluster on K8s](install_cluster-helm.md).
Promtail is a log collection agent for Loki. It reads logs from Milvus pods and sends them to Loki.
108
+
## Deploy Alloy
85
109
86
-
### 1. Create Promtail Configuration
87
-
88
-
Create a `promtail.yaml` configuration file:
110
+
You can configure alloy and deploy alloy based on Helm chart. Refer to the official Alloy [documentation](https://grafana.com/docs/alloy/latest/set-up/install/) for more installation options.
111
+
We will show you Alloy [configuration](https://grafana.com/docs/alloy/latest/configure/).
89
112
113
+
### Create Alloy Configuration
114
+
#### 1. Using host volumes of kubernetes worker node
0 commit comments