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

http check doesn't map the critical ssl certificate age option #5610

Closed
ghost opened this issue Sep 22, 2017 · 6 comments · Fixed by #5913
Closed

http check doesn't map the critical ssl certificate age option #5610

ghost opened this issue Sep 22, 2017 · 6 comments · Fixed by #5913
Labels
area/documentation End-user or developer help area/itl Template Library CheckCommands
Milestone

Comments

@ghost
Copy link

ghost commented Sep 22, 2017

The http check

https://www.icinga.com/docs/icinga2/latest/doc/10-icinga-template-library/#http

doesn't map the optional critical ssl certificate age option and sets it automatically to 0.

E.g. it is not possible to write

http_certificate = [ 40,10 ]

or

http_certificate_warning = 40
http_certificate_critical = 10

or ..?

The check_http command has the optional second option

-C <warn_age>[,<crit_age>]

https://www.monitoring-plugins.org/doc/man/check_http.html

I could provide a patch after I'll get more configuration language knowledge but maybe somebody else has an instant idea how to include it.

@mcktr
Copy link
Member

mcktr commented Sep 22, 2017

You can set the warning and critical age option through http_certificate, following the syntax http_certificate = "<warn age>,<crit age>" e.g. http_certificate = "30,10".

@ghost
Copy link
Author

ghost commented Sep 22, 2017

Thanks.
You're right. That works but is not documented at the moment.

@mcktr
Copy link
Member

mcktr commented Sep 22, 2017

The http_certificate attribute is documented or did you mean that the documentation should provide an example for this attribute?

@ghost
Copy link
Author

ghost commented Sep 22, 2017

The documentation says

_http_certificate Optional.

Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed._

At least the second optional (critical) option isn't mentioned so I had to check the source code to find out how it could work.

@mcktr
Copy link
Member

mcktr commented Sep 22, 2017

Got it, thanks for the clarification. :)

Do you mean a simple example is enough like http_certificate = "30,10" or do you think this needs more explanation?

@ghost
Copy link
Author

ghost commented Sep 22, 2017

Maybe something like that

Optional. Minimum number of days a certificate has to be valid. First parameter defines warning threshold in days. Optional second parameter defines critical threshold in days. Example 40 or "40, 20".

Of course it could be polished a little bit. ;)

@dnsmichi dnsmichi added area/documentation End-user or developer help area/itl Template Library CheckCommands labels Sep 25, 2017
mcktr added a commit to mcktr/icinga2 that referenced this issue Dec 22, 2017
This clarifies the usage of the http_certificate parameter.

refs Icinga#5610
mcktr added a commit to mcktr/icinga2 that referenced this issue Dec 22, 2017
This clarifies the usage of the http_certificate parameter.

refs Icinga#5610
@dnsmichi dnsmichi added this to the 2.8.3 milestone Apr 19, 2018
dnsmichi pushed a commit that referenced this issue Apr 19, 2018
This clarifies the usage of the http_certificate parameter.

refs #5610

refs #5913
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/documentation End-user or developer help area/itl Template Library CheckCommands
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants