Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logstash Input/Output #239

Closed
krainboltgreene opened this issue Jan 24, 2019 · 8 comments
Closed

Logstash Input/Output #239

krainboltgreene opened this issue Jan 24, 2019 · 8 comments

Comments

@krainboltgreene
Copy link

Hello, my services all use logstash and it would be fantastic if I could have loki ingest or receive data from logstash.

I've been told that loki receives an HTTP request, does anyone have the exact specification of this HTTP request?

@DanCech
Copy link
Contributor

DanCech commented Jan 24, 2019

Loki accepts application/json with a simple format outlined here https://github.com/grafana/loki/blob/master/docs/api.md#rest-api

@krainboltgreene
Copy link
Author

Fantastic, so it looks like I have transform @timestamp into ts, and the rest of my data into line?

Question 1: Is line a string or can it be a json structure?
Question 2: Is line required or can I just pass along the rest of my json?

@DanCech
Copy link
Contributor

DanCech commented Jan 24, 2019

  1. line is a string, you can pass multiple labels for each log stream, but the individual log lines are strings
  2. line is required, if you have multiple fields that are specific to the log line you'd want to encode them together into a string

@krainboltgreene
Copy link
Author

I see, so it looks like @timestamp -> ts and message -> line.

@DanCech
Copy link
Contributor

DanCech commented Jan 24, 2019

Absolutely, and labels would come from any fields that identify the log stream, host, syslog_facility, etc. Note that labels is a prometheus label string {label="value",...} which is then embedded in the json document.

@ytzelf
Copy link

ytzelf commented Apr 12, 2019

I see, so it looks like @timestamp -> ts and message -> line.

@krainboltgreene were you successful in using logstash's http output to route logs to Loki? If so, would you mind sharing your pipeline configuration? Thqnks a lot!

@ioanc
Copy link

ioanc commented May 29, 2019

@krainboltgreene were you able to send logs to Loki from logstash?
could you please share the pipeline configuration?
thank you

@krainboltgreene
Copy link
Author

No, and frankly I won't. I grossly overestimated my need for logstash. It's now a huge pain and I wish I hadn't picked it.

MichelHollands pushed a commit that referenced this issue Jan 16, 2023
**What this PR does / why we need it**:

The Changelog diff between the two commits is
grafana/dskit@3e308a4...7242706

```
* [CHANGE] Cache: Switch Memcached backend to use `github.com/grafana/gomemcache` repository instead of `github.com/bradfitz/gomemcache`. #248
* [ENHANCEMENT] Add cache, gate and stringsutil packages. #239
* [ENHANCEMENT] Cache: add Redis support. #245
* [ENHANCEMENT] Cache: Add the ability to use a custom memory allocator for cache results. #249
* [BUGFIX] Memberlist: fix crash when methods from `memberlist.Delegate` interface are called on `*memberlist.KV` before the service is fully started. #244
```

**Checklist**
- [x] Reviewed the [`CONTRIBUTING.md`](../CONTRIBUTING.md) guide
(**required**)
- N/A Documentation added
- N/A Tests updated
- N/A `CHANGELOG.md` updated
- N/A Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
jeschkies pushed a commit to jeschkies/loki that referenced this issue Jan 18, 2023
**What this PR does / why we need it**:

The Changelog diff between the two commits is
grafana/dskit@3e308a4...7242706

```
* [CHANGE] Cache: Switch Memcached backend to use `github.com/grafana/gomemcache` repository instead of `github.com/bradfitz/gomemcache`. grafana#248
* [ENHANCEMENT] Add cache, gate and stringsutil packages. grafana#239
* [ENHANCEMENT] Cache: add Redis support. grafana#245
* [ENHANCEMENT] Cache: Add the ability to use a custom memory allocator for cache results. grafana#249
* [BUGFIX] Memberlist: fix crash when methods from `memberlist.Delegate` interface are called on `*memberlist.KV` before the service is fully started. grafana#244
```

**Checklist**
- [x] Reviewed the [`CONTRIBUTING.md`](../CONTRIBUTING.md) guide
(**required**)
- N/A Documentation added
- N/A Tests updated
- N/A `CHANGELOG.md` updated
- N/A Changes that require user attention or interaction to upgrade are
documented in `docs/sources/upgrading/_index.md`
periklis added a commit to periklis/loki that referenced this issue Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants