mirror of
https://github.com/ClusterCockpit/cc-specifications.git
synced 2024-12-25 13:09:05 +01:00
Extend sql schema. Add thresholds to metric schema
This commit is contained in:
parent
aa5a3daff3
commit
d3833cd5f2
@ -9,4 +9,6 @@ The specifications are defined following the [OpenAPI Initiative](https://www.op
|
||||
Main data exchange format is JSON.
|
||||
The specifications are defined following the [JSON schema](https://json-schema.org) format standard.
|
||||
|
||||
## Database schemas
|
||||
## Database schema
|
||||
|
||||
Recommended minimal SQL database schema for job meta data.
|
||||
|
@ -21,6 +21,24 @@
|
||||
"description": "Measurement interval in seconds",
|
||||
"type": "integer"
|
||||
},
|
||||
"thresholds": {
|
||||
"description": "Metric thresholds for specific system",
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"peak": {
|
||||
"type": "number"
|
||||
},
|
||||
"normal": {
|
||||
"type": "number"
|
||||
},
|
||||
"caution": {
|
||||
"type": "number"
|
||||
},
|
||||
"alert": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"series": {
|
||||
"description": "",
|
||||
"type": "array",
|
||||
|
@ -1,9 +1,9 @@
|
||||
CREATE TABLE job ( id INTEGER PRIMARY KEY,
|
||||
job_id TEXT, user_id TEXT, project_id TEXT, cluster_id TEXT,
|
||||
start_time INTEGER, duration INTEGER,
|
||||
job_id TEXT NOT NULL, user_id TEXT NOT NULL, project_id TEXT NOT NULL, cluster_id TEXT NOT NULL,
|
||||
start_time INTEGER NOT NULL, duration INTEGER NOT NULL,
|
||||
walltime INTEGER, job_state TEXT,
|
||||
num_nodes INTEGER, node_list TEXT, has_profile INTEGER,
|
||||
mem_used_max REAL, flops_any_avg REAL, mem_bw_avg REAL, net_bw_avg REAL, file_bw_avg REAL);
|
||||
num_nodes INTEGER NOT NULL, node_list TEXT NOT NULL, has_profile INTEGER NOT NULL,
|
||||
mem_used_max REAL, flops_any_avg REAL, mem_bw_avg REAL, load_avg REAL, net_bw_avg REAL, file_bw_avg REAL);
|
||||
CREATE TABLE tag ( id INTEGER PRIMARY KEY, tag_type TEXT, tag_name TEXT);
|
||||
CREATE TABLE jobtag ( job_id INTEGER, tag_id INTEGER, PRIMARY KEY (job_id, tag_id),
|
||||
FOREIGN KEY (job_id) REFERENCES job (id) ON DELETE CASCADE ON UPDATE NO ACTION,
|
||||
|
Loading…
Reference in New Issue
Block a user