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

support for arbitrary health checks #36

Open
sawall opened this issue Dec 9, 2022 · 1 comment
Open

support for arbitrary health checks #36

sawall opened this issue Dec 9, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@sawall
Copy link
Member

sawall commented Dec 9, 2022

Operators of the service may wish to add additional endpoints to health check to roll up into the picture of signal node health. This can be expressed as a JSON string in environment variables, something like:

EXTRA_SERVICE_CHECKS={
    [
        {
            "name": "[NAME]",
            "url": "[ENDPOINT]",
            "include_contents": [boolean],
            "affect_global": [boolean]
        }, [...]
    ]
}

The URL is expected to return 200 if healthy. Any other response or failure to reach the endpoint will result in it being considered unhealthy.
The outcome of this check will be added to the "services" section of the signal report. If "name" is "prosody_egress", then:

    "services": {
        "prosody_egressHealthy": [boolean],
        "prosody_egressReachable": [boolean],
        "prosody_egressStatusCode": [int], ...
        (OPTIONAL): "prosody_egressStatusContents": [stuff]
    }

If affect_global is true, then the result of health checking this service will affect the "healthy" status in /signal/report and whether /signal/health returns a 200.

@sawall sawall added the enhancement New feature or request label Dec 9, 2022
@sawall sawall changed the title feat: support for arbitrary health checks support for arbitrary health checks Dec 9, 2022
@sawall
Copy link
Member Author

sawall commented Dec 9, 2022

This should be a refactor of all of health_collector.ts to be more generic.

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

No branches or pull requests

1 participant