WEBServer / query.execute / Result as string (OK/WARNING/...)#560
Open
Samuel-BF wants to merge 1 commit intomickem:mainfrom
Open
WEBServer / query.execute / Result as string (OK/WARNING/...)#560Samuel-BF wants to merge 1 commit intomickem:mainfrom
Samuel-BF wants to merge 1 commit intomickem:mainfrom
Conversation
With current version, /api/v1/queries/check_xxx/commands/execute returns "result" field as an int (0/1/2/...), whereas /api/v1/queries/check_xxx/commands/execute_nagios returns "result" as a string (OK/WARNING/...), like in legacy API. This modification makes the behaviour consistent by always returning the string. Note that I did not test the proposed modification.
Samuel-BF
added a commit
to Samuel-BF/check_nsc_web
that referenced
this pull request
Apr 6, 2018
Previous version fails to exit with the correct return code (1 for WARNING, 2 for CRITICAL ...). The new version fixes that point. Note that i've proposed a patch to the author of NSClient++ which also corrects the problem. (see : mickem/nscp#560 ). If the patch to NSClient++ is accepted, we should roll back to previous version.
Owner
|
As this is a breaking change to the API i think it would be prudent to create a new version right? |
Contributor
Author
|
As you like. There are no known open-source API clients relying on APIv1 yet. So it should not annoy lot of people. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With current version, /api/v1/queries/check_xxx/commands/execute returns "result" field as an int (0/1/2/...), whereas /api/v1/queries/check_xxx/commands/execute_nagios returns "result" as a string (OK/WARNING/...), like in legacy API.
This modification makes the behaviour consistent by always returning the string.
Note that I did not test the proposed modification.