Usage
Description
Thenpx wgc audit-log stream set splunk-hec command streams the organization’s audit logs to a Splunk HTTP Event Collector (HEC). It creates the stream if none exists and replaces it otherwise.
Every option that is left out is reset to its default, except the token, which keeps its stored value. Pass --index, --source and --sourcetype again on every call that should keep them.
Use a HEC token with indexer acknowledgement disabled. See Streaming to Splunk HEC for the event format and delivery guarantees.
Required Options
https://splunk.example.com:8088, or the full /services/collector/event URL. It must use HTTPS with a certificate from a trusted CA. localhost is not accepted.
Options
-
--token <token>: The HEC token. Required when creating the stream. Can also be set with theCOSMO_HEC_TOKENenvironment variable, which keeps it out of shell history. If left out, the stored token is kept. -
--index <index>: The Splunk index to write to. If left out, events go to the token’s default index. -
--source <source>: The Splunk source. Defaults tocosmo. -
--sourcetype <sourcetype>: The Splunk sourcetype. Defaults towundergraph:cosmo:audit. -
--disabled: Saves the configuration without streaming. Running the command again without this flag enables the stream.
Examples
cosmo index.
Notes
- The token is stored by Cosmo and is never returned.
npx wgc audit-log stream getprints its last four characters. - Saving the configuration clears the last delivery error.
- Entries written before the stream was configured are not sent.