Conversation
filebeat/prospector/redis/config.go
Outdated
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported type Config should have comment or be unexported
filebeat/prospector/redis/doc.go
Outdated
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
package comment should be of the form "Package redis ..."
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported type Harvester should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Harvester.Start should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported type Prospector should be of the form "Prospector ..." (with optional leading article)
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported function NewProspector should be of the form "NewProspector ..."
filebeat/_meta/common.full.p2.yml
Outdated
There was a problem hiding this comment.
I suggest somehow making it more clear that this is strictly about slow logs. People might assume that it's a general Redis input.
There was a problem hiding this comment.
That is a tricky one. Thinking more about the prospectors I get the impression we will have prospector with multiple harvester types potentially (similar to what we have in metricbeat). For example in file there could be file.csv or file.xml. What if we not only have slowlog for redis? But TBH I'm not sure yet what we should do here. This could also well be overengineered and we will not need it.
For the moment I think I fix the above with call it Redis slowlog prospector in the docs but still redis as the prospector type.
filebeat/prospector/redis/doc.go
Outdated
There was a problem hiding this comment.
I'd use 2s or 5s as an example. 100 micros might affect the Redis performance, so we should be careful.
filebeat/prospector/redis/doc.go
Outdated
There was a problem hiding this comment.
small typo: "it can be configured"
There was a problem hiding this comment.
Hmm, good question. In the end it needs to be the event timestamp, but I see two options:
- live it like that here, but replace it in the FB redis module
- already set it hear and also set
beat.read_timestamp
There was a problem hiding this comment.
I decided for option 2 for the moment. The reasons is that I think it most cases that is what people expect in @timestamp here. So also without postprocessing in ingest, the data is already correct.
There was a problem hiding this comment.
I guess people can use drop_fields if they don't want it.
456e2e0 to
9ba6162
Compare
filebeat/harvester/forwarder.go
Outdated
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported method Forwarder.Forward should be of the form "Forward ..."
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported type Harvester should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported function NewHarvester should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Harvester.Start should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Harvester.Stop should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Harvester.ID should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Prospector.Stop should have comment or be unexported
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
exported method Prospector.Wait should have comment or be unexported
4a55634 to
36be381
Compare
|
@tsg Ready for an other look. I think we are at the point now where we have to decide on what to do with it :-) |
filebeat/harvester/util.go
Outdated
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported var ValidType should be of the form "ValidType ..."
There was a problem hiding this comment.
[golint] reported by reviewdog 🐶
comment on exported method Harvester.Run should be of the form "Run ..."
e021c74 to
8a8caba
Compare
|
@dedemorton So far I only added the minimial options of docs for this = almost nothing. The reason is that this kind of challenges our existing doc structure we have for prospectors. So far the 2 prospectors shared 95% of the config options. With this change, they can be very different. I'm thinking if we should start to organise docs similar to what we do with the modules and have a block for each prospector type. I will need your help here and suggest we will only tackle this after merging the PR. |
|
@ruflin I remember you mentioned this problem awhile back ago in an email, but I haven't had a chance to follow up with you. What release are we targeting for this PR? |
|
@dedemorton Not sure if I mentioned that before (but could be). It's not urgent. If it happens, somewhere around 6.0 |
filebeat/filebeat.full.yml
Outdated
This PR adds a new prospector type which reads the slowlog from redis. This slowlog is not in a file but in memory in redis. Because of this filebeat connects to redis and reads out the slowlog. It is important to note that the slow log size is limited in redis that is why after fetching the events from the slowlog filebeat resets the slow log.
Example event looks as following:
```
{
"@timestamp": "2017-05-16T06:27:17.000Z",
"beat": {
"hostname": "ruflin",
"name": "ruflin",
"read_timestamp": "2017-05-16T06:27:19.275Z",
"version": "6.0.0-alpha2"
},
"message": "SET hello world",
"redis": {
"slowlog": {
"args": [
"world"
],
"cmd": "SET",
"duration": {
"us": 11
},
"id": 38,
"key": "hello"
}
}
}
```
All args are combined in the "message" field output for easy retrieval.
|
@tsg New version pushed |
This PR adds a new prospector type which reads the slowlog from redis. This slowlog is not in a file but in memory in redis. Because of this filebeat connects to redis and reads out the slowlog. It is important to note that the slow log size is limited in redis that is why after fetching the events from the slowlog filebeat resets the slow log.
Example event looks as following:
All args are combined in the "message" field output for easy retrieval.