epicsarchiver.statistics.models.stat_responses
Data structures for the statistics endpoints from the archiver.
Attributes
Classes
List of reasons why a PV could be dropping events. |
|
Base class for responses from the archiver statistical endpoints. |
|
Response from the endpoints in DroppedReason. |
|
Response from getCurrentlyDisconnectedPVs. |
|
Return a list of PVs sorted by the timestamp of the last event received. |
|
Connection status enum. |
|
Return a list of PVs sorted by the no. of connection drops. |
|
Return a list of PVs sorted by the no. of connection drops. |
|
Response of pvs archived in two archivers. |
|
Response of pvs paused. |
|
Represents if a pv is configured in gitlab, channelfinder or archived only. |
|
Response of pvs archived but not in configuration files. |
|
Minimal info on an Ioc. |
|
Response of pvs paused. |
Functions
|
Calculate a datetime.datetime from the possible input strings of the archiver. |
Module Contents
- class epicsarchiver.statistics.models.stat_responses.DroppedReason[source]
-
List of reasons why a PV could be dropping events.
Includes the endpoints in the archiver corresponding to the reason.
- class epicsarchiver.statistics.models.stat_responses.BaseStatResponse[source]
Base class for responses from the archiver statistical endpoints.
- class epicsarchiver.statistics.models.stat_responses.DroppedPVResponse[source]
Bases:
BaseStatResponseResponse from the endpoints in DroppedReason.
- dropped_reason: DroppedReason[source]
- classmethod from_json(json: dict[str, str], dropped_reason: DroppedReason) DroppedPVResponse[source]
Convert to DroppedPVResponse from dictionary generated from json.
- Parameters:
dropped_reason (DroppedReason) – Input reason for events being dropped
- Returns:
The corresponding DroppedPVResponse
- Return type:
- epicsarchiver.statistics.models.stat_responses._DATE_FORMAT_OFFSET = '%b/%d/%Y %H:%M:%S %z'[source]
- epicsarchiver.statistics.models.stat_responses._DATE_FORMAT_TIMEZONE = '%b/%d/%Y %H:%M:%S %Z'[source]
- epicsarchiver.statistics.models.stat_responses.parse_archiver_datetime(datetime_str: str) datetime.datetime | None[source]
Calculate a datetime.datetime from the possible input strings of the archiver.
- Parameters:
datetime_str (str) – Either “%b/%d/%Y %H:%M:%S %z”, “Never”, “” or “%b/%d/%Y %H:%M:%S %Z”
- Returns:
Datetime representation
- Return type:
datetime.datetime | None
- class epicsarchiver.statistics.models.stat_responses.DisconnectedPVsResponse[source]
Bases:
BaseStatResponseResponse from getCurrentlyDisconnectedPVs.
Example:
{ "hostName": "N/A", "connectionLostAt": "Sep/14/2023 16:00:18 +02:00", "pvName": "HCB-ACH:ODH-O2iM-1:O2Level", "instance": "sw-vm-11", "commandThreadID": "6", "noConnectionAsOfEpochSecs": "1694700018", "lastKnownEvent": "Aug/25/2023 15:38:17 +02:00" }
- connection_lost_at: datetime.datetime | None[source]
- last_known_event: datetime.datetime | None[source]
- class epicsarchiver.statistics.models.stat_responses.SilentPVsResponse[source]
Bases:
BaseStatResponseReturn a list of PVs sorted by the timestamp of the last event received.
Example:
{"pvName":"DTL-030:SC-IOC-002:CA_CLNT_CNT","instance":"archiver-linac-01","lastKnownEvent":"Never"}
- last_known_event: datetime.datetime | None[source]
- class epicsarchiver.statistics.models.stat_responses.ConnectionStatus(*args, **kwds)[source]
Bases:
enum.EnumConnection status enum.
- Parameters:
enum (int) – Placement of enum.
- class epicsarchiver.statistics.models.stat_responses.LostConnectionsResponse[source]
Bases:
BaseStatResponseReturn a list of PVs sorted by the no. of connection drops.
Example:
{ "currentlyConnected": "Yes", "pvName": "MBL-010LWU:Vac-VPN-10000:IonCurR", "instance": "archiver-linac-01", "lostConnections": "2586" }
- currently_connected: ConnectionStatus[source]
- class epicsarchiver.statistics.models.stat_responses.StorageRatesResponse[source]
Bases:
BaseStatResponseReturn a list of PVs sorted by the no. of connection drops.
Example:
{ "pvName": "TS2-010CRM:EMR-XRS-001:mca1", "storageRate_MBperDay": "1099.2894956029622", "storageRate_KBperHour": "46903.01847905972", "storageRate_GBperYear": "391.8365877881653" }
- class epicsarchiver.statistics.models.stat_responses.BothArchiversResponse[source]
Bases:
BaseStatResponseResponse of pvs archived in two archivers.
- class epicsarchiver.statistics.models.stat_responses.PausedPVResponse[source]
Bases:
BaseStatResponseResponse of pvs paused.
- class epicsarchiver.statistics.models.stat_responses.ConfiguredStatus[source]
-
Represents if a pv is configured in gitlab, channelfinder or archived only.
- class epicsarchiver.statistics.models.stat_responses.NoConfigResponse[source]
Bases:
BaseStatResponseResponse of pvs archived but not in configuration files.
- configured_status: ConfiguredStatus[source]
- class epicsarchiver.statistics.models.stat_responses.NameCheckResponse[source]
Bases:
BaseStatResponseResponse of pvs paused.