DX Unified Infrastructure Management

 View Only
Expand all | Collapse all

NTP Response Probe

  • 1.  NTP Response Probe

    Posted Nov 18, 2009 03:58 PM
    Hi Has anyone had experience in using the NTP Response Probe?

    I have 2 NTP Servers  Peer to Peer

    I have 20 Redhat & Windows 200x Servers,

    Do I deploy the probes on all 20  point to the 2 ntp servers or the other way round...

    Kind Regards

    Steve




  • 2.  NTP Response Probe

    Posted Nov 18, 2009 06:18 PM
    Steve,

    The probe monitors NTP servers by connecting to them over the network, so you should install it on other hosts.  You probably do not want/need to install it on all 20 servers though.  You certainly could do that; it depends on your goal.
    • If you just want to make sure the 2 NTP servers are functioning, you can pick 1 or a few hosts to run the probe and monitor both NTP servers from those hosts.  It should be sufficient to run the probe on 1 host, but you can do more for redundancy when that server goes down.
    • If you want to make sure the 2 NTP servers are reachable from every host, you can install the probe on all of them.  This has the potential to add load to the NTP servers, but I think you would be fine with 20 probes.  (I would definitely not install the probe on 2000 hosts.)
    We just started using the probe on a limited basis a few months ago, and I do not think we have had any issues with it so far.

    -Keith


  • 3.  NTP Response Probe

    Posted Nov 18, 2009 08:48 PM
    Hi Keith,

    I need to confirm that my local clock time for each server is in sync with NTP, so I get warned or alerted when it is not.

    Basically I want to monitor if the a server seems to start lagging for an unknown reason...

    All the best

    Steve


  • 4.  NTP Response Probe

    Posted Nov 18, 2009 10:59 PM
    Steve,

    That is not what the probe is designed to do.  If you look at the release note, you will see that its purpose is to monitor NTP servers.

    You could probably achieve that result by setting up each of your 20 servers as an NTP server; they can continue to get their time from the true NTP servers and would just be considered a lower stratum.  I would guess that if a server were out of sync with the true NTP servers, the response to the probe would indicate that.  You may want to test to verify.

    Otherwise, you probably have to script it.  It would probably be fairly easy to check the output of the ntpq command on Linux.  I am not sure how you would do it on Windows though.

    -Keith


  • 5.  RE: NTP Response Probe

    Posted Oct 16, 2019 05:14 AM
    Hi,
    Does this mean that ntp probe can't provide me offset ?


  • 6.  RE: NTP Response Probe

    Posted Oct 16, 2019 05:16 AM
    --->
    /usr/sbin/ntpq -p | grep '*' | /bin/awk '{print $9}'


  • 7.  NTP Response Probe

    Posted Nov 20, 2009 09:59 PM
    Quote: (kruepke@berbee.com)
    Steve,

    That is not what the probe is designed to do.  If you look at the release note, you will see that its purpose is to monitor NTP servers,

    (thanks I did look at the release notes, I didn't word my thread brilliantly)


    Otherwise, you probably have to script it.  It would probably be fairly easy to check the output of the ntpq command on Linux.  I am not sure how you would do it on Windows though. (that's my next challenge cygwin maybe?)

    -Keith

    FYI

    Here's a customize Linux script not all my own work I hasten to add

    #!/bin/bash
    # time-offset_check.sh
    #
    # Checks computer clock against specified NTP server. Issues a warning
    # on stdout, if the time difference exceeds limit.  Requires ntpdate, bc
    # and egrep in path. Run from cron as often as you like.

    ### Options

    TIMEZONE=`date | awk '{ print$5 }'`
    NTPSERVER='10.17.0.80'   # i.e. random server from pool.ntp.org
    LIMIT='150.000000'           # i.e. 1.000000 (= 1 second)
    LOCALTIMEZONE='GMT'
    ### Do not edit

    OFFSET=`/usr/sbin/ntpdate -q $NTPSERVER \
            | egrep -o -m 1 -e "offset ((-)?+\.+)" \
            | egrep -o -e "+\.+"`

    RESULT=`echo "$OFFSET >= $LIMIT" | bc`

    if  ]; then
            echo "`date "+%b %d %H:%M:%S"` `hostname` Warning: Local clock offset ($OFFSET) larger than limit ($LIMIT) - Check NTPD" >> /var/log/messages
    fi


    if  ]; then
        echo "`date "+%b %d %H:%M:%S"` `hostname` Warning: Local Time Zone is not set to GMT - Check /etc/sysconfig/clock or /etc/localtime" >> /var/log/messages
    fi

    exit 0


    Thanks for clarifying the ntp_response probe



  • 8.  NTP Response Probe

    Posted Nov 21, 2009 04:09 AM
    Steve,

    Nice work.  You may already be aware of this, but you can generate an alarm from your script using this command:
    /opt/nimbus/bin/nimalarm
    (Running it without options produces a usage message that gives the syntax and options.)

    I am not sure if there is any advantage for you to be able to generate an alarm over generating a syslog message, but if there is, it is easy to do!  You can even use the nimalarm command to clear an open alarm by using the same suppression key (a.k.a. checkpoint ID) and a severity of 0.

    -Keith


  • 9.  Re: NTP Response Probe

    Posted Jul 06, 2018 05:33 AM

    Hi Keith,

     

    Our Requirement is to monitor whether clients(UIM robots) are properly synced with NTP server or not.

     

    have doubt on below, 

     

    you can generate an alarm from your script using this command:

    /opt/nimbus/bin/nimalarm

    --> Can this generate alarm in UIM?

     

     

     

     

    -Pavan



  • 10.  Re: NTP Response Probe

    Broadcom Employee
    Posted Jul 08, 2018 11:35 PM

    Hi, Pavan.

    You are correct. nimalarm utility generates alarm in UIM.



  • 11.  Re: NTP Response Probe
    Best Answer

    Posted Jul 13, 2018 07:58 AM

    Hi Pavan,

     

    please note that the recommended way to perform this ntp check would be to use the logmon probe and NOT the nimalarm command.

    The reason ist that the nimalarm command is not generating alarms that are tied to a device. That means the alarms will be visible in USM only behind the "alarm clock" icon and not on the devices or groups. 

    The alarm will however be visible as usual in the Infrastructure Manager alarm console.

     

    -chris