??????Nagios???????????????
???????????? ???????[ 2013/1/22 10:42:02 ] ????????
????????????????????$ARG1$????????Nagios???????????Σ???????У??????????????????????????????????????Σ??????$ARG2$???????????Σ???$ARG3$????????????Σ?????????
???????????????????????nagios?????????????service.cfg???н????????????
define service{
use local-service
host_name localhost
service_description Check the file /etc/passwd
check_command check_file!/etc/passwd
}
?????????????????????????host_name localhost?????????????????????壨???local-service????????????????????в????http://nagios.sourceforge.net/docs/3_0/objectinheritance.html?????????????弰?????????????????????check_command?????????????check_file????????????????????????????????ε??????????????????в???????Σ??????????????????????
???????????Nagios???
???????check_file plugin??????????????????????????У?????ζ?????????????????????????????????????????????
????????????????ssh?????????д????????????????????????????????????ssh????????????????????????????Nagios??????????nagios????????????????????????????????????β???????????????http://www.techrepublic.com/blog/opensource/remotely-monitor-servers-with-the-nagios-checkbyssh-plugin/321????????е????????
???????????????????????????????????????????????????????????е?????????????????Nagios?????????????????????????????????????????????????????????????л?????á?
???????????????????????SNMP????????????????????????????????????ú???net-snmp???????????CentOS????
?????????SNMP??????????check_file.sh?????????????????????????????????y????????/usr/bin/?С?
?????????????????????extend check_passwd_file /usr/bin/check_file.sh /etc/passwd??????????????????/etc/snmp/snmpd.conf??????extend some_alias command argument???????????????????????????????????????ζ??????鶨??????????????????????ζ????????????????????????????????????????????????SNMP????????Ρ?
???????/etc/snmp/snmpd.conf??????仯???????????service snmpd reload????????CentOS???????????snmpd??????????????snmpget???????????μ??飬????snmpget -v2c -c public -OvQ 10.0.0.2 NET-SNMP-EXTEND-MIB::nsExtendOutputFull."check_passwd_file"?????????????snmpget???????SNMP?汾2c????"public"??????????????????10.0.0.2???????SNMP?????????????????OID????NET-SNMP-EXTEND-MIB::nsExtendOutputFull."some_alias"??
???????????????????????????????Nagios?????????snmpget????????????????????????????????????????0???????????涼?????????????snmpget??????????д????????????????????????????????????0???????????????????????????????
??????????????????????????????Nagios?????check_snmp_extend.sh??????????????????????????????????????????????趨??????????????????????????????????check_file.sh???趨???????????OK??????????CRITICAL????磩??WARNING?????棩??UNKNOWN??δ????????
??????????check_snmp_extend.sh???????????ò????http://www.logix.cz/michal/devel/nagios/check_snmp_extend.sh?????????????Nagios???????????/usr/lib/nagios/plugins??$USER1??????????CentOS??????????check_snmp_extend.sh??????/usr/local/nagios/libexec/utils.sh????/usr/lib/nagios/plugins/utils.sh??????utils.sh????????·????
??????????????????????κβ?????????check_snmp_extend.sh???????????????????????
define command{
command_name check_snmp_extend
command_line $USER1$/check_snmp_extend.sh $HOSTADDRESS$ $ARG1$
}
?????????????????
define service{
use generic-service
host_name somehost.example.org
service_description Check For /etc/passwd
check_command check_snmp_extend!check_passwd_file
}
???????SNMP????????????SNMP??????????????????????????????????м????????????????????????????????????????????????????????????????????Nagios?????????nrpe????????????????????????????????????????????????????????????
?????????????????????????б?д?????????Nagios??Nagios?????????????????????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11