-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds RequestsWrapper to Kong (#5807)
* Adds RequestsWrapper to Kong * Updates Configuration files
- Loading branch information
Showing
4 changed files
with
325 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Kong | ||
files: | ||
- name: kong.yaml | ||
options: | ||
- template: init_config | ||
options: | ||
- template: init_config/http | ||
- template: instances | ||
options: | ||
- name: kong_status_url | ||
required: true | ||
description: URL where Kong exposes its status. | ||
value: | ||
example: http://localhost:8001/status/ | ||
type: string | ||
- template: instances/http | ||
- template: instances/tags | ||
- template: instances/global | ||
- template: logs | ||
example: | ||
- type: file | ||
path: /var/log/nginx/access.log | ||
source: kong | ||
service: <SERVICE_NAME> | ||
- type: file | ||
path: /var/log/nginx/error.log | ||
source: kong | ||
service: <SERVICE_NAME> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,318 @@ | ||
## All options defined here are available to all instances. | ||
# | ||
init_config: | ||
|
||
## @param proxy - mapping - 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 | ||
|
||
## @param timeout - number - optional - default: 10 | ||
## The timeout for connecting to services. | ||
# | ||
# timeout: 10 | ||
|
||
## Every instance is scheduled independent of the others. | ||
# | ||
instances: | ||
|
||
## @param kong_status_url - string - required | ||
## URL where Kong exposes its status. | ||
# | ||
- kong_status_url: http://localhost:8001/status/ | ||
|
||
## @param ssl_validation - boolean - optional - default: true | ||
## Instructs the check to not skip the validation of the SSL certificate of the URL being tested. | ||
## @param proxy - mapping - optional | ||
## This overrides the `proxy` setting in `init_config`. | ||
## | ||
## 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 | ||
## 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. | ||
# | ||
# skip_proxy: false | ||
|
||
## @param auth_type - string - optional - default: basic | ||
## The type of authentication to use. The available types (and related options) are: | ||
## | ||
## - basic | ||
## |__ username | ||
## |__ password | ||
## - digest | ||
## |__ username | ||
## |__ password | ||
## - ntlm | ||
## |__ ntlm_domain | ||
## |__ password | ||
## - kerberos | ||
## |__ kerberos_auth | ||
## |__ kerberos_cache | ||
## |__ kerberos_delegate | ||
## |__ kerberos_force_initiate | ||
## |__ kerberos_hostname | ||
## |__ kerberos_keytab | ||
## |__ kerberos_principal | ||
## - aws | ||
## |__ aws_region | ||
## |__ aws_host | ||
## |__ aws_service | ||
## | ||
## The `aws` auth type relies on boto3 to automatically gather AWS credentials (e.g. from `.aws/credentials`). | ||
## Details: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html#configuring-credentials | ||
# | ||
# auth_type: basic | ||
|
||
## @param username - string - optional | ||
## The username to use if services are behind basic or digest auth. | ||
# | ||
# username: <USERNAME> | ||
|
||
## @param password - string - optional | ||
## The password to use if services are behind basic or NTLM auth. | ||
# | ||
# password: <PASSWORD> | ||
|
||
## @param ntlm_domain - string - optional | ||
## If your services use NTLM authentication, you can specify | ||
## a domain that is used in the check. For NTLM Auth, append | ||
## the username to domain, not as the `username` parameter. | ||
# | ||
# ntlm_domain: <NTLM_DOMAIN>/<USERNAME> | ||
|
||
## @param kerberos_auth - string - optional - default: disabled | ||
## If your services use Kerberos authentication, you can specify the Kerberos | ||
## strategy to use between: | ||
## | ||
## - required | ||
## - optional | ||
## - disabled | ||
## | ||
## See https://github.com/requests/requests-kerberos#mutual-authentication | ||
# | ||
# 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. | ||
## | ||
## See https://github.com/requests/requests-kerberos#delegation | ||
# | ||
# kerberos_delegate: false | ||
|
||
## @param kerberos_force_initiate - boolean - optional - default: false | ||
## Set to `true` to preemptively initiate the Kerberos GSS exchange and | ||
## present a Kerberos ticket on the initial request (and all subsequent). | ||
## | ||
## See https://github.com/requests/requests-kerberos#preemptive-authentication | ||
# | ||
# kerberos_force_initiate: false | ||
|
||
## @param kerberos_hostname - string - optional | ||
## Override the hostname used for the Kerberos GSS exchange if its DNS name doesn't | ||
## match its kerberos hostname (e.g. behind a content switch or load balancer). | ||
## | ||
## See https://github.com/requests/requests-kerberos#hostname-override | ||
# | ||
# kerberos_hostname: <KERBEROS_HOSTNAME> | ||
|
||
## @param kerberos_principal - string - optional | ||
## Set an explicit principal, to force Kerberos to look for a | ||
## matching credential cache for the named user. | ||
## | ||
## See https://github.com/requests/requests-kerberos#explicit-principal | ||
# | ||
# kerberos_principal: <KERBEROS_PRINCIPAL> | ||
|
||
## @param kerberos_keytab - string - optional | ||
## Set the path to your Kerberos key tab file. | ||
# | ||
# kerberos_keytab: <KEYTAB_FILE_PATH> | ||
|
||
## @param aws_region - string - optional | ||
## If your services require AWS Signature Version 4 Signing, set the region. | ||
## | ||
## See https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html | ||
# | ||
# aws_region: <AWS_REGION> | ||
|
||
## @param aws_host - string - optional | ||
## If your services require AWS Signature Version 4 Signing, set the host. | ||
## | ||
## Note that this setting is not necessary for official integrations. | ||
## | ||
## See https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html | ||
# | ||
# aws_host: <AWS_HOST> | ||
|
||
## @param aws_service - string - optional | ||
## If your services require AWS Signature Version 4 Signing, set the service code. For a list | ||
## of available service codes, see https://docs.aws.amazon.com/general/latest/gr/rande.html | ||
## | ||
## Note that this setting is not necessary for official integrations. | ||
## | ||
## See https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html | ||
# | ||
# aws_service: <AWS_SERVICE> | ||
|
||
## @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 `tls_verify` is disabled, security warnings are logged by the check. | ||
## 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 | ||
# | ||
# ssl_validation: true | ||
# tls_ca_cert: <CA_CERT_PATH> | ||
|
||
## @param tags - list of key:value elements - optional | ||
## List of tags to attach to every metric, event and service check emitted by this integration. | ||
## @param headers - mapping - optional | ||
## The headers parameter allows you to send specific headers with every request. | ||
## You can use it for explicitly specifying the host header or adding headers for | ||
## authorization purposes. | ||
## | ||
## Learn more about tagging: https://docs.datadoghq.com/tagging/ | ||
## This overrides any default headers. | ||
# | ||
# headers: | ||
# Host: <ALTERNATIVE_HOSTNAME> | ||
# X-Auth-Token: <AUTH_TOKEN> | ||
|
||
## @param extra_headers - mapping - optional | ||
## Additional headers to send with every request. | ||
# | ||
# extra_headers: | ||
# Host: <ALTERNATIVE_HOSTNAME> | ||
# X-Auth-Token: <AUTH_TOKEN> | ||
|
||
## @param timeout - number - optional - default: 10 | ||
## The timeout for accessing services. | ||
## | ||
## This overrides the `timeout` setting in `init_config`. | ||
# | ||
# timeout: 10 | ||
|
||
## @param connect_timeout - number - optional | ||
## The connect timeout for accessing services. Defaults to `timeout`. | ||
# | ||
# connect_timeout: <CONNECT_TIMEOUT> | ||
|
||
## @param read_timeout - number - optional | ||
## The read timeout for accessing services. Defaults to `timeout`. | ||
# | ||
# read_timeout: <READ_TIMEOUT> | ||
|
||
## @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 | ||
|
||
## @param tags - list of strings - optional | ||
## A list of tags to attach to every metric and service check emitted by this instance. | ||
## | ||
## Learn more about tagging at https://docs.datadoghq.com/tagging | ||
# | ||
# tags: | ||
# - <KEY_1>:<VALUE_1> | ||
# - <KEY_2>:<VALUE_2> | ||
|
||
## Log Section (Available for Agent >=6.0) | ||
## @param min_collection_interval - number - optional - default: 15 | ||
## This changes the collection interval of the check. For more information, see: | ||
## https://docs.datadoghq.com/developers/write_agent_check/#collection-interval | ||
# | ||
# min_collection_interval: 15 | ||
|
||
## @param empty_default_hostname - boolean - optional - default: false | ||
## This forces the check to send metrics with no hostname. | ||
## | ||
## This is useful for cluster-level checks. | ||
# | ||
# empty_default_hostname: false | ||
|
||
## Log Section | ||
## | ||
## type - mandatory - Type of log input source (tcp / udp / file / windows_event) | ||
## port / path / channel_path - mandatory - Set port if type is tcp or udp. Set path if type is file. Set channel_path if type is windows_event | ||
## service - mandatory - Name of the service that generated the log | ||
## source - mandatory - Attribute that defines which Integration sent the logs | ||
## type - required - Type of log input source (tcp / udp / file / windows_event) | ||
## port / path / channel_path - required - Set port if type is tcp or udp. | ||
## Set path if type is file. | ||
## Set channel_path if type is windows_event. | ||
## service - required - Name of the service that generated the log | ||
## source - required - Attribute that defines which Integration sent the logs | ||
## sourcecategory - optional - Multiple value attribute. Used to refine the source attribute | ||
## tags: - optional - Add tags to the collected logs | ||
## tags - optional - Add tags to the collected logs | ||
## | ||
## Discover Datadog log collection: https://docs.datadoghq.com/logs/log_collection/ | ||
|
||
# | ||
# logs: | ||
# - type: file | ||
# path: /var/log/nginx/access.log | ||
# service: webapp | ||
# source: kong | ||
# service: <SERVICE_NAME> | ||
# - type: file | ||
# path: /var/log/nginx/error.log | ||
# service: webapp | ||
# source: kong | ||
# service: <SERVICE_NAME> |
Oops, something went wrong.