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
+71-76Lines changed: 71 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,30 +15,7 @@ In this guide, you will learn how to:
15
15
- Query logs using Grafana.
16
16
17
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
-

18
+
So we introduce Alloy, which has been officially suggested by Grafana Labs as the new agent to collect Kubernetes logs and forward them to Loki.
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/).
112
87
113
-
### Create Alloy Configuration
114
-
#### 1. Using host volumes of kubernetes worker node
115
-
`alloy.yaml`:
88
+
We will show you Alloy [Configuration](https://grafana.com/docs/alloy/latest/configure/).
89
+
90
+
### 1. Create Alloy Configuration
91
+
92
+
We will use the following `alloy.yaml` to collect logs of all Kubernetes pods & send them to Loki via loki-gateway:
0 commit comments