Skip to main content

Methods

Get alerts for a given application or cluster filtered by start and end timestamp

Parameters

start_ts
typing.Optional[str]
Start timestamp (ISO format) for querying events
end_ts
typing.Optional[str]
End timestamp (ISO format) for querying events
cluster_id
typing.Optional[str]
Cluster id
application_id
typing.Optional[str]
Application id
alert_status
typing.Optional[AlertStatus]
🔗 AlertStatusAlert status

Returns

GetAlertsResponse
GetAlertsResponse
🔗 GetAlertsResponseReturns an object with alert name as key and list of alerts as value

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.alerts.list(
    start_ts="value",
    end_ts="value",
    cluster_id="cluster_id_value",
    application_id="application_id_value",
    alert_status="value",
)

# Iterate through results
for item in response:
    print(item.name)

# Or paginate page by page
for page in response.iter_pages():
    for item in page:
        print(item.name)
I