Skip to content

Commit

Permalink
Use the new RequestsWrapper for connecting to services (#4058)
Browse files Browse the repository at this point in the history
  • Loading branch information
ofek authored Jul 8, 2019
1 parent b8f0a1c commit 05bd88d
Show file tree
Hide file tree
Showing 4 changed files with 189 additions and 153 deletions.
157 changes: 133 additions & 24 deletions spark/datadog_checks/spark/data/conf.yaml.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
init_config:

## @param proxy - object - optional
## Set HTTP or HTTPS proxies for all instances. Use the `no_proxy` list
## to specify hosts that must bypass proxies.
##
## The SOCKS protocol is also supported like so:
##
## socks5://user:pass@host:port
##
## Using the scheme `socks5` causes the DNS resolution to happen on the
## client, rather than on the proxy server. This is in line with `curl`,
## which uses the scheme to decide whether to do the DNS resolution on
## the client or proxy. If you want to resolve the domains on the proxy
## server, use `socks5h` as the scheme.
#
# proxy:
# http: http://<PROXY_SERVER_FOR_HTTP>:<PORT>
# https: https://<PROXY_SERVER_FOR_HTTPS>:<PORT>
# no_proxy:
# - <HOSTNAME_1>
# - <HOSTNAME_2>

## @param skip_proxy - boolean - optional - default: false
## If set to true, this makes the check bypass any proxy
## settings enabled and attempt to reach services directly.
#
# skip_proxy: false

instances:

## @param spark_url - string - required
Expand Down Expand Up @@ -56,6 +83,11 @@ instances:
#
# spark_proxy_enabled: false

## @param streaming_metrics - boolean - optional - default: true
## Enable collection of streaming statistics.
#
# streaming_metrics: true

## @param tags - list of key:value elements - optional
## List of tags to attach to every metric, event, and service check emitted by this Integration.
##
Expand All @@ -65,37 +97,56 @@ instances:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>

## @param username - string - optional
## If your service uses basic HTTP authentication, specify a username to be used in the check.
#
# username: <USERNAME>

## @param password - string - optional
## If your service uses basic HTTP authentication, specify a password to be used in the check.
#
# password: <PASSWORD>

## @param streaming_metrics - boolean - optional - default: true
## Enable collection of streaming statistics.
## @param proxy - object - optional
## This overrides the `proxy` setting in `init_config`.
##
## Set HTTP or HTTPS proxies. Use the `no_proxy` list
## to specify hosts that must bypass proxies.
##
## The SOCKS protocol is also supported like so:
##
## socks5://user:pass@host:port
##
## Using the scheme `socks5` causes the DNS resolution to happen on the
## client, rather than on the proxy server. This is in line with `curl`,
## which uses the scheme to decide whether to do the DNS resolution on
## the client or proxy. If you want to resolve the domains on the proxy
## server, use `socks5h` as the scheme.
#
# proxy:
# http: http://<PROXY_SERVER_FOR_HTTP>:<PORT>
# https: https://<PROXY_SERVER_FOR_HTTPS>:<PORT>
# no_proxy:
# - <HOSTNAME_1>
# - <HOSTNAME_2>

## @param skip_proxy - boolean - optional - default: false
## This overrides the `skip_proxy` setting in `init_config`.
##
## If set to true, this makes the check bypass any proxy
## settings enabled and attempt to reach services directly.
#
# streaming_metrics: true
# skip_proxy: false

## @param ssl_verify - boolean - optional - default: false
## Instruct the check to validate SSL certificates when connecting to `spark_url`.
## @param username - string - optional
## The username to use if services are behind basic auth.
#
# ssl_verify: false
# username: <USERNAME>

## @param ssl_cert - boolean - optional
## Path to the certificate file used to identify the connection to `spark_url`.
## @param ntlm_domain - string - optional
## If your services uses NTLM authentication, you can optionally
## specify a domain that will be used in the check. For NTLM Auth,
## append the username to domain, not as the `username` parameter.
## Example: example_ntlm_domain\example_username
#
# ssl_cert: <CERT_PEM_PATH>
# ntlm_domain: <DOMAIN>

## @param ssl_key - boolean - optional
## Path to the private keyfile used to identify the connection to `spark_url`.
## @param password - string - optional
## The password to use if services are behind basic or NTLM auth.
#
# ssl_key: <CERT_KEY_PATH>
# password: <PASSWORD>

## @param kerberos - string - optional - default: disabled
## @param kerberos_auth - string - optional - default: disabled
## If your service uses Kerberos authentication, you can specify the Kerberos
## strategy to use between:
## * required
Expand All @@ -104,7 +155,7 @@ instances:
##
## See https://github.com/requests/requests-kerberos#mutual-authentication
#
# kerberos: disabled
# kerberos_auth: disabled

## @param kerberos_delegate - boolean - optional - default: false
## Set to true to enable kerberos delegation of credentials to a server that requests delegation.
Expand Down Expand Up @@ -136,3 +187,61 @@ instances:
## Set the path to your Kerberos key tab file.
#
# kerberos_keytab: <KEYTAB_FILE_PATH>

## @param tls_verify - boolean - optional - default: true
## Instructs the check to validate the TLS certificate of services.
#
# tls_verify: true

## @param tls_ignore_warning - boolean - optional - default: false
## If you disable `tls_verify` you will receive security warnings in logs.
## Disable those by setting `tls_ignore_warning` to true.
#
# tls_ignore_warning: false

## @param tls_cert - string - optional
## The path to a single file in PEM format containing a certificate as well as any
## number of CA certificates needed to establish the certificate’s authenticity for
## use when connecting to services. It may also contain an unencrypted private key to use.
#
# tls_cert: <CERT_PATH>

## @param tls_private_key - string - optional
## The unencrypted private key to use for `tls_cert` when connecting to services. This is
## required if `tls_cert` is set and it does not already contain a private key.
#
# tls_private_key: <PRIVATE_KEY_PATH>

## @param tls_ca_cert - string - optional
## The path to a file of concatenated CA certificates in PEM format or a directory
## containing several CA certificates in PEM format. If a directory, the directory
## must have been processed using the c_rehash utility supplied with OpenSSL. See:
## https://www.openssl.org/docs/manmaster/man3/SSL_CTX_load_verify_locations.html
#
# tls_ca_cert: <CA_CERT_PATH>

## @param headers - list of key:value elements - optional
## The headers parameter allows you to send specific headers with every request.
## This is useful for explicitly specifying the host header or adding headers for
## authorization purposes.
##
## This overrides any default headers.
#
# headers:
# Host: alternative.host.example.com
# X-Auth-Token: <AUTH_TOKEN>

## @param timeout - integer - optional - default: 10
## The timeout for connecting to services.
#
# timeout: 10

## @param log_requests - boolean - optional - default: false
## Whether or not to debug log the HTTP(S) requests made, including the method and URL.
#
# log_requests: false

## @param persist_connections - boolean - optional - default: false
## Whether or not to persist cookies and use connection pooling for increased performance.
#
# persist_connections: false
Loading

0 comments on commit 05bd88d

Please sign in to comment.