-
Notifications
You must be signed in to change notification settings - Fork 581
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
Add check_curl to ITL #9205
Add check_curl to ITL #9205
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the documentation?
Added some documentation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have a look at the failed checks.
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Lorenz Kästle.
|
a29ef17
to
b5e1611
Compare
Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: Lorenz Kästle.
|
b5e1611
to
838c661
Compare
This would be nice as check_http is going to be removed monitoring-plugins/monitoring-plugins#1806 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following options from the man page are missing in the CheckCommand
:
--continue-after-certificate
-4
and-6
--haproxy-protocol
---cookie-jar=FILE
Furthermore, as already mentioned by @hydrapolic, if the monitoring-plugins project (or you in specific) aims to obsolete the good old check_http
plugin, please add a comment to the ITL documentation of check_http
, stating that this plugin will be deprecated and check_curl
should be used instead.
I did add those options (they were added after I opened this PR...., except for
This is slightly tricky, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following options from the man page are missing in the
CheckCommand
:* `--continue-after-certificate` * `-4` and `-6` * `--haproxy-protocol` * `---cookie-jar=FILE`
I did add those options (they were added after I opened this PR...., except for
-4
and-6
which I somehow forgot halfway)
Thanks for keeping it up to date. I know, long lived (or long ignored) PRs are keeping one's patience to the test.
Furthermore, as already mentioned by @hydrapolic, if the monitoring-plugins project (or you in specific) aims to obsolete the good old
check_http
plugin, please add a comment to the ITL documentation ofcheck_http
, stating that this plugin will be deprecated andcheck_curl
should be used instead.This is slightly tricky,
check_http
is going to be deprecated in the monitoring-plugins which is the one you get on debianish and suseish systems (and others). This is probably not true for thecheck_http
from the nagios-plugins.
Valid point. I tend to forget the multiple implementations. Maybe add a short note stating that users of the monitoring-plugins should take a look at check_curl
. My train of thought was that doing so might ease the deprecation process for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just imported the CheckCommand into a playground setup to replace the "http" CheckCommand. Thereby I experienced some issues, as commented inline. However, with the named workarounds or posted patches, it worked for me :)
Could you please rebase this PR branch against the current master. Doing so should please the CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this was my last round of comments and we can finish this long march.
Regardless of my nagging, I want to say thanks again and have even replaced the check_http
with your check_curl
for my private monitoring.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for all your work. For me, this looks good now.
@yhabteab and @Al2Klimov, you have also taken a look in the past. Thus, would at least one of you take another look?
Btw, I would suggest to "squash-and-merge" this PR, as, at least imho, not all commits are needed in the master branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The --extra-opts
option is still missing!
Edit: Apart from that why do I get this warning on Debian? WARNING: check_curl is experimental. Please use check_http if you need a stable version.
I am not quite sure how useful the monitoring plugins extra-opts are for an Icinga 2 CheckCommand, but it seems like (some) other CheckCommands are implementing those as well. icinga2/itl/command-plugins.conf Lines 1986 to 1988 in 894d6aa
Depends on your Debian package version, I guess. Unlike in https://packages.debian.org/search?keywords=monitoring-plugins I tested it with the latest |
I guess I forgot about it, since I haven't ever seen anyone use it (in any of the MP plugins). |
I thought that the check plugin returned a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fine, I guess!
http:
WARNING - Certificate 'Yonas Icinga' expires in 189 day(s) (Fri Mar 7 14:31:58 2025 +0000).
HTTP WARNING: HTTP/1.1 200 OK - 11031 bytes in 0.007 second response time |time=0.006887s;;;0.000000;10.000000 size=11031B;;;0;
curl:
WARNING - Certificate 'Yonas Icinga' expires in 189 day(s) (Fri Mar 7 14:31:58 2025 +0000).
HTTP OK: HTTP/1.1 200 OK - 11031 bytes in 0.008 second response time |time=0.007655s;;;0.000000;10.000000 size=11031B;;;0;
* Add check_curl to ITL * small fixes and boolean defaults * Add documentation for check_curl * Replace dash with underscore in variables * Add link to documentation * Change order of argument attributes to adhere to style guide * Shorten description of tls option in itl * Just remove information for check_curl options * itl - check_curl: document -4 and -6 * itl - check_curl: Add haproxy option for check_curl * itl - check_curl: add cookie-jar option * itl - check_curl: add continue_after_certificate option * itl - check_curl: replace dashes with underscores in macros * Update itl/command-plugins.conf Co-authored-by: alvar <[email protected]> * Update itl/command-plugins.conf Co-authored-by: alvar <[email protected]> * itl - check_curl: add missing option documentation and reorder options * itl - check_curl: Split certificate lifetime in two parameters * itl - check_curl: replace remaining instances of single parameter for remaining valid time * check_curl: allow assignements for host without address set * check_curl: fix typo expext -> expect * itl - check_curl: add state-regex option and documentation * Add Tls options with version and without * itl - check_curl: fix indentation * itl - check_curl: Set v4/v6 variables * itl - check_curl: Edit description for --sni * doc - check_curl: fix singular-plural typo for curl_max_redir(s) * doc/check_curl: sni description * itl - check_curl: remove superfluous brace * itl - check_curl: add extra-opts parameter --------- Co-authored-by: alvar <[email protected]>
Adding check_curl from Monitoring Plugins to the ITL