Skip to content

Conversation

yansh97
Copy link

@yansh97 yansh97 commented Sep 23, 2025

Summary

#1285

  • Add BODY placeholder support for SSH endpoints to capture stdout output from remote commands
  • Enable use of existing Gatus condition features (JSONPath, pattern matching, functions) with SSH command outputs
  • Maintain backward compatibility with existing SSH endpoint configurations

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

- Modify ExecuteSSHCommand to capture stdout output
- Update SSH endpoint handling to use needsToReadBody() mechanism
- Add comprehensive test cases for SSH BODY functionality
- Support basic body content, pattern matching, JSONPath, and functions
- Maintain backward compatibility with existing SSH endpoints
- Add [BODY] placeholder to supported SSH placeholders list
- Add comprehensive examples showing various SSH BODY conditions
- Include pattern matching, length checks, JSONPath expressions
- Demonstrate function wrappers (len, has, any) usage
@TwiN TwiN changed the title Feature/ssh body placeholder support feat(client): Support body placeholder for SSH endpoints Sep 23, 2025
README.md Outdated
- "[STATUS] == 0"
```

You can also use the `[BODY]` placeholder to validate the command output:
Copy link
Owner

Choose a reason for hiding this comment

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

Please remove the two configuration examples you added, it's a bit excessive

Copy link
Author

Choose a reason for hiding this comment

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

Two examples have been removed

@yansh97
Copy link
Author

yansh97 commented Sep 24, 2025

@TwiN I've removed two configuration examples. Is there anything else that needs to be modified?

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

Successfully merging this pull request may close these issues.

2 participants