From 0ffd3538747a1d631111b69b68388ad33960641b Mon Sep 17 00:00:00 2001 From: Pavel Muhortov Date: Sat, 26 Aug 2023 11:28:03 +0300 Subject: [PATCH] added cert-info example usage --- README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 194974f..947d786 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ ____ | 2 |**[-f]**|print of the fingerprint|| | 2 |**[-r]**|print of the remaining days|| -Example usage in terminal with make the script executable: +### `Example usage in terminal with make the script executable` ```bash # download @@ -68,13 +68,41 @@ cert-info.sh www.hmp.today cert-info.sh /etc/ssl/certs/ca-certificates.crt ``` -Example usage in terminal without download: +### `Example usage in terminal without download` ```bash bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today bash <(wget -qO- https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today ``` +### `Example usage in Zabbix` + +```bash +# download +sudo wget https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh -O /usr/lib/zabbix/externalscripts/cert-info.sh +sudo chmod +x /usr/lib/zabbix/externalscripts/cert-info.sh +``` + +`Zabbix Server` - `Administration` - `Scripts` - `Create scripts` +| PARAMETER | VALUE | +|-----------|--------------| +|Name |Check SSL certificate| +|Scope |Manual host action| +|Type |Script| +|Execute on |Zabbix server (proxy)| +|Commands |/usr/lib/zabbix/externalscripts/cert-info.sh {$URL}| +|Description|Load certificate info from {$URL} host macro| +`Add` + +`Zabbix Server` - `Configuration` - `Hosts` - `"hostname"` - `Macros` - `Add` +| PARAMETER | VALUE | +|-----------|--------------| +|Macro |{$URL}| +|Value |hostname:port| +`Update` + +`Zabbix Server` - `Monitoring` - `Hosts` - `"hostname"` - `Check SSL certificate` + ____ ## `sendmail`.py