added cert-info example usage

This commit is contained in:
Pavel Muhortov 2023-08-26 11:28:03 +03:00
parent 0d06aee062
commit 0ffd353874

View File

@ -57,7 +57,7 @@ ____
| 2 |**[-f]**|print of the fingerprint|| | 2 |**[-f]**|print of the fingerprint||
| 2 |**[-r]**|print of the remaining days|| | 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 ```bash
# download # download
@ -68,13 +68,41 @@ cert-info.sh www.hmp.today
cert-info.sh /etc/ssl/certs/ca-certificates.crt cert-info.sh /etc/ssl/certs/ca-certificates.crt
``` ```
Example usage in terminal without download: ### `Example usage in terminal without download`
```bash ```bash
bash <(curl -s https://git.hmp.today/pavel.muhortov/utils/raw/branch/master/cert-info.sh) www.hmp.today 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 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 ## `sendmail`.py