forked from FrankGrimm/node-syslog-recv
obezuk/node-syslog-recv
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Receives and parses remote syslogd events generated by the default CentOS 5 syslog daemon via UDP. Setup: 1. Put the files in ./lib/ somewhere node can find them 2. require syslog-recv var syslogReceiver = require("./lib/syslog-recv"); 3. Start listening for incoming udp packets Note: The default port is 514, which requires root privileges. var syslogServer = syslogReceiver.getServer(514, null, function(evt) { // ... do something with evt }); getServer arguments are: listening port, interface / ip, callback function The callback function must have one argument, which contains all data on an event. 4. Do something with the event data. The event data parameter contains the following event properties: .original: The original packet payload .received: a Date instance, indicating when the event was received and parsed .pri: Undecoded PRI part of the syslogd message (see RFC for details, basically it contains the IDs for facility and severity) .facility_id: Number indicating which facility generated the event .facility: Textual description of the facility .severity_id: Number indicating the severity of the event .severity: Textual severity indicator .tag: Commonly used to indicate the daemon that generated the event .pid: Process ID (often empty) .content: Event message .rinfo: Endpoint information (.rinfo.address, .rinfo.port indicate where the event came from) Basic examples can be found in the example directory. Please note that adoption to other syslog daemons may require changing the decoding in ./lib/syslog-messages.js
About
node.js module for receiving remote syslogd events via UDP (CentOS only)
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published