⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 obsessive_svc_handler

📁 Nagios is a powerful host and service monitoring program designed to run on most *NIX systems. It is
💻
字号:
#!/bin/sh# OBSESSIVE_SVC_HANDLER# Written by Ethan Galstad (nagios@nagils.org)# Last Modified: 07-19-2001## This script is intended to run as the OCSP command# on a distributed monitoring server.  The script calls# submit_check_result_via_nsca to send the service check# results to the central monitoring server.## Arguments:#  $1 = host_name (Short name of host that the service is#       associated with)#  $2 = svc_description (Description of the service)#  $3 = state_string (A string representing the status of#       the given service - "OK", "WARNING", "CRITICAL"#       or "UNKNOWN")#  $4 = plugin_output (A text string that should be used#       as the plugin output for the service checks)## Location of the submit_check_result_via_nsca scriptSubmitCmd="/usr/local/nagios/libexec/eventhandlers/submit_check_result_via_nsca"# Convert the state string to the corresponding return codereturn_code=-1case "$3" in	OK)		return_code=0		;;	WARNING)		return_code=1		;;	CRITICAL)		return_code=2		;;	UNKNOWN)		return_code=3		;;esac# Send the service check results to the central monitoring server$SubmitCmd "$1" "$2" $return_code "$4"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -