This project implements the Common Information Model for GreenDIGIT with Unified Metric Namespace Mapping System. It enables ingestion, classification, and standard-aligned mapping of datacenter metrics from various formats and sources. The system supports metrics data from structured files (JSON, XML, CSV, YAML), unstructured text, and infrastructure's API sources.
cloud_metrics_api/ –> Main application logic including ingestion, parsing, mapping, and API interface.
cloud_metrics_api/ingestion_controller/ –> Orchestrates ingestion from files or real-time sources and manages classification and mapping.
cloud_metrics_api/parsers/ –> Parsers for structured (JSON, XML, YAML, CSV) and unstructured (text) files.
cloud_metrics_api/project_models/ –> SQLAlchemy ORM models for namespace elements and learned metric keywords.
cloud_metrics_api/sql_models/ –> ORM models for metric definitions, upload logs, and datacenters.
cloud_metrics_api/sql_services/ –> DB insert and mapping services for PostgreSQL.
cloud_metrics_api/project_config/ –> Configuration for PostgreSQL and InfluxDB connectivity.
cloud_metrics_api/utils/ –> Helper functions for syncing mapping with metric_mapping.json.
cloud_metrics_api/streamlit_uploader.py –> Streamlit-based UI to upload files and visualize ingestion flow.
cloud_metrics_api/unified_ingestion.py –> Command-line tool to ingest and process metrics from uploaded files.
cloud_metrics_api/namespace_mapper_core.py –> The core router module that bridges parsing, classification, and storage services.
- Input: A metric file (JSON, XML, etc.) is uploaded via Streamlit or CLI.
- Parsing: The format is detected, and routed to the appropriate parser.
- Extraction: Raw metrics are extracted into key-value pairs.
- Classification: Each key is classified by the semantic classifier or fallback logic.
- Namespace Generation: Unified key is generated using the ISO/JRC-compliant format.
- Storage: Metadata is saved to PostgreSQL; values go to InfluxDB.
- Mapping: All raw-unified mappings are synced in metric_mapping.json.
- Access: Metrics are queryable via InfluxDB or APIs; ready for dashboards.
To run via Streamlit UI: streamlit run cloud_metrics_api/streamlit_uploader.py
To run manually via CLI: python cloud_metrics_api/unified_ingestion.py --file path/to/file.json --datacenter SampleDC
- Install dependencies:
pip install -r requirements.txt. - Ensure PostgreSQL and InfluxDB are running.
- Configure
project_config/postgres_config.pyandinflux_service.pywith appropriate credentials. - Run
create_schema.pyto initialize the database tables.
- Namespace generation auto-creates new standards, categories, and subcategories.
- New metric keys are logged in the
metric_keywordstable if not previously mapped.
- Namespace generation auto-creates new standards, categories, and subcategories.
- New metric keys are logged in the
metric_keywordstable if not previously mapped.
Contact:
For questions or to request access, please contact the GreenDIGIT UvA CIM team:
- Adnan Tahir: a.tahir2@uva.nl.
- Gonçalo Ferreira: goncalo.ferreira@student.uva.nl.