Skip to content

Commit

Permalink
Merge pull request #22 from pavelkim/dev
Browse files Browse the repository at this point in the history
[Change] More notes in readme. Header with common info in the script.
  • Loading branch information
pavelkim authored Nov 18, 2022
2 parents a93f144 + 7039b42 commit 10f0a48
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.3
1.6.4
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ google.com
# Prometheus metrics
The script can generate a file with Prometheus metrics that is to be served by an external web server (eg. nginx or httpd).
The script can generate a static file with Prometheus metrics that is to be served by an external web server (eg. nginx or httpd).
Use `-G` or `--generate-metrics` parameters to enable this feature.
Expand All @@ -112,6 +112,8 @@ check_certificates_expiration{domain="imaginary-domain-9000.com"} -1
## nginx configuration example
Note: if you're running your nginx in a container, make sure your metrics file is accessable for nginx within the container (use volumes or something).
```nginx
server {
Expand Down Expand Up @@ -197,5 +199,6 @@ The script executed as displayed above will return 0 in case if `example.com` ha
Currently tested on the following platforms:
1. CentOS 7, bash 4.2.46, openssl 1.0.2k
1. CentOS 8, bash 4.4.19, openssl 1.1.1c
2. Mac OS 10.13.6, bash 3.2.57, openssl 1.1.1d
2. CentOS 8, bash 4.4.19, openssl 1.1.1c
3. Mac OS 10.13.6, bash 3.2.57, openssl 1.1.1d
4. Mac OS 12.5, bash 5.1.16, OpenSSL 3.0.7
27 changes: 27 additions & 0 deletions check_certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,33 @@
# shellcheck disable=SC2015
#
# Checks if SSL Certificate on https server is valid.
# ===================================================
#
# Use this script to automate HTTPS SSL Certificate monitoring.
# It curl's remote server on 443 port and then checks remote
# SSL Certificate expiration date. You can use it with Zabbix,
# Nagios/Icinga or other.
#
# GitHub repository:
# https://github.com/pavelkim/check_certificates
#
# Community support:
# https://github.com/pavelkim/check_certificates/issues
#
# Copyright © 2022, Pavel Kim
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

set -o pipefail
Expand Down

0 comments on commit 10f0a48

Please sign in to comment.