Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wishlist: specify IP address for checkcert_ssl #12

Open
mgedmin opened this issue Oct 21, 2015 · 2 comments
Open

Wishlist: specify IP address for checkcert_ssl #12

mgedmin opened this issue Oct 21, 2015 · 2 comments

Comments

@mgedmin
Copy link
Member

mgedmin commented Oct 21, 2015

Sometimes I want to make sure that the SSL certificate for example.com installed in the local Apache is up-to-date, even if example.com's DNS points to a different server. E.g. this is a backup host, or there's a DNS round-robin, or IP anycast.

@mgedmin
Copy link
Member Author

mgedmin commented Oct 21, 2015

The implementation is

checkcert() {
    info_check checkcert "$@"
    local server="$1"
    local days="${2:-${CHECKCERT_WARN_BEFORE:-60}}"
    local output="$(/usr/lib/nagios/plugins/check_http -C "$days" -H "$server" --sni 2>&1)"

If I could pass additional arguments to check_http, I could use -I <ipaddr>.

@mgedmin
Copy link
Member Author

mgedmin commented Oct 21, 2015

I thought maybe I could use checkweb as a workaround, but nope:

$ checkweb -C 30 eversheds.compass360.net
[red]+ checkweb -C 30 eversheds.compass360.net[/red]
OK - Certificate 'eversheds.compass360.net' will expire on 05/14/2017 23:59.

checkweb expects HTTP OK and assumes OK means an error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant