Skip to content

dominikkukacka/hepipe.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HEPipe.js

HEP Enabled Log harvester for Node.js

HEPipe (hep-pipe) is a simple powerful tool to monitor files (logs, events, cdrs, etc), extract and ship arbitrary rows with a matching correlation field to a HEP server such as HOMER or PCAPTURE using HEP Type 100

  • Status: Experimental

Install

npm install

Configure

Application parameters for HEP and LOGS monitoring in config.js

Each LOGS entry defines a log path and a (regex) rule to match/extract the proper correlation ID from rows


Example: NGCP/Kamailio Logs

Nov 19 22:05:36 ams2 /usr/sbin/kamailio[1067]: INFO: Sending reply, fs='udp:127.0.0.1:5060' - [email protected]
  • Regex Filter: ID=([^&]\\S*)
  • Correlation ID: [email protected]
  • HEP Output:
    rcinfo = {
    type: 'HEP',
    version: 3,
    payload_type: '100',
    captureId: '2001',
    capturePass: 'myHep',
    ...
    correlation_id: '[email protected]',
    payload: {
    msg: 'Nov 19 22:05:36 ams2 /usr/sbin/kamailio[1067]: INFO: Sending reply, fs='udp:127.0.0.1:5060' - [email protected]'
    }
    }
    

Example: NGCP/RTPEngine Logs

Nov 19 22:05:36 ams2 (daemon.info) rtpengine[2812]: [[email protected]] ------ Media #1 (audio over RTP/AVP) using PCMA/8000
  • Regex Filter: \\[.*].*\\[(.*)\\]
  • Correlation ID: [email protected]
  • HEP Output:
    rcinfo = {
    type: 'HEP',
    version: 3,
    payload_type: '100',
    captureId: '2002',
    capturePass: 'myHep',
    ...
    correlation_id: '[email protected]',
    payload: {
    msg: 'Nov 19 22:05:36 ams2 (daemon.info) rtpengine[2812]: [[email protected]] ------ Media #1 (audio over RTP/AVP) using PCMA/8000'
    }
    }

Start Hepipe-js

npm run forever

That's all! If you matched your strings right, HEP logs are being shipped out!


Developers

Contributions to our projects are always welcome! If you intend to participate and help us improve our software, we kindly ask you to sign a CLA (Contributor License Agreement) and coordinate at best with the existing team via the homer-dev mailing list.


If you use our projects in production, please consider supporting us with a donation

Donate

About

Pipe arbitrary data rows (logs, events, cdrs, esl, etc) to HEP Server (HOMER)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%