Pandora FMS community forums

Full Version: NTP Plugin
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, Would someone be able to help me out with a screen shot example of a NTP Plugin that's working? I'd like to monitor our NTP server and setup some alerts when it looses contacts with satalites. I'm using Pandora FMS Open Source 6.0. I'm a fairly new user of Pandora (6 months) but should be able to follow some more detailed instructions.

Trying to use this plugin with no success:

Any help or tips appreciated.

Thanks, Al.

Hello AusAl,

The open NTP plugin is quite simple and requires no extra configuration, just empty execution. It gets env variables, like this:

# Info about ntp actual sync source - all retrieved with one query, later it's going to be appropiately parsed
NTP_INFO=`ntpq -p | grep "*"`

# Hostname of syncing source
NTP_HOST=`echo "$NTP_INFO" | awk '{print $2}'`
# Stratum of syncing source
NTP_STRATUM=`echo "$NTP_INFO" | awk '{print $3}'`
# Roundtrip  of syncing source
NTP_ROUNDTRIP=`echo "$NTP_INFO" | awk '{print $8}'`
# Offset of syncing source
NTP_OFFSET=`echo "$NTP_INFO" | awk '{print $9}'`
# Jitter of syncing source
NTP_JITTER=`echo "$NTP_INFO" | awk '{print $10}'`

So if those variables are not set, it won't display info.
You can edit easily this plugin to use the information obtained by the command "ntpq -p" instead. Take a look at the plugin's code.

Kind regards,