From a4e7cd456e17c230b41b2c336fb68f8cf4349a41 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 10:52:38 +0900 Subject: [PATCH 1/8] chore(CONTRIBUTING.md): add development instructions for working on core/wave-autoscale --- CONTRIBUTING.md | 11 ++++++++++ core/wave-autoscale/moon.yml | 20 +------------------ .../tests/{metrics_test.rs => simulation.rs} | 2 +- 3 files changed, 13 insertions(+), 20 deletions(-) rename core/wave-autoscale/tests/{metrics_test.rs => simulation.rs} (99%) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9ffe911..550dcae7 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -19,6 +19,17 @@ $ moon sync hooks ``` +## Development + +### When you work on core/wave-autoscale +```bash +# Run +moon run controller:[test|run] + +# If you need a situation that metrics are sent to the database and your plan responses to the metrics +# Edit core/wave-autoscale/tests/simulation.rs for your situation +moon run controller:test-simulation +``` ## Coding Rules diff --git a/core/wave-autoscale/moon.yml b/core/wave-autoscale/moon.yml index 41204d51..84e37a15 100644 --- a/core/wave-autoscale/moon.yml +++ b/core/wave-autoscale/moon.yml @@ -41,25 +41,7 @@ tasks: - "@globs(tests)" env: RUST_LOG: wave_autoscale=debug - # Run - run-help: - command: "cargo watch -c -x 'run -- --help'" - deps: - - "lint" - inputs: - - "@globs(sources)" - env: - RUST_LOG: debug - run-autoscaling-history-retention: - # command: "cargo watch -c -x 'run -- --autoscaling-history-retention=1d'" - command: "cargo run -- --autoscaling-history-retention=1d" - deps: - - "lint" - inputs: - - "@globs(sources)" - env: - RUST_LOG: wave_controller=debug - test-metrics-simulation: + test-simulation: command: "cargo nextest run -p wave-autoscale test_simulation --no-capture" deps: - "data-layer:lint" diff --git a/core/wave-autoscale/tests/metrics_test.rs b/core/wave-autoscale/tests/simulation.rs similarity index 99% rename from core/wave-autoscale/tests/metrics_test.rs rename to core/wave-autoscale/tests/simulation.rs index 15da984f..56006def 100644 --- a/core/wave-autoscale/tests/metrics_test.rs +++ b/core/wave-autoscale/tests/simulation.rs @@ -1,4 +1,4 @@ -mod metrics_test { +mod simulation_test { use data_layer::data_layer::DataLayer; use log::debug; use serde_json::json; From 33143f37eff4881f6b745b06ca004bf931a6f0a2 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 13:41:55 +0900 Subject: [PATCH 2/8] chore(workspace): add 'clean-cargo' task to pre-push hook to ensure cargo is cleaned before pushing changes --- .moon/tasks/rust.yml | 7 +++++-- .moon/workspace.yml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.moon/tasks/rust.yml b/.moon/tasks/rust.yml index af339c63..02a1d89c 100644 --- a/.moon/tasks/rust.yml +++ b/.moon/tasks/rust.yml @@ -1,5 +1,8 @@ tasks: - clean: + clean-cargo: + command: "cargo clean" + platform: "system" + clean-db: command: "find . -type f -name 'wave.db' -exec rm {} + > /dev/null" platform: "system" inputs: @@ -19,7 +22,7 @@ tasks: test: deps: - "lint" - - "clean" + - "clean-db" run: deps: - "test" diff --git a/.moon/workspace.yml b/.moon/workspace.yml index 098504d5..7e18f09c 100644 --- a/.moon/workspace.yml +++ b/.moon/workspace.yml @@ -49,5 +49,6 @@ vcs: pre-push: - "moon sync projects" # TODO: Add back in when we have a fix for + - "moon run :clean-cargo" - "moon run archiver:audit :lint" - "moon run :test" From 32fac3e15234180cac6824662de2ba9b3c3d54b7 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:05:15 +0900 Subject: [PATCH 3/8] feat(wave-metrics): add YAML file for defining Google Cloud Monitoring metrics for wave-metrics --- core/wave-metrics/moon.yml | 2 + .../google-cloud-monitoring-definition.yaml | 70 +++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml diff --git a/core/wave-metrics/moon.yml b/core/wave-metrics/moon.yml index e3d9b60b..ac7a5ea8 100644 --- a/core/wave-metrics/moon.yml +++ b/core/wave-metrics/moon.yml @@ -35,6 +35,8 @@ tasks: - "./core/wave-metrics/tests/yaml/collectors.yaml" env: RUST_LOG: wave_metrics=debug + inputs: + - "@globs(tests)" # Build for Production # Linux build-aarch64-unknown-linux-gnu: diff --git a/core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml b/core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml new file mode 100644 index 00000000..dee197a2 --- /dev/null +++ b/core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml @@ -0,0 +1,70 @@ +# References - Telegraf Stackdriver Google Cloud Monitoring Input Plugin +# https://github.com/influxdata/telegraf/blob/release-1.27/plugins/inputs/stackdriver/README.md +--- +kind: Metric +id: google_cloud_monitoring_mig_metric +collector: telegraf +metric_kind: stackdriver +metadata: + project: wave-autoscale-test + ## Include timeseries that start with the given metric type. + metric_type_prefix_include: ["compute.googleapis.com/instance/cpu/utilization"] + interval: "1m" + +# Output in the database will be like this: +# [ +# { +# "name": "google_cloud_monitoring_mig_metric_utilization", +# "tags": { +# "host": "local", +# "instance_id": "3137596874116707338", +# "instance_name": "test-instance-group-1-lp73", +# "project_id": "wave-autoscale-test", +# "resource_type": "gce_instance", +# "zone": "asia-northeast2-a" +# }, +# "value": 0.009973257744559306 +# }, +# { +# "name": "google_cloud_monitoring_mig_metric_utilization", +# "tags": { +# "host": "local", +# "instance_id": "8022840066979737199", +# "instance_name": "instance-group-2-r32v", +# "project_id": "wave-autoscale-test", +# "resource_type": "gce_instance", +# "zone": "asia-northeast2-a" +# }, +# "value": 0.04300702278317961 +# }, +# { +# "name": "google_cloud_monitoring_mig_metric_utilization", +# "tags": { +# "host": "local", +# "instance_id": "851205196260609218", +# "instance_name": "instance-group-2-wpng", +# "project_id": "wave-autoscale-test", +# "resource_type": "gce_instance", +# "zone": "asia-northeast2-a" +# }, +# "value": 0.0171343613359871 +# } +# ] + + +# --- +# kind: ScalingPlan +# id: google_scaling_plan +# title: "Scaling Plan for Google VM Instance" +# plans: +# - id: scale-up-plan-1 +# description: "Scale up" +# # JavaScript expression that returns a boolean value. +# expression: > +# get({ +# name: 'google_cloud_monitoring_mig_metric_utilization' +# }) > 0.04 +# # Higher priority values will be checked first. +# priority: 1 +# scaling_components: +# ... \ No newline at end of file From aefd5521e603d84c87270ff553e44790a86ec30c Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:07:10 +0900 Subject: [PATCH 4/8] hore(workspace.yml): remove unused pre-push command 'moon run :clean-cargo' to improve build process efficiency --- .moon/workspace.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.moon/workspace.yml b/.moon/workspace.yml index 7e18f09c..098504d5 100644 --- a/.moon/workspace.yml +++ b/.moon/workspace.yml @@ -49,6 +49,5 @@ vcs: pre-push: - "moon sync projects" # TODO: Add back in when we have a fix for - - "moon run :clean-cargo" - "moon run archiver:audit :lint" - "moon run :test" From 671f1eae54eac95a496aedb7fbac286a22f4cd43 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:07:59 +0900 Subject: [PATCH 5/8] docs(CONTRIBUTING.md): add a section for working on core/wave-metrics and provide a Telegraf tip for printing metrics to stdout --- CONTRIBUTING.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 550dcae7..75ce5047 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,6 +31,13 @@ moon run controller:[test|run] moon run controller:test-simulation ``` +### When you work on core/wave-metrics +- Telegraf Tips + ```toml + # Print metrics to stdout + [[outputs.file]] + files = ["stdout"] + ``` ## Coding Rules ### Rust From 8f56a34becbed21f9340017ac3ee3847276ca83d Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:08:13 +0900 Subject: [PATCH 6/8] chore(.gitignore): add 'telegraf*' and 'vector*' to ignore files related to telegraf and vector --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 0a4280c7..20265301 100644 --- a/.gitignore +++ b/.gitignore @@ -38,6 +38,8 @@ core/wave-cli/vector* # core/wave-metrics core/wave-metrics/telegraf* core/wave-metrics/vector* +telegraf* +vector* # VSCode .vscode/ \ No newline at end of file From e4a17d523641865784250c41b20ab318dda1a383 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:50:33 +0900 Subject: [PATCH 7/8] chore(wave-metrics): create metrics-examples --- .github/CODEOWNERS | 1 + .gitignore | 4 ++-- .../tests/yaml/metric_cloudwatch_data.yaml | 15 ------------ .../yaml/metric_cloudwatch_statistics.yaml | 22 ------------------ .../tests/yaml/metric_prometheus.yaml | 23 ------------------- core/wave-cli/moon.yml | 5 ++-- core/wave-metrics/moon.yml | 4 ++-- .../src/metric_collector_manager/mod.rs | 4 ++-- .../{yaml => collectors}/collectors.yaml | 0 .../telegraf-cloudwatch-metrics.yaml} | 6 ++--- ...graf-google-cloud-monitoring-metrics.yaml} | 10 ++++---- .../telegraf-mem-metrics.yaml | 7 ++++++ .../metrics-examples/vector-host-metrics.yaml | 9 ++++++++ .../vector-prometheus-metrics.yaml | 14 +++++++++++ core/wave-metrics/tests/yaml/definition.yaml | 14 ----------- 15 files changed, 48 insertions(+), 90 deletions(-) delete mode 100644 core/wave-autoscale/tests/yaml/metric_cloudwatch_data.yaml delete mode 100644 core/wave-autoscale/tests/yaml/metric_cloudwatch_statistics.yaml delete mode 100644 core/wave-autoscale/tests/yaml/metric_prometheus.yaml rename core/wave-metrics/tests/{yaml => collectors}/collectors.yaml (100%) rename core/wave-metrics/tests/{yaml/cloudwatch-definition.yaml => metrics-examples/telegraf-cloudwatch-metrics.yaml} (90%) rename core/wave-metrics/tests/{yaml/google-cloud-monitoring-definition.yaml => metrics-examples/telegraf-google-cloud-monitoring-metrics.yaml} (85%) create mode 100644 core/wave-metrics/tests/metrics-examples/telegraf-mem-metrics.yaml create mode 100644 core/wave-metrics/tests/metrics-examples/vector-host-metrics.yaml create mode 100644 core/wave-metrics/tests/metrics-examples/vector-prometheus-metrics.yaml delete mode 100644 core/wave-metrics/tests/yaml/definition.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2f5cc26f..22ce9b2b 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,3 +3,4 @@ # (workspace) * @wave-autoscale-team + diff --git a/.gitignore b/.gitignore index 20265301..7a904746 100644 --- a/.gitignore +++ b/.gitignore @@ -38,8 +38,8 @@ core/wave-cli/vector* # core/wave-metrics core/wave-metrics/telegraf* core/wave-metrics/vector* -telegraf* -vector* +telegraf*/ +vector*/ # VSCode .vscode/ \ No newline at end of file diff --git a/core/wave-autoscale/tests/yaml/metric_cloudwatch_data.yaml b/core/wave-autoscale/tests/yaml/metric_cloudwatch_data.yaml deleted file mode 100644 index 9f8a4601..00000000 --- a/core/wave-autoscale/tests/yaml/metric_cloudwatch_data.yaml +++ /dev/null @@ -1,15 +0,0 @@ ---- -kind: Metric -id: cloudwatch_cpu_average -metric_kind: cloudwatch-data -metadata: - region: ap-northeast-2 - access_key: AKIAU7BQ6ZTCA2XGEZNN - secret_key: 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 - polling_interval: 1000 - # https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricData.html - # https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_MetricDataQuery.html - expression: "SELECT AVG(CPUUtilization) FROM \"AWS/EC2\"" - period: 5 - duration_seconds: 3600 - # TODO: support MetricStat diff --git a/core/wave-autoscale/tests/yaml/metric_cloudwatch_statistics.yaml b/core/wave-autoscale/tests/yaml/metric_cloudwatch_statistics.yaml deleted file mode 100644 index 47429fe9..00000000 --- a/core/wave-autoscale/tests/yaml/metric_cloudwatch_statistics.yaml +++ /dev/null @@ -1,22 +0,0 @@ ---- -kind: Metric -id: cloudwatch_cpu_average -metric_kind: cloudwatch-statistics -metadata: - region: ap-northeast-2 - access_key: AKIAU7BQ6ZTCA2XGEZNN - secret_key: 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 - polling_interval: 1000 - # https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_GetMetricStatistics.html - namespace: AWS/EC2 - metric_name: CPUUtilization - dimensions: - # - Name: InstanceId - # Value: i-0b0b0b0b0b0b0b0b0 - - Name: InstanceType - Value: t2.micro - duration_seconds: 3600 - period: 5 - # statistic: Average, Sum, SampleCount, Maximum, Minimum - statistic: Average - unit: Percent diff --git a/core/wave-autoscale/tests/yaml/metric_prometheus.yaml b/core/wave-autoscale/tests/yaml/metric_prometheus.yaml deleted file mode 100644 index 4b69a88d..00000000 --- a/core/wave-autoscale/tests/yaml/metric_prometheus.yaml +++ /dev/null @@ -1,23 +0,0 @@ ---- -kind: Metric -id: prometheus_api_server_cpu_average_each -metric_kind: prometheus -metadata: - endpoint: http://3.34.170.13:9090 - # This query returns a vector of time series, each with a single sample. - # Metric Adapter will save the result of this query as a map of labels to values. - # [metric_id] will be the first value of the result. - # [metric_id]_values will be an array of values of the result. - query: node_cpu_seconds_total - # milliseconds - polling_interval: 1000 ---- -kind: Metric -id: prometheus_api_server_cpu_average_total -metric_kind: prometheus -metadata: - endpoint: http://3.34.170.13:9090 - # Note: query must return a vector/scalar single element response - query: avg(100 - (avg(rate(node_cpu_seconds_total{mode="idle"}[20s])) by (hostname) * 100)) - # milliseconds - polling_interval: 1000 \ No newline at end of file diff --git a/core/wave-cli/moon.yml b/core/wave-cli/moon.yml index bdf8766c..c2541794 100644 --- a/core/wave-cli/moon.yml +++ b/core/wave-cli/moon.yml @@ -41,9 +41,9 @@ tasks: - "--config" - "../../tests/config/wave-config.yaml" - "--definition" - - "../wave-metrics/tests/yaml/cloudwatch-definition.yaml" + - "../wave-metrics/tests/metrics-examples/vector-host-metrics.yaml" - "--collectors-info" - - "../wave-metrics/tests/yaml/collectors.yaml" + - "../wave-metrics/tests/collectors/collectors.yaml" deps: # TODO: Build web-app - "copy-wave-controller" @@ -54,6 +54,7 @@ tasks: - "wave-api-server" - "wave-metrics" - "wave-web-app/**/*" + - "tests/db/wave.db" env: RUST_LOG: wave_cli=debug options: diff --git a/core/wave-metrics/moon.yml b/core/wave-metrics/moon.yml index ac7a5ea8..300b684e 100644 --- a/core/wave-metrics/moon.yml +++ b/core/wave-metrics/moon.yml @@ -30,9 +30,9 @@ tasks: - "--config" - "./tests/config/wave-config.yaml" - "--definition" - - "./core/wave-metrics/tests/yaml/cloudwatch-definition.yaml" + - "./core/wave-metrics/tests/metrics-examples/vector-host-metrics.yaml" - "--collectors-info" - - "./core/wave-metrics/tests/yaml/collectors.yaml" + - "./core/wave-metrics/tests/collectors/collectors.yaml" env: RUST_LOG: wave_metrics=debug inputs: diff --git a/core/wave-metrics/src/metric_collector_manager/mod.rs b/core/wave-metrics/src/metric_collector_manager/mod.rs index aae6dd54..9183c143 100644 --- a/core/wave-metrics/src/metric_collector_manager/mod.rs +++ b/core/wave-metrics/src/metric_collector_manager/mod.rs @@ -542,8 +542,8 @@ mod tests { let _ = std::fs::remove_file("./wave.db"); MetricCollectorManager::new( - "./tests/yaml/collectors.yaml", - "http://localhost:8081/api/metrics-receiver", + "./tests/collectors/collectors.yaml", + "http://localhost:3024/api/metrics-receiver", ) } diff --git a/core/wave-metrics/tests/yaml/collectors.yaml b/core/wave-metrics/tests/collectors/collectors.yaml similarity index 100% rename from core/wave-metrics/tests/yaml/collectors.yaml rename to core/wave-metrics/tests/collectors/collectors.yaml diff --git a/core/wave-metrics/tests/yaml/cloudwatch-definition.yaml b/core/wave-metrics/tests/metrics-examples/telegraf-cloudwatch-metrics.yaml similarity index 90% rename from core/wave-metrics/tests/yaml/cloudwatch-definition.yaml rename to core/wave-metrics/tests/metrics-examples/telegraf-cloudwatch-metrics.yaml index 9d8d293c..20796acc 100644 --- a/core/wave-metrics/tests/yaml/cloudwatch-definition.yaml +++ b/core/wave-metrics/tests/metrics-examples/telegraf-cloudwatch-metrics.yaml @@ -2,7 +2,7 @@ # https://github.com/influxdata/telegraf/blob/master/plugins/inputs/cloudwatch/README.md --- kind: Metric -id: cloudwatch_dynamodb_metric +id: cloudwatch_dynamodb_metrics collector: telegraf metric_kind: cloudwatch metadata: @@ -28,7 +28,7 @@ metadata: # Output in the database will be like this: # [ # { -# "name": "cloudwatch_dynamodb_metric_consumed_write_capacity_units_sample_count", +# "name": "cloudwatch_dynamodb_metrics_consumed_write_capacity_units_sample_count", # "tags": { # "host": "Hwansoos-Laptop.local", # "region": "ap-northeast-3", @@ -48,7 +48,7 @@ metadata: # # JavaScript expression that returns a boolean value. # expression: > # get({ -# name: 'cloudwatch_dynamodb_metric_consumed_write_capacity_units_sample_count' +# name: 'cloudwatch_dynamodb_metrics_consumed_write_capacity_units_sample_count' # }) > 30 # # Higher priority values will be checked first. # priority: 1 diff --git a/core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml b/core/wave-metrics/tests/metrics-examples/telegraf-google-cloud-monitoring-metrics.yaml similarity index 85% rename from core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml rename to core/wave-metrics/tests/metrics-examples/telegraf-google-cloud-monitoring-metrics.yaml index dee197a2..203e8aeb 100644 --- a/core/wave-metrics/tests/yaml/google-cloud-monitoring-definition.yaml +++ b/core/wave-metrics/tests/metrics-examples/telegraf-google-cloud-monitoring-metrics.yaml @@ -2,7 +2,7 @@ # https://github.com/influxdata/telegraf/blob/release-1.27/plugins/inputs/stackdriver/README.md --- kind: Metric -id: google_cloud_monitoring_mig_metric +id: google_cloud_monitoring_mig_metrics collector: telegraf metric_kind: stackdriver metadata: @@ -14,7 +14,7 @@ metadata: # Output in the database will be like this: # [ # { -# "name": "google_cloud_monitoring_mig_metric_utilization", +# "name": "google_cloud_monitoring_mig_metrics_utilization", # "tags": { # "host": "local", # "instance_id": "3137596874116707338", @@ -26,7 +26,7 @@ metadata: # "value": 0.009973257744559306 # }, # { -# "name": "google_cloud_monitoring_mig_metric_utilization", +# "name": "google_cloud_monitoring_mig_metrics_utilization", # "tags": { # "host": "local", # "instance_id": "8022840066979737199", @@ -38,7 +38,7 @@ metadata: # "value": 0.04300702278317961 # }, # { -# "name": "google_cloud_monitoring_mig_metric_utilization", +# "name": "google_cloud_monitoring_mig_metrics_utilization", # "tags": { # "host": "local", # "instance_id": "851205196260609218", @@ -62,7 +62,7 @@ metadata: # # JavaScript expression that returns a boolean value. # expression: > # get({ -# name: 'google_cloud_monitoring_mig_metric_utilization' +# name: 'google_cloud_monitoring_mig_metrics_utilization' # }) > 0.04 # # Higher priority values will be checked first. # priority: 1 diff --git a/core/wave-metrics/tests/metrics-examples/telegraf-mem-metrics.yaml b/core/wave-metrics/tests/metrics-examples/telegraf-mem-metrics.yaml new file mode 100644 index 00000000..64cca019 --- /dev/null +++ b/core/wave-metrics/tests/metrics-examples/telegraf-mem-metrics.yaml @@ -0,0 +1,7 @@ +# https://github.com/influxdata/telegraf/blob/master/plugins/inputs/mem/README.md +--- +kind: Metric +id: telegraf_mem_metrics +collector: telegraf +metric_kind: mem +metadata: diff --git a/core/wave-metrics/tests/metrics-examples/vector-host-metrics.yaml b/core/wave-metrics/tests/metrics-examples/vector-host-metrics.yaml new file mode 100644 index 00000000..480b65d7 --- /dev/null +++ b/core/wave-metrics/tests/metrics-examples/vector-host-metrics.yaml @@ -0,0 +1,9 @@ +# https://vector.dev/docs/reference/configuration/sources/host_metrics/ +--- +kind: Metric +id: vector_host_metrics +collector: vector +metric_kind: host_metrics +metadata: + namespace: host + scrape_interval_secs: 5 diff --git a/core/wave-metrics/tests/metrics-examples/vector-prometheus-metrics.yaml b/core/wave-metrics/tests/metrics-examples/vector-prometheus-metrics.yaml new file mode 100644 index 00000000..96e4b8c4 --- /dev/null +++ b/core/wave-metrics/tests/metrics-examples/vector-prometheus-metrics.yaml @@ -0,0 +1,14 @@ +# https://vector.dev/docs/reference/configuration/sources/prometheus_scrape/#query +--- +kind: Metric +id: vector_host_metrics +collector: vector +metric_kind: prometheus_scrape +metadata: + endpoints: + - http://localhost:9090/metrics + query: + "match[]": + - '{job="somejob"}' + - '{__name__=~"job:.*"}' + scrape_interval_secs: 15 diff --git a/core/wave-metrics/tests/yaml/definition.yaml b/core/wave-metrics/tests/yaml/definition.yaml deleted file mode 100644 index 51a8d385..00000000 --- a/core/wave-metrics/tests/yaml/definition.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -kind: Metric -id: metric_id_vector -collector: vector -metric_kind: host_metrics -metadata: - namespace: host - scrape_interval_secs: 15 ---- -kind: Metric -id: metric_id_telegraf -collector: telegraf -metric_kind: mem -metadata: From eac9c5e56ce8009c45ac412cb8ed64eeb4376f76 Mon Sep 17 00:00:00 2001 From: Hwansoo Kim Date: Wed, 26 Jul 2023 15:52:17 +0900 Subject: [PATCH 8/8] chore(CODEOWNERS): remove unnecessary line with workspace codeowners to clean up the file --- .github/CODEOWNERS | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 22ce9b2b..2f5cc26f 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -3,4 +3,3 @@ # (workspace) * @wave-autoscale-team -