Note
|
To configure action log storage for Elasticsearch, you must provide your own Elasticsearch stack; it is not included with {productname} as a customizable component. |
Enabling Elasticsearch logging can be done during {productname} deployment or post-deployment by updating your config.yaml
file. When configured, usage log access continues to be provided through the web UI for repositories and organizations.
Use the following procedure to configure action log storage for Elasticsearch:
-
Obtain an Elasticsearch account.
-
Update your {productname}
config.yaml
file to include the following information:# ... LOGS_MODEL: elasticsearch (1) LOGS_MODEL_CONFIG: producer: elasticsearch (2) elasticsearch_config: host: http://<host.elasticsearch.example>:<port> (3) port: 9200 (4) access_key: <access_key> (5) secret_key: <secret_key> (6) use_ssl: True (7) index_prefix: <logentry> (8) aws_region: <us-east-1> (9) # ...
-
The method for handling log data.
-
Choose either Elasticsearch or Kinesis to direct logs to an intermediate Kinesis stream on AWS. You need to set up your own pipeline to send logs from Kinesis to Elasticsearch, for example, Logstash.
-
The hostname or IP address of the system providing the Elasticsearch service.
-
The port number providing the Elasticsearch service on the host you just entered. Note that the port must be accessible from all systems running the {productname} registry. The default is TCP port
9200
. -
The access key needed to gain access to the Elasticsearch service, if required.
-
The secret key needed to gain access to the Elasticsearch service, if required.
-
Whether to use SSL/TLS for Elasticsearch. Defaults to
True
. -
Choose a prefix to attach to log entries.
-
If you are running on AWS, set the AWS region (otherwise, leave it blank).
-
-
Optional. If you are using Kinesis as your logs producer, you must include the following fields in your
config.yaml
file:kinesis_stream_config: stream_name: <kinesis_stream_name> (1) access_key: <aws_access_key> (2) secret_key: <aws_secret_key> (3) aws_region: <aws_region> (4)
-
The name of the Kinesis stream.
-
The name of the AWS access key needed to gain access to the Kinesis stream, if required.
-
The name of the AWS secret key needed to gain access to the Kinesis stream, if required.
-
The Amazon Web Services (AWS) region.
-
-
Save your
config.yaml
file and restart your {productname} deployment.