diff --git a/prometheus_poc/docker-compose.yaml b/prometheus_poc/docker-compose.yaml index 0d30b2d..c21a365 100644 --- a/prometheus_poc/docker-compose.yaml +++ b/prometheus_poc/docker-compose.yaml @@ -5,6 +5,11 @@ services: image: prom/prometheus ports: - 9090:9090 + entrypoint: + - /bin/prometheus + - --config.file=/etc/prometheus/prometheus.yml + - --storage.tsdb.path=/prometheus + - --storage.tsdb.retention.time=3y volumes: - ./prometheus.yml:/etc/prometheus/prometheus.yml grafana: diff --git a/prometheus_poc/metrics/metrics b/prometheus_poc/metrics/metrics index fad7000..e57863e 100644 --- a/prometheus_poc/metrics/metrics +++ b/prometheus_poc/metrics/metrics @@ -1,6 +1,39 @@ -test_data_metric{refdate="1701385200",date="2023-12-01",facility="facility A"} 200 -test_data_metric{refdate="1701385200",date="2023-12-01",facility="facility B"} 12 -test_data_metric{refdate="1701385200",date="2023-12-01",facility="facility C"} 14 -test_data_metric{refdate="1698793200",date="2024-01-01",facility="facility A"} 12 -test_data_metric{refdate="1698793200",date="2024-01-01",facility="facility B"} 13 -test_data_metric{refdate="1698793200",date="2024-01-01",facility="facility C"} 300 +test_data_metric{date="2023-12-01",facility="facility A"} 5 +test_data_metric{date="2023-12-01",facility="facility B"} 12 +test_data_metric{date="2023-12-01",facility="facility C"} 200 +test_data_metric{date="2024-01-01",facility="facility A"} 12 +test_data_metric{date="2024-01-01",facility="facility B"} 50 +test_data_metric{date="2024-01-01",facility="facility C"} 230 +test_data_metric{date="2024-02-01",facility="facility A"} 24 +test_data_metric{date="2024-02-01",facility="facility B"} 100 +test_data_metric{date="2024-02-01",facility="facility C"} 340 +test_data_metric{date="2024-03-01",facility="facility A"} 48 +test_data_metric{date="2024-03-01",facility="facility B"} 75 +test_data_metric{date="2024-03-01",facility="facility C"} 360 +test_data_metric{date="2024-04-01",facility="facility A"} 100 +test_data_metric{date="2024-04-01",facility="facility B"} 150 +test_data_metric{date="2024-04-01",facility="facility C"} 380 +test_data_metric{date="2024-05-01",facility="facility A"} 200 +test_data_metric{date="2024-05-01",facility="facility B"} 120 +test_data_metric{date="2024-05-01",facility="facility C"} 400 +test_data_metric{date="2024-06-01",facility="facility A"} 250 +test_data_metric{date="2024-06-01",facility="facility B"} 150 +test_data_metric{date="2024-06-01",facility="facility C"} 500 +test_data_metric{date="2024-07-01",facility="facility A"} 300 +test_data_metric{date="2024-07-01",facility="facility B"} 145 +test_data_metric{date="2024-07-01",facility="facility C"} 530 +test_data_metric{date="2024-08-01",facility="facility A"} 310 +test_data_metric{date="2024-08-01",facility="facility B"} 175 +test_data_metric{date="2024-08-01",facility="facility C"} 550 +test_data_metric{date="2024-09-01",facility="facility A"} 315 +test_data_metric{date="2024-09-01",facility="facility B"} 150 +test_data_metric{date="2024-09-01",facility="facility C"} 570 +test_data_metric{date="2024-10-01",facility="facility A"} 325 +test_data_metric{date="2024-10-01",facility="facility B"} 200 +test_data_metric{date="2024-10-01",facility="facility C"} 590 +test_data_metric{date="2024-11-01",facility="facility A"} 330 +test_data_metric{date="2024-11-01",facility="facility B"} 190 +test_data_metric{date="2024-11-01",facility="facility C"} 600 + +lol_metric_in_the_past 12 1733130915000 +lol_metric_now 12 diff --git a/prometheus_poc/prometheus.yml b/prometheus_poc/prometheus.yml index 0b18841..1b474e8 100644 --- a/prometheus_poc/prometheus.yml +++ b/prometheus_poc/prometheus.yml @@ -14,3 +14,5 @@ scrape_configs: metrics_path: "/static/metrics" static_configs: - targets: ["tomcat:8080"] + labels: + testLabelKey: 'testLabelValue' \ No newline at end of file