Ad Widget

Collapse

Process running or not over last 5 minutes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • porkcharsui
    Junior Member
    • May 2012
    • 15

    #1

    Process running or not over last 5 minutes

    Hi all,

    I'm having trouble getting a trigger to function properly. I want it to trigger when a daemon process on a host has not been running for 5 minutes or more.

    I have this:
    {FQDN: proc.num[,,sleep,PROCESS-NAME].last(300)}=0
    I thought that meant... trigger if last value over 300 sec is 0... but apparently it does not, because it triggers immediately.

    I find the documentation isn't very helpful, very few usage examples and only a very summary explanation on most things. Can someone please explain how to set up my trigger and/or perhaps where I can find more detailed explanations on how zabbix triggers and items work.
  • aib
    Senior Member
    • Jan 2014
    • 1615

    #2
    Try to use .min(300) instead of .last(300)

    In plain words: If the process was down even once for the last 300 seconds - ALERT!
    Sincerely yours,
    Aleksey

    Comment

    • porkcharsui
      Junior Member
      • May 2012
      • 15

      #3
      And that's exactly what I don't want! I Want it to ALERT if the process is down for at least 5 minutes and the host has to be up for at least 5 minutes.
      The system being monitored is a dual-boot (windows/ubuntu) system, of which we only monitor the linux part. So I had to find a way to check if the system was running linux at that moment too. I finally came up with this:
      {Template SOMETHING:icmpping.count(600,1)}>5 &
      {Template SOMETHING: proc.num[,,sleep,/usr/bin/ruby /usr/bin/puppet agent --no-daemonize].count(#10,0,"eq")}>5 &
      {Template SOMETHING: proc.num[,,sleep,/sbin/init].last()}=1

      Comment

      Working...