[英]Check_MK - configuring legacy check
我在Ubuntu 14.04.3 LTS機器上根據官方網站Check_MK 1.2.4p5社區版運行了最新的OMD 1.20。
我需要配置FTP檢查,該檢查還將檢查憑據和讀取/寫入文件。 標准插件沒有提供我所知道的功能,因此我嘗試使用自定義插件,特別是: https : //exchange.nagios.org/directory/Plugins/Network-Protocols/FTP/check_ftp_rw/details
因此,監視服務器應該測試未安裝代理的外部FTP服務器。 我在/ usr / lib / nagios / plugins中有插件,並且已經手動運行過,它可以正常工作。
現在,我嘗試將其配置為check_mk中的檢查,因此我在/opt/omd/sites/monitoring/etc/check_mk/main.mk中執行了以下操作
# Put your host names here
# all_hosts = [ 'localhost' ]
all_hosts = [ ]
extra_nagios_conf += r"""
define command {
command_name check_ftprw
command_line /usr/lib/nagios/plugins/check_ftp_rw --host ftp.test.com --user test --password 'test123' --dir pub
}
"""
legacy_checks = [
( ( "check_ftprw", FTP", True), [ "localhost"] ),
]
我重新啟動了omd網站並檢查了庫存,但它從沒拿過這張支票。
我已經解決了這個問題,配置正常,那么我們需要重新加載check_mk:cmk -O
然后,我們需要檢查命令是否已在check_mk_objects.cfg中注冊:
# extra_nagios_conf
define command {
command_name check_ftprw
command_line /usr/lib/nagios/plugins/check_ftp_rw --host ftp.xxx --user test --password 'test' --dir pub --file test.txt --write
}
我們可以使用以下命令檢查代理輸出:check_mk_agent
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.