def get_health_check(app, portIndex):
    """Get the healthcheck for the app."""
    checks = []
    for check in app.get('healthChecks', []):
        if check.get('port') or check.get('portIndex') == portIndex:
            checks.append(check)
    if len(checks) > 0:
        return checks
    return None