splunk-stdio-collector

1.1.4 • Public • Published

Splunk Stdio Collector

Send logs from input stream to splunk

Requirement

Node.js >= 16.13.0

set environmet variables SPLUNK_URL and SPLUNK_TOKEN

Install

npm install --global splunk-stdout-collector
brew install coreutils # optional but recommeneded, turn off buffering in pipe

Usage

splunk-stdio-collector [options]

Options:
-sc, --source <str>      Set `source` field in logs [default: stdio]
-st, --sourcetype <str>  Set `sourcetype` field in logs
--host <str>             Set `host` field in logs [default: host name of the operating system]
-q, --quiet              Don't forward logs to stdout
-s, --silent             Mute outputs

alias: ssc

Examples:
$ stdbuf -i0 -o0 -e0 npm start | ssc --sourcetype my-program
$ cat log.txt | ssc --quiet

Package Sidebar

Install

npm i splunk-stdio-collector

Weekly Downloads

2

Version

1.1.4

License

MIT

Unpacked Size

19.2 kB

Total Files

11

Last publish

Collaborators

  • borui.gu