Welcome to Pandora FMS Community!

Find answers, ask questions, and connect with our community around the world.

  • Time threshold

    Posted by summa_sp on December 29, 2009 at 20:05

    I am having an issue with the Max Number of Alerts functionality.

    I have a module set to run every 60 seconds, and send a Warning status if a file system fills more than 80%.  I have Min and Max number of alerts set to 1, and Time Threshold set to 15 minutes.  When the file system exceeds 80%, the alert still sends an email every 60 seconds.  Why doesn’t it wait until the Time Threshold has expired before sending another email?  I need to open a ticket automatically through email, but it opens a new ticket every 60 seconds.

    summa_sp replied 15 years, 1 month ago 3 Members · 7 Replies
  • 7 Replies
  • summa_sp

    Member
    December 29, 2009 at 20:36
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Update: The problem only happens with modules sent from the agent.  A port check done by the server will honor the Time Threshold value, but a file system check that exceeds the value on the agent does not honor the Time Threshold value.  It sends an alert each time.

  • daniels

    Member
    December 30, 2009 at 19:45
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    What version of pandora are you using?

    Check if the time interval is correct in the pandora_console in:

    View agents -> Agent Detail -> Data -> int

    The default value is 300 (in seconds). Set it to 60 and see if it works.

    Regards.

  • summa_sp

    Member
    January 3, 2010 at 20:25
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I’m using 3.0 RC2, and the time int is set to 60 seconds on the module, the agent, and the server.  I have done some more testing, and it seems to be an issue with modules configured in the agent.  A file system check sent by the agent causes an alert each time.  A network port check configured in the server works correctly. 

    It’s easy to test, just do a file system check in the agent:
    module_begin
    module_name Disk Util /var
    module_type generic_data
    module_exec df -k /var | tail -1 | tr -d “%” | awk ‘{ print $5 }’
    module_max 100
    module_min 0
    module_description /var disk util %
    module_end

    Let’s say the /var partition is 50% full. 
    Configure the module to send Warning at 45%-60%.
    Configure an alert template to send email when it receives a Warning alert.
    Set the Time Threshold to 15 minutes, the Min and Max to 1, and the default action to send only 1 alert. (On 1)

    The alert will email each time the alert fires (60 seconds), even though it is supposed to wait 15 minutes. 

  • summa_sp

    Member
    January 4, 2010 at 01:11
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    Further testing has revealed that it only seems to happen with the agent running on Solaris 10.  I have tested it with Window server 2003 and the OpenSUSE agent, and the Time Threshold works fine.  When I configure the identical alert from a Solaris 10 agent, it does not honor the Time Threshold value.

  • summa_sp

    Member
    January 4, 2010 at 01:37
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    The problem is that the alerts fires every other Interval for the agent update.  If the agent update interval is 3 minutes, I get an email ever 6 minutes, if the agent update interval is 5 minutes, I get an alert every 10 minutes, etc.  It seems like it’s not keep track of the alert state beyond one cycle.

  • Sancho

    Administrator
    January 5, 2010 at 20:48
    2321 Karma points
    Community awards: bulb Bright ideas
    Community rank: tentacle_master_icon Tentacle Master
    Like it
    Up
    0
    Down
    Drop it
    ::

    Further testing has revealed that it only seems to happen with the agent running on Solaris 10.  I have tested it with Window server 2003 and the OpenSUSE agent, and the Time Threshold works fine.  When I configure the identical alert from a Solaris 10 agent, it does not honor the Time Threshold value.

    This is probably because agent interval is set to 0 (not by you, possibly a bug), could you, plrase, post here the XML coming from this solaris agent ?.

    Thanks

  • summa_sp

    Member
    January 6, 2010 at 05:42
    0 Karma points
    Community rank: tentacle-noob-1 Tentacle noob
    Like it
    Up
    0
    Down
    Drop it
    ::

    I have narrowed the problem down to a bug with the Solaris agent, and a Time Threshold in the alert template (Step 2) of 5, 10, or 15 minutes.  If the threshold is 30 minutes or more, it works correctly.

    Here’s the scenario:
    Solaris pandora_agent.conf.  The agent reports every 60 seconds.
    module_begin
    module_name Disk Util /
    module_type generic_data
    module_exec df -k / | tail -1 | tr -d “%” | awk ‘{ print $5 }’
    module_max 100
    module_min 0
    module_description root disk utilization
    module_end

    Linux pandora_agent.conf.  The agent reports every 60 seconds.
    module_begin
    module_name disk_root_free
    module_type generic_data
    module_exec df -kh / | tail -1 | awk ‘{ print 100-$4 }’
    module_max 100
    module_min 0
    module_description Free disk Percentage of root partition
    module_end

    The Interval for both modules is 60 seconds.
    Create an alert template with the following values:
    Template Step 1
    Priority:Warning
    Condition Type: Warning status
    Template Step 2
    Time Threshold: 5 minutes
    Default Action: send an email
    Template Step 3
    Alert Recovery enabled

    Create an alert for the Solaris and the Linux modules, and use the same alert template for both. 
    Set the Warning Status min and max in each module to a range that will cause the module to send Warning status.

    Result:
    If the threshold is 5-15 minutes, Pandora will send an alert email for the Solaris agent every minute, but not for the Linux agent.  The linux agent will use the Time Threshold value correctly.  If you change the Time Threshold value in the template to 30 minutes or greater, the emails for the Solaris module will stop.  If you change it back to 5-15 minutes, they will start again.

    I have included XML data from a Solaris 10 agent and Linux (CentOS 5.4) below.  I’ve tested this problem with the Windows agent, and it works fine.

    Solaris XML

     
       
       
       
     

    Linux XML

     
       
       
       
    Â