fastly logging elasticsearch/create
Create an Elasticsearch logging endpoint on a Fastly service version.
Syntax
$ fastly logging elasticsearch/create --version=VERSION
Options
Key | Required? | Default | Description |
---|---|---|---|
--name | No | The name of the Elasticsearch logging object. Used as a primary key for API access | |
--version | Yes | 'latest', 'active', or the number of a specific Fastly service version | |
--autoclone | No | If the selected service version is not editable, clone it and use the clone. | |
--format | No | Apache style log formatting. Your log must produce valid JSON | |
--format-version | No | The version of the custom logging format used for the configured endpoint. Can be either 2 (the default, version 2 log format) or 1 (the version 1 log format). The logging call gets placed by default in vcl_log if format_version is set to 2 and in vcl_deliver if format_version is set to 1 | |
--index | No | The name of the Elasticsearch index to send documents (logs) to. The index must follow the Elasticsearch index format rules (https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html). We support strftime (http://man7.org/linux/man-pages/man3/strftime.3.html) interpolated variables inside braces prefixed with a pound symbol. For example, #{%F} will interpolate as YYYY-MM-DD with today's date | |
--placement | No | Where in the generated VCL the logging call should be placed, overriding any format_version default. Can be none or waf_debug. This field is not required and has no default value | |
--pipeline | No | The ID of the Elasticsearch ingest pipeline to apply pre-process transformations to before indexing. For example my_pipeline_id. Learn more about creating a pipeline in the Elasticsearch docs (https://www.elastic.co/guide/en/elasticsearch/reference/current/ingest.html) | |
--request-max-bytes | No | Maximum size of log batch, if non-zero. Defaults to 100MB | |
--request-max-entries | No | Maximum number of logs to append to a batch, if non-zero. Defaults to 10k | |
--response-condition | No | The name of an existing condition in the configured endpoint, or leave blank to always execute | |
--service-id | No | Service ID (falls back to FASTLY_SERVICE_ID, then fastly.toml) | |
--service-name | No | The name of the service | |
--tls-ca-cert | No | A secure certificate to authenticate the server with. Must be in PEM format | |
--tls-client-cert | No | The client certificate used to make authenticated requests. Must be in PEM format | |
--tls-client-key | No | The client private key used to make authenticated requests. Must be in PEM format | |
--tls-hostname | No | Used during the TLS handshake to validate the certificate | |
--url | No | The URL to stream logs to. Must use HTTPS. |
Global options
Key | Required? | Default | Description |
---|---|---|---|
--help | No | Show context-sensitive help. | |
--accept-defaults | No | Accept default options for all interactive prompts apart from Yes/No confirmations | |
--auto-yes | No | Answer yes automatically to all Yes/No confirmations. This may suppress security warnings | |
--debug-mode | No | Print API request and response details (NOTE: can disrupt the normal CLI flow output formatting) | |
--enable-sso | No | Enable Single-Sign On (SSO) for current profile execution (see also: 'fastly sso') | |
--non-interactive | No | Do not prompt for user input - suitable for CI processes. Equivalent to --accept-defaults and --auto-yes | |
--profile | No | Switch account profile for single command execution (see also: 'fastly profile switch') | |
--quiet | No | Silence all output except direct command output. This won't prevent interactive prompts (see: --accept-defaults, --auto-yes, --non-interactive) | |
--token | No | Fastly API token (or via FASTLY_API_TOKEN) | |
--verbose | No | Verbose logging |
API equivalent
This command internally uses the following Fastly public APIs: