Commit 6c02dfee authored by Barnabas Busa's avatar Barnabas Busa Committed by GitHub

feat: add customizable configuraiton for prometheus retention (#745)

parent 8109054e
......@@ -639,6 +639,8 @@ def run(plan, args={}):
all_ethereum_metrics_exporter_contexts,
all_xatu_sentry_contexts,
global_node_selectors,
args_with_right_defaults.prometheus_params.storage_tsdb_retention_time,
args_with_right_defaults.prometheus_params.storage_tsdb_retention_size,
)
plan.print("Launching grafana...")
......
......@@ -101,6 +101,7 @@ def input_parser(plan, input_args):
result["disable_peer_scoring"] = False
result["goomy_blob_params"] = get_default_goomy_blob_params()
result["assertoor_params"] = get_default_assertoor_params()
result["prometheus_params"] = get_default_prometheus_params()
result["xatu_sentry_params"] = get_default_xatu_sentry_params()
result["persistent"] = False
result["parallel_keystore_generation"] = False
......@@ -322,6 +323,14 @@ def input_parser(plan, input_args):
goomy_blob_params=struct(
goomy_blob_args=result["goomy_blob_params"]["goomy_blob_args"],
),
prometheus_params=struct(
storage_tsdb_retention_time=result["prometheus_params"][
"storage_tsdb_retention_time"
],
storage_tsdb_retention_size=result["prometheus_params"][
"storage_tsdb_retention_size"
],
),
apache_port=result["apache_port"],
assertoor_params=struct(
image=result["assertoor_params"]["image"],
......@@ -922,6 +931,8 @@ def get_default_mev_params(mev_type, preset):
mev_builder_prometheus_config = {
"scrape_interval": "15s",
"labels": None,
"storage_tsdb_retention_time": "1d",
"storage_tsdb_retention_size": "512MB",
}
if mev_type == constants.MEV_RS_MEV_TYPE:
......@@ -979,6 +990,13 @@ def get_default_assertoor_params():
}
def get_default_prometheus_params():
return {
"storage_tsdb_retention_time": "1d",
"storage_tsdb_retention_size": "512MB",
}
def get_default_xatu_sentry_params():
return {
"xatu_sentry_image": "ethpandaops/xatu:latest",
......
......@@ -163,6 +163,10 @@ SUBCATEGORY_PARAMS = {
"run_lifecycle_test",
"tests",
],
"prometheus_params": [
"storage_tsdb_retention_time",
"storage_tsdb_retention_size",
],
"mev_params": [
"mev_relay_image",
"mev_builder_image",
......
......@@ -28,6 +28,8 @@ def launch_prometheus(
ethereum_metrics_exporter_contexts,
xatu_sentry_contexts,
global_node_selectors,
storage_tsdb_retention_time,
storage_tsdb_retention_size,
):
metrics_jobs = get_metrics_jobs(
el_contexts,
......@@ -46,6 +48,8 @@ def launch_prometheus(
MIN_MEMORY,
MAX_MEMORY,
node_selectors=global_node_selectors,
storage_tsdb_retention_time=storage_tsdb_retention_time,
storage_tsdb_retention_size=storage_tsdb_retention_size,
)
return prometheus_url
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment