[PYTHON] [blackbird-ntp] Monitor ntpq information (offset, jitter, etc.) with blackbird

blackbird ntp plugin

This plugin gets various information from the output of ntpq and sends the data to the backend.

ntp1.png

ntp2.png

ntp3.png

Items to be acquired

Detects the server that is in reference synchronization with the ntp server from the output of ntpq -c peer Trigger goes up if no server is synced by reference

result of ntpq


     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*10.0.0.1        133.243.238.243  2 u   52   64  377    0.489    0.066   0.388
+10.0.0.2        133.243.238.163  2 u   54   64  377    0.505   -0.007   6.133

In this case, 10.0.0.1 is reference-synchronized, so get the various values in the line 10.0.0.1.

does not get when

Install

blackbird body

Please install by referring to here

Install ntp plugin

You can either use setup.py or rpm.

install with setup.py

git clone https://github.com/Vagrants/blackbird-ntp.git
cd blackbird-ntp
python setup.py install

install with rpm

yum install blackbird-ntp --enablerepo=blackbird

ntpq required

This blackbird-ntp internally executes / usr / sbin / ntpq If you don't have the ntpq binary, enter it

(If you make the ntp protocol speak from python, you don't need ntpq, but you may do it sooner or later)

Set plugin

config is in /etc/blackbird/conf.d/ntp.cfg

ini:/etc/blackbird/conf.d/ntp.cfg


[ntp]
module = 'ntp'

# ntpq path
# Default is '/usr/sbin/ntpq'
#
#path = /usr/sbin/ntpq

# ntpq target server
#
#host = 127.0.0.1

# ntpq timeout (ms)
#
#timeout = 1000

If the path of ntpq is different, please change it. You can also monitor remote servers by setting host

The default monitoring interval is 60 seconds (discovery is 600 seconds), but if you want to change it,

ini:/etc/blackbird/conf.d/fio_status.cfg


interval = 30
lld_interval = 300

Please specify as

Reboot blackbird when you're done

sudo /etc/init.d/blackbird restart

Check if data is coming in on Zabbix

Zabbix Templates can be found in the github repository Please import to Zabbix and apply to the target server

** If the host name on Zabbix and the host name of the server on which blackbird is running are different, you need to set the hostname on /etc/blackbird/conf.d/ntp.cfg ** Please match with Zabbix

ini:/etc/blackbird/conf.d/ntp.cfg


hostname = your_static_hostname

Other

Zabbix doesn't have a good way to monitor time synchronization right now. I can monitor if the time is different from Zabbix Server with agent.

Recommended Posts

[blackbird-ntp] Monitor ntpq information (offset, jitter, etc.) with blackbird
[blackbird-redis] Monitor Redis with blackbird
[blackbird-rabbitmq] Monitor rabbitmq with blackbird
[blackbird-nginx] Monitor Nginx with blackbird
[blackbird-aerospike] Monitor Aerospike with blackbird
[blackbird-xfs] Monitor xfs with blackbird
[blackbird-mysql] Monitor mysql with blackbird
[blackbird-memcached] Monitor Memcached with blackbird
[blackbird-fio-status] Monitor ioDrive (Fusion-IO) with blackbird
[blackbird-named] Monitor Bind (named) with blackbird