GithubHelp home page GithubHelp logo

pm2-syslog's Introduction

pm2-syslog

Redirect all logs of PM2 + Apps managed into /var/log/syslog

Configure OS

Edit /etc/rsyslog.conf and uncomment:

# provides UDP syslog reception
module(load="imudp")
input(type="imudp" port="514")

Restart rsyslog:

$ sudo service rsyslog restart

Install module

# Install
$ pm2 install pm2-syslog

# Uninstall
$ pm2 uninstall pm2-syslog

License

MIT

pm2-syslog's People

Contributors

kylegato avatar mderazon avatar unitech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pm2-syslog's Issues

Not working

Don't think this is working.

Node 0.12.7

Still see healthy-out-1.log files being written, and nothing showing up in syslog via Papertrail.

Running pm2 logs shows:

pm2-syslog-2 { type: 'axm:monitor',
  data: { 'Loop delay': { value: '0.55ms', agg_type: 'avg' } } }
pm2-syslog-2 { type: 'axm:monitor',
  data: { 'Loop delay': { value: '0.55ms', agg_type: 'avg' } } }
healthy-0 [2015-07-31 23:07:38.647] "HTTP/1.1 GET http://52.8.106.214/health" 200 0.044
pm2-syslog-2 { type: 'axm:monitor',
  data: { 'Loop delay': { value: '0.55ms', agg_type: 'avg' } } }

pm2 is listed as a dep but not in package.json?

I am running node, npm and pm2 via nvm. I can't seem to get this plugin to work.

I get Error: Cannot find module 'pm2' :

pm2-syslog-7 (err):     at Object.<anonymous> (/home/ubuntu/.pm2/node_modules/pm2-syslog/app.js:5:15)
pm2-syslog-7 (err):     at Module._compile (module.js:410:26)
pm2-syslog-7 (err):     at Object.Module._extensions..js (module.js:428:10)
pm2-syslog-7 (err):     at Module.load (module.js:335:32)
pm2-syslog-7 (err):     at Function.Module._load (module.js:290:12)
pm2-syslog-7 (err):     at Function.Module.runMain (module.js:451:10)
pm2-syslog-7 (err): module.js:318
pm2-syslog-7 (err):     throw err;
pm2-syslog-7 (err):           ^
pm2-syslog-7 (err): Error: Cannot find module 'pm2'
pm2-syslog-7 (err):     at Function.Module._resolveFilename (module.js:316:15)
pm2-syslog-7 (err):     at Function.Module._load (module.js:258:25)
pm2-syslog-7 (err):     at Module.require (module.js:345:17)
pm2-syslog-7 (err):     at require (module.js:364:17)
pm2-syslog-7 (err):     at Object.<anonymous> (/home/ubuntu/.pm2/node_modules/pm2-syslog/app.js:5:15)
pm2-syslog-7 (err):     at Module._compile (module.js:410:26)
pm2-syslog-7 (err):     at Object.Module._extensions..js (module.js:428:10)
pm2-syslog-7 (err):     at Module.load (module.js:335:32)
pm2-syslog-7 (err):     at Function.Module._load (module.js:290:12)
pm2-syslog-7 (err):     at Function.Module.runMain (module.js:451:10)

Not working?

I have this module installed and enabled:

 Module activated
┌────────────┬─────────┬────────────┬────────┬─────────┬─────┬─────────────┐
│ Module     │ version │ target PID │ status │ restart │ cpu │ memory      │
├────────────┼─────────┼────────────┼────────┼─────────┼─────┼─────────────┤
│ pm2-syslog │ 2.2.3   │ N/A        │ online │ 0       │ 0%  │ 29.656 MB   │
└────────────┴─────────┴────────────┴────────┴─────────┴─────┴─────────────┘

Yet my application is still logging to blog-error-0.log and blog-out-0.log? What am I missing?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.