Skip to content

[DOC]Doc clarifications and additions to url option #119

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

Merged
merged 7 commits into from
May 19, 2020
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 5.0.2
- [DOC]Expanded url option to include Manticore keys [#119](https://github.com/logstash-plugins/logstash-input-http_poller/pull/119)

## 5.0.1
- Fixed minor doc and doc formatting issues [#107](https://github.com/logstash-plugins/logstash-input-http_poller/pull/107)

Expand All @@ -18,7 +21,7 @@
- Docs: Remove row in overview table to fix build error

## 4.0.2
- Don't bleed URLs credentials on startup and on exception #82
- Don't bleed URLs credentials on startup and on exception [#82](https://github.com/logstash-plugins/logstash-input-http_poller/pull/82)

## 4.0.1
- Fix some documentation issues
Expand Down
69 changes: 49 additions & 20 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ This plugin supports the following configuration options plus the <<plugins-{typ
[cols="<,<,<",options="header",]
|=======================================================================
|Setting |Input type|Required
| <<plugins-{type}s-{plugin}-user>> |<<string,string>>|no
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-automatic_retries>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-cacert>> |a valid filesystem path|No
| <<plugins-{type}s-{plugin}-client_cert>> |a valid filesystem path|No
Expand All @@ -109,6 +107,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-keystore_password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-keystore_type>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-metadata_target>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-pool_max>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-pool_max_per_route>> |<<number,number>>|No
| <<plugins-{type}s-{plugin}-proxy>> |<<,>>|No
Expand All @@ -121,6 +120,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
| <<plugins-{type}s-{plugin}-truststore_password>> |<<password,password>>|No
| <<plugins-{type}s-{plugin}-truststore_type>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-urls>> |<<hash,hash>>|Yes
| <<plugins-{type}s-{plugin}-user>> |<<string,string>>|No
| <<plugins-{type}s-{plugin}-validate_after_inactivity>> |<<number,number>>|No
|=======================================================================

Expand All @@ -129,23 +129,6 @@ input plugins.

&nbsp;

[id="plugins-{type}s-{plugin}-user"]
===== `user`

* Value type is <<string,string>>
* There is no default value for this setting.

Username to use with HTTP authentication for ALL requests. Note that you can also set this per-URL.
If you set this you must also set the `password` option.

[id="plugins-{type}s-{plugin}-password"]
===== `password`

* Value type is <<password,password>>
* There is no default value for this setting.

Password to be used in conjunction with the username for HTTP authentication.

[id="plugins-{type}s-{plugin}-automatic_retries"]
===== `automatic_retries`

Expand Down Expand Up @@ -249,6 +232,14 @@ If you'd like to work with the request/response metadata.
Set this value to the name of the field you'd like to store a nested
hash of metadata.

[id="plugins-{type}s-{plugin}-password"]
===== `password`

* Value type is <<password,password>>
* There is no default value for this setting.

Password to be used in conjunction with the username for HTTP authentication.

[id="plugins-{type}s-{plugin}-pool_max"]
===== `pool_max`

Expand Down Expand Up @@ -357,7 +348,45 @@ Specify the truststore type here. One of `JKS` or `PKCS12`. Default is `JKS`
* There is no default value for this setting.

A Hash of urls in this format : `"name" => "url"`.
The name and the url will be passed in the outputed event
The name and the url will be passed in the outputted event.

The values in urls can be either:

* a string url (which will be issued as an HTTP GET).
* a sub-hash containing many useful keys provided by the Manticore backend:
** url: the String url
** method: (optional) the HTTP method to use (defaults to GET)
** user: (optional) the HTTP Basic Auth user. The user must be under
an auth sub-hash for Manticore, but this plugin also accepts it either way.
** password: (optional) the HTTP Basic Auth password. The password
must be under an auth sub-hash for Manticore, but this plugin accepts it either way.
** headers: a hash containing key-value pairs of headers.
** body: a string (supported only on POST and PUT requests)
** possibly other options mentioned in the
https://www.rubydoc.info/github/cheald/manticore/Manticore/Client#http-instance_method[Manticore docs].
Note that Manticore options that are not explicitly documented above are not
thoroughly tested and therefore liable to break in unexpected ways if we
replace the backend.

*Notes:*

* Passwords specified in this way are prone to exposure in plugin log output.
The plugin does not declare them as passwords, and therefore doesn't wrap them in
leak-reducing wrappers as we do elsewhere.
* We don't guarantee that boolean-type options like follow_redirects are supported
correctly. The strings `true` or `false` may get passed through, and in ruby any
string is "truthy."
* Our implementation of this plugin precludes the ability to specify auth[:eager]
as anything other than true

[id="plugins-{type}s-{plugin}-user"]
===== `user`

* Value type is <<string,string>>
* There is no default value for this setting.

Username to use with HTTP authentication for ALL requests. Note that you can also set this per-URL.
If you set this you must also set the `password` option.

[id="plugins-{type}s-{plugin}-validate_after_inactivity"]
===== `validate_after_inactivity`
Expand Down
2 changes: 1 addition & 1 deletion logstash-input-http_poller.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'logstash-input-http_poller'
s.version = '5.0.1'
s.version = '5.0.2'
s.licenses = ['Apache License (2.0)']
s.summary = "Decodes the output of an HTTP API into events"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down