Ad Widget

Collapse

Trigger after string has appeared N times in T time.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gXXX
    Junior Member
    • Jun 2021
    • 4

    #1

    Trigger after string has appeared N times in T time.

    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:

    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
    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!
Working...