Monitoring
ptnad.api.monitoring.Problem
ptnad.api.monitoring.MonitoringStatus
ptnad.api.monitoring.Trigger
Source code in src/ptnad/api/monitoring.py
ptnad.api.monitoring.MonitoringAPI
Methods:
Name | Description |
---|---|
get_active_triggers |
Get all active triggers (triggers with status other than 'green'). |
get_status |
Get the current status. |
get_trigger_by_id |
Get a specific trigger by its ID. |
get_triggers |
Get the list of triggers. |
get_triggers_by_type |
Get all triggers of a specific type. |
Source code in src/ptnad/api/monitoring.py
get_active_triggers
Get all active triggers (triggers with status other than 'green').
Returns: List[Trigger]: A list of active Trigger objects.
Raises: PTNADAPIError: If there's an error retrieving the triggers.
Source code in src/ptnad/api/monitoring.py
get_status
Get the current status.
Returns: MonitoringStatus: An object containing the current status and any problems.
Raises: PTNADAPIError: If there's an error retrieving the status.
Source code in src/ptnad/api/monitoring.py
get_trigger_by_id
Get a specific trigger by its ID.
Args: trigger_id (str): The ID of the trigger to retrieve.
Returns: Optional[Trigger]: The Trigger object if found, None otherwise.
Raises: PTNADAPIError: If there's an error retrieving the trigger.
Source code in src/ptnad/api/monitoring.py
get_triggers
Get the list of triggers.
Returns: List[Trigger]: A list of Trigger objects.
Raises: PTNADAPIError: If there's an error retrieving the triggers.
Source code in src/ptnad/api/monitoring.py
get_triggers_by_type
Get all triggers of a specific type.
Args: trigger_type (str): The type of triggers to retrieve.
Returns: List[Trigger]: A list of Trigger objects of the specified type.
Raises: PTNADAPIError: If there's an error retrieving the triggers.