Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
nsyslog-parser
Advanced tools
Syslog Parser. Accepts RFC 3164 (BSD) and RFC 5424 formats
Installation
npm install nsyslog-parser
Usage
const parser = require("nsyslog-parser");
var bsdLine = "<34>Oct 11 22:14:15 mymachine su: 'su root' failed for lonvick on /dev/pts/8";
var ietfLine = "<165>1 2003-10-11T22:14:15.003Z mymachine.example.com evntslog - ID47 [exampleSDID@32473 iut="3" eventSource="Application" eventID="1011"][exampleSDID@32474 iut="4" eventSource="Application" eventID="1012"] BOMAn application event log entry";
console.log(parser(bsdLine);
console.log(parser(ietfLine);
Results
{
originalMessage: '<34>Oct 11 22:14:15 mymachine su: \'su root\' failed for lonvick on /dev/pts/8',
pri: '<34>',
prival: 34,
facilityval: 4,
levelval: 2,
facility: 'auth',
level: 'crit',
type: 'BSD',
ts: '2017-10-11T20:14:15.000Z',
host: 'mymachine',
appName: 'su',
message: '\'su root\' failed for lonvick on /dev/pts/8',
fields: [],
header: '<34>Oct 11 22:14:15 mymachine su: '
}
{
originalMessage: '<34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - BOM\'su root\' failed for lonvick on /dev/pts/8',
pri: '<34>',
prival: 34,
facilityval: 4,
levelval: 2,
facility: 'auth',
level: 'crit',
version: 1,
type: 'RFC5424',
ts: '2003-10-11T22:14:15.003Z',
host: 'mymachine.example.com',
appName: 'su',
pid: '-',
messageid: 'ID47',
structuredData: '-',
message: 'BOM\'su root\' failed for lonvick on /dev/pts/8',
structuredData:
[
{'$id': 'exampleSDID@32473',
iut: '3',
eventSource: 'Application',
eventID: '1011' },
{'$id': 'exampleSDID@32474',
iut: '4',
eventSource: 'Application',
eventID: '1012' } ]
fields: [],
header: '<34>1 2003-10-11T22:14:15.003Z mymachine.example.com su - ID47 - '
}
FAQs
Syslog Parser. Accepts RFC 3164 (BSD), RFC 5424 and CEF formats
The npm package nsyslog-parser receives a total of 1,485 weekly downloads. As such, nsyslog-parser popularity was classified as popular.
We found that nsyslog-parser 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
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.