Use the following procedure to configure {productname} to use Splunk or the Splunk HTTP Event Collector (HEC).
-
You have installed Splunk and created a username.
-
You have generated a Splunk bearer token.
-
Configure {productname} to use Splunk or the Splunk HTTP Event Collector (HEC).
-
If opting to use Splunk, open your {productname}
config.yaml
file and add the following configuration fields:# ... LOGS_MODEL: splunk LOGS_MODEL_CONFIG: producer: splunk splunk_config: host: http://<user_name>.remote.csb (1) port: 8089 (2) bearer_token: <bearer_token> (3) url_scheme: <http/https> (4) verify_ssl: False (5) index_prefix: <splunk_log_index_name> (6) ssl_ca_path: <location_to_ssl-ca-cert.pem> (7) # ...
-
String. The Splunk cluster endpoint.
-
Integer. The Splunk management cluster endpoint port. Differs from the Splunk GUI hosted port. Can be found on the Splunk UI under Settings → Server Settings → General Settings.
-
String. The generated bearer token for Splunk.
-
String. The URL scheme for access the Splunk service. If Splunk is configured to use TLS/SSL, this must be
https
. -
Boolean. Whether to enable TLS/SSL. Defaults to
true
. -
String. The Splunk index prefix. Can be a new, or used, index. Can be created from the Splunk UI.
-
String. The relative container path to a single
.pem
file containing a certificate authority (CA) for TLS/SSL validation.
-
-
If opting to use Splunk HEC, open your {productname}
config.yaml
file and add the following configuration fields:# ... LOGS_MODEL: splunk LOGS_MODEL_CONFIG: producer: splunk_hec (1) splunk_hec_config: (2) host: prd-p-aaaaaq.splunkcloud.com (3) port: 8088 (4) hec_token: 12345678-1234-1234-1234-1234567890ab (5) url_scheme: https (6) verify_ssl: False (7) index: quay (8) splunk_host: quay-dev (9) splunk_sourcetype: quay_logs (10) # ...
-
Specify
splunk_hec
when configuring Splunk HEC. -
Logs model configuration for Splunk HTTP event collector action logs configuration.
-
The Splunk cluster endpoint.
-
Splunk management cluster endpoint port.
-
HEC token for Splunk.
-
The URL scheme for access the Splunk service. If Splunk is behind SSL/TLS, must be
https
. -
Boolean. Enable (true) or disable (false) SSL/TLS verification for HTTPS connections.
-
The Splunk index to use.
-
The host name to log this event.
-
The name of the Splunk
sourcetype
to use.
-
-
-
If you are configuring
ssl_ca_path
, you must configure the SSL/TLS certificate so that {productname} will trust it.-
If you are using a standalone deployment of {productname}, SSL/TLS certificates can be provided by placing the certificate file inside of the
extra_ca_certs
directory, or inside of the relative container path and specified byssl_ca_path
. -
If you are using the {productname} Operator, create a config bundle secret, including the certificate authority (CA) of the Splunk server. For example:
$ oc create secret generic --from-file config.yaml=./config_390.yaml --from-file extra_ca_cert_splunkserver.crt=./splunkserver.crt config-bundle-secret
Specify the
conf/stack/extra_ca_certs/splunkserver.crt
file in yourconfig.yaml
. For example:# ... LOGS_MODEL: splunk LOGS_MODEL_CONFIG: producer: splunk splunk_config: host: ec2-12-345-67-891.us-east-2.compute.amazonaws.com port: 8089 bearer_token: eyJra url_scheme: https verify_ssl: true index_prefix: quay123456 ssl_ca_path: conf/stack/splunkserver.crt # ...
-