check_ssl_cert是一个Nagios插件来检查X.509认证。它用于当服务器正在运行,并提供了一个有效凭证的检查,还有若CA匹配一个给定的模式和检查的正确性。
check_ssl_cert 1.10.0版本支持使用客户端证书进行身份验证。
软件信息:https://trac.id.ethz.ch/projects/nagios_plugins/wiki/check_ssl_cert
下载地址:https://trac.id.ethz.ch/projects/nagios_plugins/downloads/check_ssl_cert-1.10.0.tar.gz
使用范例:
Usage: check_ssl_cert -H host [OPTIONS]
Arguments:
-H,--host host server
Options:
-A,--noauth ignore authority warnings (expiration only)
-C,--clientcert path use client certificate to authenticate
--clientpass phrase set passphrase for client certificate
-c,--critical days minimum number of days a certificate has to be valid
to issue a critical status
-e,--email address pattern to match the email address contained in the
certificate
-f,--file file local file path (works with -H localhost only)
-h,--help,-? this help message
-i,--issuer issuer pattern to match the issuer of the certificate
-n,---cn name pattern to match the CN of the certificate
-N,--host-cn match CN with the host name
-o,--org org pattern to match the organization of the certificate
--openssl path path of the openssl binary to be used
-p,--port port TCP port
-P,--protocol protocol use the specific protocol {http|smtp|pop3|imap|ftp}
http: default
smtp,pop3,imap,ftp: switch to TLS
-s,--selfsigned allows self-signed certificates
-r,--rootcert path root certificate or directory to be used for
certficate validation
-t,--timeout seconds timeout after the specified time
(defaults to 15 seconds)
--temp dir directory where to store the temporary files
-v,--verbose verbose output
-V,--version version
-w,--warning days minimum number of days a certificate has to be valid
to issue a warning status
Deprecated options:
-d,--days days minimum number of days a certificate has to be valid
(see --critical and --warning)
关于Nagios
Nagios是一款开源的免费网络监视工具,能有效监控Windows、Linux和Unix的主机状态,交换机路由器等网络设置,打印机等。在系统或服务状态异常时发出邮件或短信报警第一时间通知网站运维人员,在状态恢复后发出正常的邮件或短信通知。
Nagios 可以监控的功能有:
1、监控网络服务(SMTP、POP3、HTTP、NNTP、PING等); 2、监控主机资源(处理器负荷、磁盘利用率等);
3、简单地插件设计使得用户可以方便地扩展自己服务的检测方法;
4、并行服务检查机制;
5、具备定义网络分层结构的能力,用"parent"主机定义来表达网络主机间的关系,这种关系可被用来发现和明晰主机宕机或不可达状态;
6、当服务或主机问题产生与解决时将告警发送给联系人(通过EMail、短信、用户定义方式);
7、具备定义事件句柄功能,它可以在主机或服务的事件发生时获取更多问题定位;
8、自动的日志回滚;
9、可以支持并实现对主机的冗余监控;
10、可选的WEB界面用于查看当前的网络状态、通知和故障历史、日志文件等;