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

Fix ITL for http CheckCommand definition #9974

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

tbauriedel
Copy link
Member

There were some missing arguments.
CheckCommand definition adapted to the current status of the plugin.

ref/NC/806131

@julianbrost
Copy link
Contributor

@Al2Klimov FYI: looks like there's a problem with the AUTHORS file workflow, possibly related to the PR coming form an external repo.

@Al2Klimov Al2Klimov self-assigned this Jan 22, 2024
@Al2Klimov Al2Klimov removed their assignment Jan 22, 2024
@Al2Klimov Al2Klimov added the area/itl Template Library CheckCommands label Mar 11, 2024
@Al2Klimov Al2Klimov added this to the 2.15.0 milestone Mar 11, 2024
@tbauriedel
Copy link
Member Author

Any updates here?

@@ -423,8 +427,13 @@ object CheckCommand "http" {
}
"-C" = {
value = "$http_certificate$"
description = "Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed."
description = "Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed . produces unnecessary diffs, please revert it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the "description syntax" be unique? The sentences end without a '.' in the other arguments.
I can remove it, but then it will never be standardized.

description = "Minimum number of days a certificate has to be valid. This parameter explicitely sets the port to 443 and ignores the URL if passed"
}
"--continue-after-certificate" = {
value = "$http_certificate_continue$"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this option is a boolean flag, please use set_if instead of value. Icinga 2 will then only pass this argument if it is explicitly set to true.

}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant empty line!

Comment on lines 524 to 527
"-U" = {
value = "$http_showurl$"
description = "Print URL in msg output in plain text"
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get that option from? As far as I can see, there is no such option listed in the plugin documentation.

@@ -360,6 +360,10 @@ object CheckCommand "http" {
value = "$http_vhost$"
description = "Host name argument for servers using host headers (virtual host)"
}
"--extra-opts" = {
value = "$http_extra_opts$"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This option should probably use set_if as well, as there is no need to look for extra options if not explicitly requested by the user.

@tbauriedel tbauriedel requested a review from yhabteab May 15, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/itl Template Library CheckCommands cla/signed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants