bunyan-dse
v1.0.0
Published
Bunyan Datastax stream
Downloads
11
Readme
Bunyan-Datastax logger stream
This module is based on ivpusic/bunyan-cassandra npm, updated to use the dDatastax enterprise driver. Consider it as WIP.
The dse-logger file is a sample datastax stream definition (TAP developers will understand).
To install as a local dependency:
- clone the repo
- run npm install --save ../bunyan-dse
- add ./config/dse-config.js with your connection settings
- configure the datastax stream (see sample-dse-logger.js for an example)
Datastax table and types: drop table taplogs; drop type req_debug; drop type req_err; drop type request;
CREATE TYPE req_debug ( "RequestID" text, "VAST" text, "Version" text, "AvailNo" text, "Bitrate" text, "MAC" text, "IP" inet, "Vdur" text, "FileName" text, req_id text, "ssusDisabled" boolean, "IPTV" boolean, "ChannelID" text );
CREATE TYPE req_err ( "responseCode" int, "errorMessage" text, "tapErrorCode" text, debug req_debug );
CREATE TYPE request ( method text, url text, headers map<text, text>, "remoteAddress" inet, "remotePort" double );
CREATE TABLE taplogs ( req_id text, id uuid, err frozen<req_err>, hostname text, level double, msg text, name text, pid double, received_at timestamp, req frozen, PRIMARY KEY (req_id, id) ); CREATE INDEX logs_req_idx ON taplogs (req); CREATE INDEX logs_err_idx ON taplogs (err);