ntp

package
v0.0.0-...-5655933 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: MIT Imports: 6 Imported by: 0

README

ntp

ntp 插件用于计算时间偏移。生产环境所有的机器,都应该是一致的时间,如果有些机器时间滞后,有些机器时间超前,在一些分布式系统中会是非常严重的问题。所有的大型互联网公司,一定会在机器交付给业务方之前,就由系统运维人员统一做好了时间调整,并启用 ntpd 或 chrony

监控手段

监控机器时间偏移量,只需要给出 ntp 服务端地址,Categraf 就会周期性去请求,对比本机时间,得到偏移量,监控指标是 ntp_offset_ms 顾名思义,单位是毫秒,一般这个值不能超过 1000

监控规则

该 README 所在目录的同级目录下有 alerts.json 就是告警规则,导入夜莺即可使用

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NTPStat

type NTPStat struct {
	config.PluginConfig
	NTPServers []string `toml:"ntp_servers"`
	// contains filtered or unexported fields
}

func (*NTPStat) Clone

func (n *NTPStat) Clone() inputs.Input

func (*NTPStat) Gather

func (n *NTPStat) Gather(slist *types.SampleList)

func (*NTPStat) Init

func (n *NTPStat) Init() error

func (*NTPStat) Name

func (n *NTPStat) Name() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL