Nrpe windos系统启动时间监控,指定报警阀值

alex 监控文档 默认评论阅读模式

在安装完NSCLient+++后 系统自带了N多的监控指令,这里大家可能熟悉的 check_nt 调用的相关

 
 

今天介绍隐藏的check_uptime指令,当然如果要用这个指令,必须保证check_nrpe可以正常访问。还要配置NSCLient+++运行参数传递

 
 

allow arguments=true

 
 

大家应该都知道,通过check_nt方式监控windos启动时间是无法报警的,任何时候都是OK状态,而使用check_nrpe就可以的

 
 

下面查看效果,不需要额外的配置,安装完就有

Nrpe windos系统启动时间监控,指定报警阀值-图片1

 
 

自定义报警

[root@nagios libexec]# ./check_nrpe -H 172.19.1.153 -c check_uptime -a "critical=uptime gt 1h"

[root@nagios libexec]# ./check_nrpe -H 172.19.1.153 -c check_uptime -a "critical=uptime lt 1h"

Nrpe windos系统启动时间监控,指定报警阀值-图片2

 
 

当然还可以多条件组合监控,比如修改显示输出内容,总之功能是相当的强悍,希望对大家有用

[root@nagios libexec]# ./check_nrpe -H 172.19.1.153 -c check_uptime -a "warning=uptime lt 2h" "critical=uptime lt 5h" "detail-syntax=serverA System uptime Check "

 
 

Nrpe windos系统启动时间监控,指定报警阀值-图片3

 
 

剩下向Nagios添加就不再多说了

 
 

单位支持,默认为秒

s秒

m分钟

h 小时

d 天

w 周

 
 

 
 

 
 

详细的帮助信息

Help 帮助信息

help Show help screen (this screen)

help-pb Show help screen as a protocol buffer payload

show-default Show default values for a given command

help-short Show help screen (short format).

debug Show debugging information in the log

show-all Show debugging information in the log

filter=ARG Filter which marks interesting items.

Interesting items are items which will be included in

the check.

They do not denote warning or critical state but they

are checked use this to filter out unwanted items.

Available options:

 

Key        Value

boot        System boot time

uptime        Time since last boot

count        Number of items matching the filter

total         Total number of items

help-short 帮助信息

help                                                        Show help screen (this screen)

help-pb                                                 Show help screen as a protocol buffer payload

show-default                                                Show default values for a given command

help-short                                                Show help screen (short format).

debug                                                        Show debugging information in the log

show-all                                                Show debugging information in the log

filter=                                                 Filter which marks interesting items.

warning=uptime < 2d                                        Filter which marks items which generates a warning state.

warn=                                                        Short alias for warning

critical=uptime < 1d                                        Filter which marks items which generates a critical state.

crit=                                                        Short alias for critical.

ok=                                                        Filter which marks items which generates an ok state.

empty-state=ignored                                        Return status to use when nothing matched filter.

perf-config=                                                Performance data generation configuration

top-syntax=${status}: ${list}                                Top level syntax.

ok-syntax=                                                ok syntax.

empty-syntax=                                                Empty syntax.

detail-syntax=uptime: ${uptime}h, boot: ${boot} (UTC)        Detail

 
 

 
 

文章末尾固定信息

 
alex
  • 本文由 alex 发表于 2017年7月6日 16:09:25
  • 转载请务必保留本文链接:https://www.qnjslm.com/ITHelp/173.html
匿名

发表评论

匿名网友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:
确定