Ad Widget

Collapse

Hysteresis Trigger Flapping?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • r0k5t4r
    Member
    • Jun 2009
    • 91

    #1

    Hysteresis Trigger Flapping?

    Hi,

    I want to monitor a DCF77 USB Clock.

    Bus 002 Device 002: ID 0403:e88a Future Technology Devices International, Ltd Expert mouseCLOCK USB II

    For this I use ntpq -c cv:

    Code:
    [root@gedaspl01 ~]# ntpq -c cv
    associd=0 status=0095 , 9 events, clk_bad_date,
    device="RAW DCF77 CODE (Expert mouseCLOCK USB v2.0)", timecode="?-",
    poll=1021, noreply=0, badformat=0, baddata=5, fudgetime1=425.000,
    stratum=0, refid=GUDE, flags=0,
    refclock_time="d7fa32a3.00000000  Tue, Oct 28 2014 15:20:03.000",
    refclock_status="TIME CODE; (LEAP INDICATION; ANTENNA)",
    refclock_format="RAW DCF77 Timecode",
    refclock_states="NOMINAL: 00:42:57 (3.94%); *ILLEGAL DATE: 17:25:09 (96.05%); running time: 18:08:06"
    I use the following userparameters to just pick up the NOMINAL and ILLEGAL DATE.

    Code:
    UserParameter=ntpq.refclocknom,ntpq -c cv | awk '/refclock_states/ {print $3}' | grep -o '[0-9.]\+'
    UserParameter=ntpq.refclockill,ntpq -c cv | awk '/refclock_states/ {print $7}' | grep -o '[0-9.]\+
    '

    This gives me just the values. Now I'm trying to configure a trigger that fires whenenver the ILLEGAL values go up. Recovery should happen if the value goes down.

    I tried the following:

    Code:
    ({TRIGGER.VALUE}=0&{Template_NTP:ntpq.refclockill.last(90)}>1) |({TRIGGER.VALUE}=1&{Template_NTP:ntpq.refclockill.last(90)}<1)
    But the trigger is just flapping.

    What am I doing wrong here...
Working...