Skip to content

Commit

Permalink
Document username/password options for HTTP based modules (elastic#7134)
Browse files Browse the repository at this point in the history
This adds commented out `username` and `password` settings to most
of the config places where they are supported (this part is manual).
Since those configs are included in the docs, they also show up there.

This also adds a line in the docs that link to "HTTP specific settings"
(this part is automatised during `make update`).

Completes elastic#4268 and closes elastic#6493.
  • Loading branch information
tsg authored and exekias committed May 23, 2018
1 parent 85510a7 commit 0a85fce
Show file tree
Hide file tree
Showing 47 changed files with 104 additions and 20 deletions.
22 changes: 19 additions & 3 deletions metricbeat/docs/metricbeat-options.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ To see a list of enabled and disabled modules, run:
----

You can change the default module configurations by modifying the `.yml` files
in the `modules.d` directory.
in the `modules.d` directory.

The following example shows a basic configuration for the Apache module:

Expand Down Expand Up @@ -73,7 +73,7 @@ requires the `modules.d` layout.

To enable specific modules and metricsets in the +{beatname_lc}.yml+ config
file, you can add entries to the +{beatname_lc}.modules+ list. Each entry in the
list begins with a dash (-) and is followed by settings for that module.
list begins with a dash (-) and is followed by settings for that module.

The following example shows a configuration where the apache and mysql modules
are enabled:
Expand Down Expand Up @@ -118,7 +118,7 @@ metricbeat.modules:
== Configuration combinations

You can specify a module configuration that uses different combinations of
metricsets, periods, and hosts.
metricsets, periods, and hosts.

For a module with multiple metricsets defined, it's possible to define the
module twice and specify a different period to use for each metricset. For the
Expand Down Expand Up @@ -200,3 +200,19 @@ A list of processors to apply to the data generated by the metricset.
See <<filtering-and-enhancing-data>> for information about specifying
processors in your config.

[float]
[[module-http-config-options]]
=== Standard HTTP config options

The modules and metricsets for which the host is defined as a HTTP URL, also
support the following options:

[float]
==== `username`

The username to use for basic authentication.

[float]
==== `password`

The password to use for basic authentication.
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/apache.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ metricbeat.modules:
#password: password
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/ceph.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metricbeat.modules:
enabled: true
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/couchbase.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metricbeat.modules:
enabled: true
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/dropwizard.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ metricbeat.modules:
enabled: true
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/elasticsearch.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ metricbeat.modules:
hosts: ["localhost:9200"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/etcd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ metricbeat.modules:
hosts: ["localhost:2379"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/golang.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ metricbeat.modules:
path: "/debug/vars"
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
4 changes: 3 additions & 1 deletion metricbeat/docs/modules/http.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ metricbeat.modules:
path: "/"
#body: ""
#method: "GET"
#username: "user"
#password: "secret"
#request.enabled: false
#response.enabled: false
#json.is_array: false
Expand All @@ -52,7 +54,7 @@ metricbeat.modules:
# key: "value"
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
4 changes: 3 additions & 1 deletion metricbeat/docs/modules/jolokia.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ metricbeat.modules:
hosts: ["localhost"]
namespace: "metrics"
#path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
#username: "user"
#password: "secret"
jmx.mappings:
#- mbean: 'java.lang:type=Runtime'
# attributes:
Expand All @@ -47,7 +49,7 @@ metricbeat.modules:
jmx.instance:
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/kibana.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metricbeat.modules:
enabled: default
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/kubernetes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ metricbeat.modules:
hosts: ["https://${KUBERNETES_SERVICE_HOST}:${KUBERNETES_SERVICE_PORT}"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/logstash.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metricbeat.modules:
hosts: ["localhost:9600"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/nginx.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ metricbeat.modules:
server_status_path: "server-status"
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/php_fpm.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ metricbeat.modules:
hosts: ["localhost:8080"]
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/prometheus.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ metricbeat.modules:
#namespace: example
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/rabbitmq.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ metricbeat.modules:
#password: guest
----

This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>.
This module supports TLS connection when using `ssl` config field, as described in <<configuration-ssl>>. It also supports the options described in <<module-http-config-options>>.

[float]
=== Metricsets
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ metricbeat.modules:
path: "/"
#body: ""
#method: "GET"
#username: "user"
#password: "secret"
#request.enabled: false
#response.enabled: false
#json.is_array: false
Expand All @@ -287,6 +289,8 @@ metricbeat.modules:
hosts: ["localhost"]
namespace: "metrics"
#path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
#username: "user"
#password: "secret"
jmx.mappings:
#- mbean: 'java.lang:type=Runtime'
# attributes:
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/apache/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# - status
period: 10s
hosts: ["http://127.0.0.1"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/ceph/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# - monitor_health
period: 10s
hosts: ["localhost:5000"]
#username: "user"
#password: "secret"

- module: ceph
#metricsets:
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/couchbase/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
# - node
period: 10s
hosts: ["localhost:8091"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/dropwizard/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
hosts: ["localhost:8080"]
metrics_path: /metrics/metrics
namespace: example
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/elasticsearch/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
# - node_stats
period: 10s
hosts: ["localhost:9200"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/etcd/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
# - store
period: 10s
hosts: ["localhost:2379"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/http/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
path: "/"
#body: ""
#method: "GET"
#username: "user"
#password: "secret"
#request.enabled: false
#response.enabled: false
#json.is_array: false
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/jolokia/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
hosts: ["localhost"]
namespace: "metrics"
#path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
#username: "user"
#password: "secret"
jmx.mappings:
#- mbean: 'java.lang:type=Runtime'
# attributes:
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/kibana/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# - status
period: 10s
hosts: ["localhost:5601"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/kubernetes/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
#ssl.certificate: "/etc/pki/client/cert.pem"
#ssl.key: "/etc/pki/client/cert.key"
#username: "user"
#password: "secret"

# State metrics from kube-state-metrics service:
#- module: kubernetes
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/module/logstash/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
# - node_stats
period: 10s
hosts: ["localhost:9600"]
#username: "user"
#password: "secret"
3 changes: 3 additions & 0 deletions metricbeat/module/nginx/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@

# Path to server status. Default server-status
#server_status_path: "server-status"

#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/php_fpm/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@
period: 10s
hosts: ["localhost:8080"]
status_path: "/status"
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/module/prometheus/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
hosts: ["localhost:9090"]
metrics_path: /metrics
#namespace: example
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/apache.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
# - status
period: 10s
hosts: ["http://127.0.0.1"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/ceph.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# - monitor_health
period: 10s
hosts: ["localhost:5000"]
#username: "user"
#password: "secret"

- module: ceph
#metricsets:
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/modules.d/couchbase.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
# - node
period: 10s
hosts: ["localhost:8091"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/dropwizard.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
hosts: ["localhost:8080"]
metrics_path: /metrics/metrics
namespace: example
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/elasticsearch.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
# - node_stats
period: 10s
hosts: ["localhost:9200"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/etcd.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
# - store
period: 10s
hosts: ["localhost:2379"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/http.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
path: "/"
#body: ""
#method: "GET"
#username: "user"
#password: "secret"
#request.enabled: false
#response.enabled: false
#json.is_array: false
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/modules.d/jolokia.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
hosts: ["localhost"]
namespace: "metrics"
#path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
#username: "user"
#password: "secret"
jmx.mappings:
#- mbean: 'java.lang:type=Runtime'
# attributes:
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/modules.d/kibana.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
# - status
period: 10s
hosts: ["localhost:5601"]
#username: "user"
#password: "secret"
2 changes: 2 additions & 0 deletions metricbeat/modules.d/kubernetes.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
#ssl.certificate_authorities: ["/etc/pki/root/ca.pem"]
#ssl.certificate: "/etc/pki/client/cert.pem"
#ssl.key: "/etc/pki/client/cert.key"
#username: "user"
#password: "secret"

# State metrics from kube-state-metrics service:
#- module: kubernetes
Expand Down
Loading

0 comments on commit 0a85fce

Please sign in to comment.