Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
logentries-query-stream
Advanced tools
Node module to stream logs from Logentries
This module enables you to query log records in Logentries emitted as a stream. Example:
var le = require('logentries-query-stream')({
account : '00000000-0000-0000-0000-000000000000',
logset : 'my_logs',
log : 'my_log'
});
le({ filter : '/info/i' })
.on('data', log => {
// Output log record message.
console.log(log.m);
});
npm install --save logentries-query-stream
If you want to search and stream the logs using a command line tool, please check out logentries-query-cli
module.
Before querying you need to connect to a specific log. Example:
var le = require('logentries-query-stream')({
account : '00000000-0000-0000-0000-000000000000',
logset : 'my_logs',
log : 'my_log'
});
Options:
Alias: le.json(query)
Makes a query and returns a stream emitting log records as JSON objects. Example:
le({
start : Date.now() - 20*60*1000,
end : Date.now(),
limit : 100
})
.on('data', log => console.log(log.m));
Query:
Format of emitted log records:
Makes a query and returns a stream emitting log records as raw JSON or text. Example:
le.raw({
format : 'text',
start : Date.now() - 20*60*1000,
end : Date.now(),
limit : 100
}).pipe(fs.createWriteStream('example.log'));
The query have the same options as the le(query)
with the addition of one extra property:
You can read more about the workings of the Logentries API here.
Code is licensed under MIT, please see license.md file for details.
FAQs
Query and stream logs from Logentries.
We found that logentries-query-stream 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.