
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
splunk-bunyan-logger
Advanced tools
This project provides a Bunyan stream for HTTP Event Collector in Splunk Enterprise and Splunk Cloud.
npm install --save bunyan
).First, update npm to the latest version by running: sudo npm install npm -g
.
Then run: npm install --save splunk-bunyan-logger
.
See the examples
folder for usage examples:
all_batching.js
: Shows how to configure a Bunyan Stream with the 3 batching settings: batchInterval
, maxBatchCount
, & maxBatchSize
.basic.js
: Shows how to configure a Bunyan stream and send a log message to Splunk.custom_format.js
: Shows how to configure a Bunyan Stream to log messages to Splunk using a custom format.manual_batching.js
: Shows how to queue log messages, and send them in batches by manually calling flush()
.retry.js
: Shows how to configure retries on errors.Note: SSL certificate validation is diabled by default.
To enable it, set logger.requestOptions.strictSSL = true
on your SplunkStream
instance:
var bunyan = require("bunyan");
var splunkBunyan = require("splunk-bunyan-logger");
var config = {
token: "your-token-here",
url: "https://splunk.local:8088"
};
var splunkStream = splunkBunyan.createStream(config);
// Enable SSL certificate validation
stream.logger.requestOptions.strictSSL = true;
// Note: splunkStream must be set to an element in the streams array
var Logger = bunyan.createLogger({
name: "my logger",
streams: [
splunkStream
]
});
var bunyan = require("bunyan");
var splunkBunyan = require("splunk-bunyan-logger");
var config = {
token: "your-token-here",
url: "https://splunk.local:8088"
};
var splunkStream = splunkBunyan.createStream(config);
// Note: splunkStream must be set to an element in the streams array
var Logger = bunyan.createLogger({
name: "my logger",
streams: [
splunkStream
]
});
var payload = {
// Message can be anything; doesn't have to be an object
message: {
temperature: "70F",
chickenCount: 500
}
};
console.log("Sending payload", payload);
Logger.info(payload, "Chicken coup looks stable.");
Stay connected with other developers building on Splunk software.
devinfo@splunk.com | |
Issues | https://github.com/splunk/splunk-bunyan-logger/issues/ |
Answers | http://answers.splunk.com/ |
Blog | http://blogs.splunk.com/dev/ |
@splunkdev |
You can contact support if you have Splunk related questions.
You can reach the developer platform team at devinfo@splunk.com.
The Splunk HTTP Event Collector Stream for Bunyan is licensed under the Apache License 2.0. Details can be found in the LICENSE file.
v0.11.0
needle
in lieu of deprecated request
.nyc
in lieu of deprecated istanbul
.FAQs
Splunk HTTP Event Collector Stream for Bunyan
The npm package splunk-bunyan-logger receives a total of 2,791 weekly downloads. As such, splunk-bunyan-logger popularity was classified as popular.
We found that splunk-bunyan-logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.