I'm monitoring several PM2 services, and the problem is that they sometime generates thousands of mail after for examle an update that didn't go as expected.
The triggers look as following:
The restarts could in worst case just be bumped up to >=N, but looking at the string value seems harder. According to the documentation you could write the trigger like this:
but it does not seem to do what I like.
I hope someone else has been able to solve this before and can provide some examples. Thanks!
The triggers look as following:
Code:
{Template App PM2:pm2.processes[{#PROCESS_ID},restarts].change()}>=1
Code:
{Template App PM2:pm2.processes[{#PROCESS_ID},status].str(stopped)}=1
The restarts could in worst case just be bumped up to >=N, but looking at the string value seems harder. According to the documentation you could write the trigger like this:
Code:
{Template App PM2:pm2.processes[{#PROCESS_ID},status].str(stopped,[B]seconds[/B])}=1
I hope someone else has been able to solve this before and can provide some examples. Thanks!