Pandora FMS community forums
NTP Plugin - Printable Version

+- Pandora FMS community forums (http://pandorafms.org/forum)
+-- Forum: Pandora FMS (http://pandorafms.org/forum/forum-3.html)
+--- Forum: General monitoring discussion (http://pandorafms.org/forum/forum-6.html)
+--- Thread: NTP Plugin (/thread-7936.html)



NTP Plugin - AusAl - 02-22-2016

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:
http://library.pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=531

Any help or tips appreciated.

Thanks, Al.




Re: NTP Plugin - antonio - 03-17-2016

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,
Antonio.