greatcare / pm2-zabbix

A Node.js PM2 monitoring tool for Zabbix.
MIT License
87 stars 61 forks source link

about check app status (request) #7

Closed espala closed 7 years ago

espala commented 7 years ago

Hello,

I am using a Zabbix server and I am using your pm2-Zabbix. I want to check the status of applications on pm2. When any of the apps stops, I want an alarm. How can i do it, can you help me?

For example, the "logHandler" application has stopped, but it is too late for me to know. I have big problems in this regard. I'm not open to your suggestions.

│ App name │ id │ mode │ pid │ status │ ... ... │ api │ 123 │ cluster │ 2422 │ online │ ... │ image-proxy │ 71 │ cluster │ 25504 │ online │ ... │ indexerIntegrityHandler │ 981 │ cluster│ 89351 │ online │ ... │ logHandler │ 961 │ cluster │ 01 │ stopped │ ... │ web │ 208 │ cluster │ 25192 │ online │ ... ...

rkaw92 commented 7 years ago

Hi,

you should use a Zabbix trigger, as described in the documentation: https://www.zabbix.com/documentation/3.2/manual/config/triggers/trigger

In particular, you have the status string item available. Our XML template file already includes some trigger templates.

This alerting feature is native to Zabbix and does not depend on features specific to pm2-zabbix.

espala commented 7 years ago

Hello,

I don't know how to trigger this custom template. I am very happy if you can help me in this regard.

rkaw92 commented 7 years ago

Hi, I'm doing a run of issue-pruning and this issue looks like it has not received any activity for a while, being a support/solution request. I hope the problem is long solved. In any case, the issue is now being closed. Please note that we are accepting wiki/documentation examples, and at the same time do not have the resources to support configuration of Zabbix itself. If you wish to contribute documentation on how to accomplish alerting with pm2-zabbix, I will gladly use it for constructing a knowledge base.