Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
splunk-logging
Advanced tools
This project provides a simple JavaScript interface for logging to HTTP Event Collector in Splunk Enterprise and Splunk Cloud.
First, update npm to the latest version by running:
sudo npm install npm -g
Then run:
npm install --save splunk-logging
See the examples
folder for usage examples:
all_batching.js
: Shows how to configure a logger with the 3 batching settings: batchInterval
, maxBatchCount
, & maxBatchSize
.basic.js
: Shows how to configure a logger and send a log message to Splunk.custom_format.js
: Shows how to configure a logger 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 disabled by default.
To enable it, set requestOptions.strictSSL = true
on your SplunkLogger
instance:
var SplunkLogger = require("splunk-logging").Logger;
var config = {
token: "your-token-here",
url: "https://splunk.local:8088"
};
var Logger = new SplunkLogger(config);
// Enable SSL certificate validation
Logger.requestOptions.strictSSL = true;
var SplunkLogger = require("splunk-logging").Logger;
var config = {
token: "your-token-here",
url: "https://splunk.local:8088"
};
var Logger = new SplunkLogger(config);
var payload = {
// Message can be anything; doesn't have to be an object
message: {
temperature: "70F",
chickenCount: 500
}
};
console.log("Sending payload", payload);
Logger.send(payload, function(err, resp, body) {
// If successful, body will be { text: 'Success', code: 0 }
console.log("Response from Splunk", body);
});
Stay connected with other developers building on Splunk software.
devinfo@splunk.com | |
Issues | https://github.com/splunk/splunk-javascript-logging/issues/ |
Answers | http://answers.splunk.com/ |
Blog | http://blogs.splunk.com/dev/ |
@splunkdev |
The Splunk logging library for JavaScript is community-supported.
logging-library-javascript
tag to identify your questions).You can contact support if you have Splunk related questions.
You can reach the Dev Platform team at devinfo@splunk.com.
The Splunk Logging Library for JavaScript is licensed under the Apache License 2.0. Details can be found in the LICENSE file.
FAQs
Splunk HTTP Event Collector logging interface
The npm package splunk-logging receives a total of 31,389 weekly downloads. As such, splunk-logging popularity was classified as popular.
We found that splunk-logging 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.