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
This readme will be displayed on the plugin page on the marketplace.
Hence, I'm removing most of the unrelated technical information.
And adding more information on how to use the plugin instead.
The VictoriaLogs Grafana plugin is a datasource plugin that enables Grafana to query, visualize,
3
-
and interact with log data stored in VictoriaLogs, a high-performance log storage
4
-
and processing system.
2
+
3
+
The VictoriaLogs Grafana plugin allows Grafana to query, visualize,
4
+
and interact with [VictoriaLogs](https://docs.victoriametrics.com/victorialogs),
5
+
a high-performance log storage and processing system.
6
+
7
+

5
8
6
9
## Capabilities
7
10
8
-
1. Query Logs with Grafana.
9
-
1. Use the plugin to fetch logs stored in VictoriaLogs and display them in Grafana dashboards by
10
-
querying using the VictoriaLogs Query Language ([LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/)).
11
11
1. Use [LogsQL](https://docs.victoriametrics.com/victorialogs/logsql/) to filter, aggregate, and transform logs data to gain insights into application behavior.
If using `grafana-operator`, adjust `config` section in your `kind=Grafana` resource as below:
21
+
For detailed instructions on how to install the plugin on Grafana Cloud or locally, please checkout the [Plugin installation docs](https://grafana.com/docs/grafana/latest/plugins/installation/).
For detailed instructions on how to install the plugin in Grafana Cloud or locally,
34
-
please checkout the [Plugin installation docs](https://grafana.com/docs/grafana/latest/plugins/installation/).
25
+
Once the plugin is installed on your Grafana instance, follow [these instructions](https://grafana.com/docs/grafana/latest/datasources/add-a-data-source/)
26
+
to add a new VictoriaLogs data source, and enter configuration options.
35
27
36
-
### Grafana Provisioning
28
+
### Configuration via file
37
29
38
30
Provisioning of Grafana plugin requires creating [datasource config file](http://docs.grafana.org/administration/provisioning/#datasources):
39
31
@@ -56,243 +48,48 @@ datasources:
56
48
isDefault: true
57
49
```
58
50
59
-
Please find the example of provisioning Grafana instance with VictoriaLogs datasource below:
60
-
61
-
1. Create a file at `./provisioning/datasources/vm.yml` with datasource example file.
62
-
63
-
1. Define Grafana installation via docker-compose:
tar -xf /var/lib/grafana/plugins/vl-plugin.tar.gz -C /var/lib/grafana/plugins/
130
-
rm /var/lib/grafana/plugins/vl-plugin.tar.gz
131
-
volumeMounts:
132
-
# For grafana-operator users, change `name: storage` to `name: grafana-data`
133
-
- name: storage
134
-
mountPath: /var/lib/grafana
135
-
```
136
-
137
-
For `grafana-operator` users, the above configuration should be done for the part `/spec/deployment/spec/template/spec/initContainers` of your `kind=Grafana` resource.
138
-
139
-
This example uses init container to download and install plugin. To allow Grafana using this container as a sidecar set the following config:
140
-
141
-
```yaml
142
-
sidecar:
143
-
datasources:
144
-
initDatasources: true
145
-
enabled: true
146
-
```
147
-
148
-
See more about chart settings [here](https://github.com/grafana/helm-charts/blob/541d97051de87a309362e02d08741ffc868cfcd6/charts/grafana/values.yaml)
149
-
150
-
Option 4. would be to build custom Grafana image with plugin based on same installation instructions.
151
-
152
-
#### Grafana operator
153
-
154
-
Example with Grafana [operator](https://github.com/grafana-operator/grafana-operator):
155
-
156
-
```yaml
157
-
apiVersion: grafana.integreatly.org/v1beta1
158
-
kind: Grafana
159
-
metadata:
160
-
name: grafana-vm
161
-
spec:
162
-
persistentVolumeClaim:
163
-
spec:
164
-
accessModes:
165
-
- ReadWriteOnce
166
-
resources:
167
-
requests:
168
-
storage: 200Mi
169
-
deployment:
170
-
spec:
171
-
template:
172
-
spec:
173
-
initContainers:
174
-
- name: "load-vm-ds-plugin"
175
-
image: "curlimages/curl:7.85.0"
176
-
command: [ "/bin/sh" ]
177
-
workingDir: "/var/lib/grafana"
178
-
securityContext:
179
-
runAsUser: 472
180
-
runAsNonRoot: true
181
-
runAsGroup: 472
182
-
args:
183
-
- "-c"
184
-
- |
185
-
set -ex
186
-
mkdir -p /var/lib/grafana/plugins/
187
-
ver=$(curl -s https://api.github.com/repos/VictoriaMetrics/victorialogs-datasource/releases/latest | grep -oE 'v[0-9]+\.[0-9]+\.[0-9]+' | head -1)
1. Go to [releases page](https://github.com/VictoriaMetrics/victorialogs-datasource/releases) once pipeline is finished and verify release with the name `TAG` has been created and has all the needed binaries and checksums attached.
85
+
For using [Table panel](https://grafana.com/docs/grafana/latest/panels-visualizations/visualizations/table/)
86
+
switch to `Raw Logs` query type:
290
87
291
-
## Notes
88
+

292
89
293
-
In the `plugin.json` file of our plugin, the `metrics` field is set to `true`. This is not to support metric queries in the classical sense but to ensure our plugin can be selected in the Grafana panel editor.
90
+
And apply `Transformations` by labels:
294
91
295
-
For more information on the fields in `plugin.json`, please refer to the [Grafana documentation](https://grafana.com/developers/plugin-tools/reference-plugin-json#properties).
0 commit comments