Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
splunk-events
Advanced tools
Javascript lib to create Splunk Logs via HTTP
npm install splunk-events
import SplunkEvents from 'splunk-events';
let splunkEvents = new SplunkEvents();
splunkEvents.config({
token: 'YOUR_TOKEN_HERE', // required
});
splunkEvents.logEvent(
'Critical',
'Info',
'WeaponConstruction',
'DeathStar'
{ username: 'vader'}
);
var SplunkEvents = require('splunk-events');
var splunkEvents = new SplunkEvents();
splunkEvents.config({
token: 'YOUR_TOKEN_HERE', // required
});
splunkEvents.logEvent(
'Critical',
'Info',
'WeaponConstruction',
'DeathStar'
{ username: 'vader'}
);
{
// Required. Splunk server endpoint
endpoint: 'YOUR_SPLUNK_ENDPOINT',
// Required. This is provided by the Splunk administrator
token: 'YOUR_TOKEN',
// Optional. Index created in Splunk. The 'token' option already associates the index info.
// This option is useful when the token have multiple indexes.
index: 'YOUR_INDEX',
// Optional. Unique identifier in your system used to associate the events with the device
host: 'YOUR_HOST',
// A debounced function will automatically flush your events after some time
autoFlush: true, //default
// Add useful info
injectAditionalInfo: false, //default
// Inactive time to wait until flush events. Requires 'autoFlush' option.
debounceTime: 2000, //default
// Max time to wait until flush events. Requires 'autoFlush' option.
debounceMaxWait: 5000 //default
// If the request fail, retry to send events using the debounced flush function
autoRetryFlush: true, //default
// Splunk's default path
path: '/services/collector/event', //default
// Important steps will be logged in the console
debug: false, //default
// Source of the logs
source: 'splunkeventsjs', //default
}
'level' is the criticality of the event ('Critical','Important','Debug').
'type' is the type of the event ('Error','Warn','Info').
'workflowType' is an action or a flow's stage in the system.
'workflowInstance' defines what id/element is being processed/executed/created in the workflowType.
'event' is an object containing your custom data to send to Splunk. This object should be flat.
if 'injectAditionalInfo' is set to true, this function adds some default data to the event
- User Agent
- Browser Language
- Screen Resolution
- URI Host
- URI Path
- URI Protocol
- URI Hash
Immediately send all queued events to Splunk Server.
This is not required when using the 'autoFlush' option.
FAQs
Javascript lib to create Splunk Logs via HTTP
The npm package splunk-events receives a total of 2,341 weekly downloads. As such, splunk-events popularity was classified as popular.
We found that splunk-events demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 55 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.