ariel-facility 0.17.4__py3-none-any.whl → 0.18.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ariel_facility-0.18.0.dist-info/METADATA +106 -0
- {ariel_facility-0.17.4.dist-info → ariel_facility-0.18.0.dist-info}/RECORD +4 -4
- ariel_facility-0.17.4.dist-info/METADATA +0 -15
- {ariel_facility-0.17.4.dist-info → ariel_facility-0.18.0.dist-info}/WHEEL +0 -0
- {ariel_facility-0.17.4.dist-info → ariel_facility-0.18.0.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ariel-facility
|
|
3
|
+
Version: 0.18.0
|
|
4
|
+
Summary: Extract HK from MySQL Facility Database for Ariel
|
|
5
|
+
Author: IVS KU Leuven
|
|
6
|
+
Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
|
|
7
|
+
License-Expression: MIT
|
|
8
|
+
Keywords: Ariel,facility,hardware testing,housekeeping,software framework
|
|
9
|
+
Requires-Python: >=3.10
|
|
10
|
+
Requires-Dist: cgse-common
|
|
11
|
+
Requires-Dist: cgse-core
|
|
12
|
+
Requires-Dist: cgse-gui
|
|
13
|
+
Requires-Dist: crcmod>=1.7
|
|
14
|
+
Requires-Dist: mysql-replication
|
|
15
|
+
Requires-Dist: pyserial>=3.5
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
|
|
18
|
+
# Extraction of HK from the MySQL Facility Database
|
|
19
|
+
|
|
20
|
+
During the Ariel TA test campaign at CSL, facility (and potentially other) housekeeping data will be stored in the MySQL
|
|
21
|
+
facility database. To store (housekeeping) data in a consistent way across devices/processes and to enable quick-look
|
|
22
|
+
analysis (e.g. via Grafana dashboards), we want to extract the data from the MySQL facility database and ingest it
|
|
23
|
+
into our TA-EGSE framework.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Database Structure
|
|
28
|
+
|
|
29
|
+
The structure of the MySQL facility database is as follows:
|
|
30
|
+
|
|
31
|
+
- Each sensor has its own table with recorded values (one measure every minute).
|
|
32
|
+
- Each table has the following column names:
|
|
33
|
+
- `measure_id`: Identifiers for the entries in the table (basically the row number),
|
|
34
|
+
- `measure_timestamp`: Timestamp of the measurements [Unix time],
|
|
35
|
+
- `measure_value`: Recorded values (already converted/calibrated).
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Local Settings
|
|
40
|
+
|
|
41
|
+
The following entries have to be included in the (local) settings file:
|
|
42
|
+
|
|
43
|
+
```yaml
|
|
44
|
+
Facility HK:
|
|
45
|
+
TABLES:
|
|
46
|
+
|
|
47
|
+
Facility DB:
|
|
48
|
+
USER:
|
|
49
|
+
PASSWORD:
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
- In the "TABLES" block under "Facility HK", you have to link the table names (as in the facility database) to the
|
|
53
|
+
storage mnemonic (as in the TA-EGSE framework, to pass to the Storage Manager) and the server identifier. This can be
|
|
54
|
+
done by adding entries to the "TABLES" block, in the following format:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
<table name (in facility database)>: (storage mnemonic, server identifier)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
- In the "Facility DB" block, the credentials to connect to the MySQL facility database have to be specified via "USER"
|
|
61
|
+
and "PASSWORD".
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Functionality
|
|
66
|
+
|
|
67
|
+
The `FacilityHousekeepingExporter` process is responsible for:
|
|
68
|
+
- Extracting housekeeping data from the MySQL facility database,
|
|
69
|
+
- Storing the extracted housekeeping in dedicated, TA-EGSE-consistent CSV files (via the Storage Manager),
|
|
70
|
+
- Ingesting the extracted housekeeping in the InfluxDB metrics database.
|
|
71
|
+
|
|
72
|
+
For each of the selected tables in the facility database, a dedicated thread will check for new entries in that table. When
|
|
73
|
+
a new entry appears in such a table, the corresponding thread will receive the new data as a `dict` and take the following action:
|
|
74
|
+
- Convert the timestamp to the format that we use throughout the TA-EGSE framework (YYYY-mm-ddTHH:MM:SS.μs+0000).
|
|
75
|
+
- Re-name the key for the timestamp in the dictionary to "timestamp".
|
|
76
|
+
- Re-name the key for the recorded value to the table name.
|
|
77
|
+
- If required by the telemetry, further re-naming of the keys in the dictionary will be performed.
|
|
78
|
+
- Send the new housekeeping value and corresponding timestamp to the Storage Manager. The latter will store it in a
|
|
79
|
+
dedicated CSV file.
|
|
80
|
+
- Send the new housekeeping value and corresponding timestamp to the InfluxDB metrics database.
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Enable Binary Logging
|
|
85
|
+
|
|
86
|
+
To make this all work, binary logging should be enabled on the MySQL server. This can be done by adding the following
|
|
87
|
+
information in the `my.cnf` file:
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
[mysqld]
|
|
91
|
+
log-bin=mysql-bin
|
|
92
|
+
server-id=<server identifier>
|
|
93
|
+
binlog_format=ROW
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
You would have to add an entry for each of the server identifiers listed in the (local) settings file (see section above).
|
|
97
|
+
|
|
98
|
+
To find this file, check the `MYSQL_HOME` environment variable.
|
|
99
|
+
|
|
100
|
+
When you have added all required server identifiers, the MySQL server should be re-started. Also make sure that your
|
|
101
|
+
user had `REPLICATION SLAVE` or `REPLICATION CLIENT` privileges. This can be configured as follows:
|
|
102
|
+
|
|
103
|
+
```mysql
|
|
104
|
+
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'your_user'@'%';
|
|
105
|
+
FLUSH PRIVILEGES;
|
|
106
|
+
```
|
|
@@ -5,7 +5,7 @@ ariel_facility/settings.yaml,sha256=zqqYdLLz4lJWE67_K1EtsNqMPJSb8YRZxR_zrp6T8Oo,
|
|
|
5
5
|
egse/ariel/facility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
egse/ariel/facility/database.py,sha256=qBvZ6N6VDV4I_JY96xh7xlxIQbCcEoJCBEpjccIu_Qc,8609
|
|
7
7
|
egse/ariel/facility/hk.py,sha256=kt9nQaBbVt2FC2pSOb1ZajC2Be34lrG9DrR80kOD_OM,12095
|
|
8
|
-
ariel_facility-0.
|
|
9
|
-
ariel_facility-0.
|
|
10
|
-
ariel_facility-0.
|
|
11
|
-
ariel_facility-0.
|
|
8
|
+
ariel_facility-0.18.0.dist-info/METADATA,sha256=2OQen_hIU0mwjt5BOnTN-m6Q9v1HdAQnlWgAr-DcMmQ,4114
|
|
9
|
+
ariel_facility-0.18.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
10
|
+
ariel_facility-0.18.0.dist-info/entry_points.txt,sha256=D3dZ85nQSUbUdMRZYbFBKFL0xH39pNOCPXSg_tmflx8,330
|
|
11
|
+
ariel_facility-0.18.0.dist-info/RECORD,,
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: ariel-facility
|
|
3
|
-
Version: 0.17.4
|
|
4
|
-
Summary: Extract HK from MySQL Facility Database for Ariel
|
|
5
|
-
Author: IVS KU Leuven
|
|
6
|
-
Maintainer-email: Rik Huygen <rik.huygen@kuleuven.be>, Sara Regibo <sara.regibo@kuleuven.be>
|
|
7
|
-
License-Expression: MIT
|
|
8
|
-
Keywords: Ariel,facility,hardware testing,housekeeping,software framework
|
|
9
|
-
Requires-Python: >=3.10
|
|
10
|
-
Requires-Dist: cgse-common
|
|
11
|
-
Requires-Dist: cgse-core
|
|
12
|
-
Requires-Dist: cgse-gui
|
|
13
|
-
Requires-Dist: crcmod>=1.7
|
|
14
|
-
Requires-Dist: mysql-replication
|
|
15
|
-
Requires-Dist: pyserial>=3.5
|
|
File without changes
|
|
File without changes
|