-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Add Logstash input plugin (both version 5 and 6 support) #4910
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you move the logstash README
out of nginx_plus
related #2702 |
f57561c
to
da27a9b
Compare
@glinton, oops, fixed |
@danielnelson, Yes, this implementations is based upon the initial development by @lkmcs but is significantly refactored. |
1c2db81
to
1357892
Compare
Add the input plugin to fetch metrics from the Logstash HTTP endpoints. Both version 5 and 6 are supported. Fetching process, jvm, events and plugins metrics. Original developer: * https://github.com/lkmcs/telegraf Contributors: * https://github.com/arkady-emelyanov/telegraf * https://github.com/dmitryilyin/telegraf
@dmitryilyin Is there a timeline to get this merged? It would be nice to be able to get performance metrics from Logstash |
any news on that request? |
is there anything that is blocking this request? |
No, we will update as soon as we can, thanks for your patience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, here are a few changes I would make:
|
||
# Editor files | ||
*~ | ||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert changes to this file, but you can place these in your git core.excludesfile
:
[core]
excludesfile = ~/.gitignore
collect_queue_stats = true | ||
|
||
## HTTP method | ||
# method = "GET" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would a user need to change the method?
* Tags: | ||
- node_id | ||
- node_name | ||
- node_host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's rename node_host
to source
to match with #4413.
# headers = {"X-Special-Header" = "Special-Value"} | ||
|
||
## Override HTTP "Host" header | ||
# host_header = "logstash.example.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just a general purpose HTTP option mostly for proxies?
} | ||
accumulator.AddFields("logstash_events", flattener.Fields, tags) | ||
|
||
if logstash.CollectPluginsStats { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove the collect_plugin_stats
option because it isn't tied to an API call. Whenever we are collecting pipeline stats we will grab these, but it will still be possible to remove these metrics with the regular metric filtering (namedrop in this case).
} | ||
} | ||
|
||
if logstash.CollectQueueStats { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also remove the collect_queue_stats
option for the same reasons.
collect_jvm_stats = true | ||
|
||
## Should the event pipelines statistics be gathered | ||
collect_pipelines_stats = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As an API style preference, let's switch to a list of items to collect:
multi_pipeline = true
collect_metrics = ["pipelines", "process", "jvm"]
# headers = {"X-Special-Header" = "Special-Value"} | ||
|
||
## Override HTTP "Host" header | ||
# host_header = "logstash.example.com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the Host header must be set in a special way, let's allow the user to set it as a normal header. This will be similar to the http output:
for k, v := range h.Headers {
if strings.ToLower(k) == "host" {
req.Host = v
continue
}
req.Header.Set(k, v)
}
Will do a followup PR with the changes from my review. |
Add the input plugin to fetch metrics from the Logstash HTTP endpoints.
Both version 5 and 6 are supported.
Fetching process, jvm, events and plugins metrics.
Original developer:
Contributors: