Giter Club home page Giter Club logo

pm2-slack's People

Contributors

abawchen avatar kjhangiani avatar ma-zal avatar matkinson-godaddy avatar mattpker 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  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  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

pm2-slack's Issues

App specific log events and regex specific log string match

I have a node application for downloading some files daily in that application it shows the progress in the command but i want only specific log messages to be notified when the specified regex is matched to the log name or description. Also i want to notify only for specific app process because pm2 can be processed for many apps

error on install `Unknown module`

Hello

first, thank you for your wonderful work!

I got this error on my gliderlabs/alpine:3.3 image

log:

$ pm2 install pm2-slack
[PM2][Module] Installing module pm2-slack
[PM2][Module] Module already installed. Updating.
[PM2][Module] Processing...
............/root/.pm2
`-- [email protected]

[PM2][Module][ERROR] Unknown module

Allow custom username

Currently you are using os.hostname() as username for slack messages.
As we don't want to make it public, could you add an option to override it?
We have also tried setting a default on the Slack webhook but that gets ignored.
Thanks

Events not being fired

I have used it to monitor my apps. But the thing is that it is not properly emitting the events. Restarting an app doesn't emit restart event , instead, it emits two exit events. Anybody got an idea why it might be happening?

Is it a bug in cluster mode?

I have an app running in cluster mode that every time I restart it, there would be two null messages as follows:

screen shot 2017-11-17 at 3 05 55 pm

Increase buffer seconds limit

Is there a reason why the maximum buffer second limit is only 5 seconds? I have a usecase that I need it to send only every 10/30 seconds.

Error when I try to install

Refusing to download the git repo

{"protocol":"http:","hostname":"ikt.pm2.io","repository":"http://ikt.pm2.io/ikt.git"} over HTTP without a commit hash
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

Environment:
DigitalOcean, Alpine Linux (inside the docker container)

Usage of old pm2 version

Is there a reason this package uses version 0.15.10 of pm2? It is at 2.7.2 now.
The reason I ask is since the old version has a ikt: 'git+http://ikt.pm2.io/ikt.git#master' dependency which is messing with our builds and is gone in the newer version

Allow custom messages and notifications

Thanks for great project! I have following feature request:
I want to add <!channel> to messages, so all members in our Slack channel get notification.

Preferably as option, so we can ping only specific user per process.

Multiple slack_url

Hi, is there a way to configure 2 or more slack webhook urls? I have two channels and I need to set two webhooks or at least set different channels from PM2 module.

Maybe it's done but i didn't find it.

Thanks in advance.

Add id to title

Would it be possible to add the id of the process to the message title?
If you have 4 processes with the same name this helps to see where an event happened.

Memory usage

First of all, thanks for this module :)

I'm experiencing some weird memory usage on my system.

image

120MB for such a tiny module seems a bit odd, what are your thoughts on this? I didn't have time to debug this yet but maybe you or someone else already have some insights.

error with pm2 2.5.0

`/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130
return typeof obj == 'object' && obj.width != undefined
^

TypeError: Cannot read property 'width' of null
at get_width (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130:41)
at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:125:68
at Array.forEach (native)
at extractColumnWidths (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:124:9)
at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:98:11
at Array.forEach (native)
at Table.toString (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:95:16)
at /usr/lib/node_modules/pm2/lib/API/CliUx.js:329:29
at Array.forEach (native)
at Object.UX.dispKeys (/usr/lib/node_modules/pm2/lib/API/CliUx.js:310:19)`

Configuration per process ?

I am not familiar with PM2 plugin architecture, but is it possible to somehow enable this plugin only for a particular process? On our server there are some processed which are not production related so we don't care about those much.

How can I strip terminal color code

Hello.

My application is outputting logs using winston with colorize option set to true. This allows me to see logs that is colorized based on the log type (error shows up in red, etc..)

Now, since pm2-slack sends logs to slack without stripping the terminal color code, I am seeing something like following in the slack channel.

my.host.com BOT [3:44 AM]  
sca-wf-task - error
----------------
"Thu Oct 06 2016 07:44:01 GMT+0000 (UTC) - \u001b[31merror\u001b[39m: can't clean taskdir on resource_id:575ef81e9b8f34d642b15106 because resource status is not ok\n"

Is there anyway to strip those terminal color codes like.. \u001b[31m?

Warning [email protected]: The platform "linux" is incompatible with this module

Hi Matt,

Since the latest install, we get this strange warning and error.

We are using Yarn to install all our packages.
But it seems to be related to something in the pm2-slack module.

StdOut:
[PM2][Module] Installing module pm2-slack
[PM2][Module] Module already installed. Updating.
[PM2] Applying action deleteProcessId on app [0](ids: 0)
[PM2] [pm2-slack](0) ✓
In memory process deleted
[PM2][Module] Calling [YARN] to install pm2-slack ...
yarn add v0.24.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved 1 new dependency.
└─ [email protected]
Done in 1.02s.
[PM2][Module] Module downloaded
[PM2][WARN] Applications index not running, starting...
[PM2] App [pm2-slack] launched (1 instances)
== pm2-slack ==

StdErr:
warning No license field
warning [email protected]: The platform "linux" is incompatible with this module.
warning No license field
/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130
    return typeof obj == 'object' && obj.width != undefined
                                        ^

TypeError: Cannot read property 'width' of null
    at get_width (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:130:41)
    at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:125:68
    at Array.forEach (native)
    at extractColumnWidths (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:124:9)
    at /usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:98:11
    at Array.forEach (native)
    at Table.toString (/usr/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:95:16)
    at /usr/lib/node_modules/pm2/lib/API/CliUx.js:329:29
    at Array.forEach (native)
    at Object.UX.dispKeys (/usr/lib/node_modules/pm2/lib/API/CliUx.js:310:19)

slack message not formal.

hello. i'm using pm2-slack module.

slack message not formal.

ex.

"2017-02-16T10:00:00.729Z - \u001b[31merror\u001b[39m: [ auth/email-already-in-use ] The email address is already in use by another account. \n{ email: \u001b[32m'[email protected]'\u001b[39m,\n password: \u001b[32m'barogo1004!'\u001b[39m,\n phone: \u001b[32m'0111111242'\u001b[39m }\n"

why print this message?

this module verfy useful to me..

thank you!

pm2 reload

Is there a way to notify on a reload? Either from pm2 reload or due to the --max-memory-restart flag?

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.