Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/cxf210/ssl_expire

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cxf210/ssl_expire

  • v0.0.0-20210320084055-bfd0bcf9b2f5
  • Source
  • Go
  • Socket score

Version published
Created
Source

https_expire

zabbix-agent2自定义插件监控https证书过期时间

有问题可以联系微信:wanger5354

微信公众号:运维开发故事

编译安装zabbix agent2

yum install automake autoconf pcre* -y
./bootstrap.sh 
pushd . 
cd src/go/ 
go mod vendor 
popd 
./configure --enable-agent2 --enable-static 
make install

编辑配置文件

这里我调整了日志级别,方便前台调试 可选参数 Plugins.Https_expire.Timeout = 5

egrep -v "^$|^#" conf/zabbix_agent2.conf  
LogType=console
LogFile=/tmp/zabbix_agent2.log
DebugLevel=4
Server=172.17.0.5
Plugins.Https_expire.Timeout=5
Hostname=node2
ControlSocket=/tmp/agent.sock

启动Zabbix_agent2

cd /root/zabbix_agent/src/go/bin
zabbix_agent2 -c conf/zabbix_agent2.conf

image.png

Zabbix创建监控项

键值示例如下

https_expire["www.xyzabbix.cn"]

https_expire["https://www.xyzabbix.cn"]

image.png 查看最新数据,这个证书还有四十天过期 image.png 我是用的阿里云ssl证书,可以看到确实离过期时间还有四十天,今天是2021.3.7 image.png 可以创建一个触发器,在还有一个月的时候发送报警通知 image.png

FAQs

Package last updated on 20 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc