check_https_go
Icinga/Nagios plugin, checks that a site returns a 2xx-series status code
, returns content
, and has a valid certificate
.
Golang Icinga/Nagios HTTPS Checker
Icinga/Nagios plugin, checks that a site returns a 2xx-series status code
, returns content
, and has a valid certificate
.
User configurable warning
and critical
levels for the number of days left in the certificate validity period.
Installation and requirements
The pre-compiled binaries available on the releases page are self-contained and have no dependancies to run.
If you wish to compile it yourself, you'll need to install go
and make
. It's been tested on:
- Golang 1.20.3
- GNU Make 4.2.1
It'll probably build just fine on many other versions. To build, simply run make
:
make # Make all builds
make linux # Make linux binary
make windows # Make windows binary
make macos # Make macOS binary
You can run make help
for additional options.
Usage
usage:
required
-h string
Fully-qualified domain name to check.
optional
-w int
Number of days for which the TLS certificate must be valid before a warning state is returned. (default 10)
-c int
Number of days for which the TLS certificate must be valid before a critical state is returned. (default 5)
-t
Timeout length in seconds, requests that do not finish before timeout are considered failed. (default 30)
-v
Verbose output
-r int
Number of redirects to follow (will follow 301s, 302s, & 307s).
-u string (default=check_https_go)
Custom user-agent string.
Version history
1.2—Follow Redirect feature now handles 307s 1.1—Added configurable timeout. Default remains at 30, but you can now increase or decrease this.
License
Golang Icinga/Nagios HTTPS Checker is licensed under the terms of the GNU General Public License Version 3.