Commit graph

13 commits

Author SHA1 Message Date
Aliaksandr Valialkin
2086c0885d
deployment: update VictoriaLogs Docker image tag from from v0.2.0-victorialogs to v0.3.0-victorialogs 2023-07-20 20:58:41 -07:00
Aliaksandr Valialkin
f548adce0b
app/vlinsert/loki: follow-up after 09df5b66fd
- Parse protobuf if Content-Type isn't set to `application/json` - this behavior is documented at https://grafana.com/docs/loki/latest/api/#push-log-entries-to-loki

- Properly handle gzip'ped JSON requests. The `gzip` header must be read from `Content-Encoding` instead of `Content-Type` header

- Properly flush all the parsed logs with the explicit call to vlstorage.MustAddRows() at the end of query handler

- Check JSON field types more strictly.

- Allow parsing Loki timestamp as floating-point number. Such a timestamp can be generated by some clients,
  which store timestamps in float64 instead of int64.

- Optimize parsing of Loki labels in Prometheus text exposition format.

- Simplify tests.

- Remove lib/slicesutil, since there are no more users for it.

- Update docs with missing info and fix various typos. For example, it should be enough to have `instance` and `job` labels
  as stream fields in most Loki setups.

- Allow empty of missing timestamps in the ingested logs.
  The current timestamp at VictoriaLogs side is then used for the ingested logs.
  This simplifies debugging and testing of the provided HTTP-based data ingestion APIs.

The remaining MAJOR issue, which needs to be addressed: victoria-logs binary size increased from 13MB to 22MB
after adding support for Loki data ingestion protocol at https://github.com/VictoriaMetrics/VictoriaMetrics/pull/4482 .
This is because of shitty protobuf dependencies. They must be replaced with another protobuf implementation
similar to the one used at lib/prompb or lib/prompbmarshal .
2023-07-20 16:48:21 -07:00
Zakhar Bessarab
09df5b66fd
app/vlinsert: add support of loki push protocol (#4482)
* app/vlinsert: add support of loki push protocol

- implemented loki push protocol for both Protobuf and JSON formats
- added examples in documentation
- added example docker-compose

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vlinsert: move protobuf metric into its own file

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* deployment/docker/victorialogs/promtail: update reference to docker image

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* deployment/docker/victorialogs/promtail: make volume name unique

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vlinsert/loki: add license reference

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* deployment/docker/victorialogs/promtail: fix volume name

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* docs/VictoriaLogs/data-ingestion: add stream fields for loki JSON ingestion example

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vlinsert/loki: move entities to places where those are used

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vlinsert/loki: refactor to use common components

- use CommonParameters from insertutils
- stop ingestion after first error similar to elasticsearch and jsonline

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

* app/vlinsert/loki: address review feedback

- add missing logstorage.PutLogRows calls
- refactor tenant ID parsing to use common function
- reduce number of allocations for parsing by reusing  logfields slices
- add tests and benchmarks for requests processing funcs

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>

---------

Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
2023-07-20 10:10:55 +02:00
Aliaksandr Valialkin
920cc26793
all: use the new release for VictoriaLogs - v0.2.0-victorialogs 2023-07-17 23:19:46 -07:00
Artem Navoiev
d1925d6a1c
fix jsonline endpoint in docs
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-22 08:48:11 +02:00
Artem Navoiev
345c7b0bc7 fix link vmui links in docker examples after the path chnage for vmui
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 23:21:04 -07:00
Artem Navoiev
b488399952 add information about how to access web UI
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 11:19:16 -07:00
Artem Navoiev
e87c38c5d3 use latest image in example for VictoriaLogs and VictoriaMetrics to simplify the flow
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 05:17:30 -07:00
Alexander Marshalov
cb383f546a improved vector example for victoria logs
Signed-off-by: Alexander Marshalov <_@marshalov.org>
2023-06-21 03:59:31 -07:00
Artem Navoiev
678c2cd0a1 remove grafana notion from vector readme
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 03:59:31 -07:00
Artem Navoiev
b43152f1ce examples add README
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 03:59:31 -07:00
Artem Navoiev
bc6427a44f remove docker from filebeat syslog
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 03:59:31 -07:00
Artem Navoiev
b024e46284 Add docker compose examples: filebeat(docker, syslog), fluentbit(docker), logstash, vector(docker)
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
2023-06-21 03:59:31 -07:00