Skip to content

Commit

Permalink
ADD: add prometheus & grafana config
Browse files Browse the repository at this point in the history
  • Loading branch information
gbayasgalan committed Jan 23, 2025
1 parent c0e464e commit e2dde51
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions controls/roles/manage-service/templates/prometheus.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -384,4 +384,35 @@ scrape_configs:
{% endif %}
]

# op-geth
- job_name: op-geth
metrics_path: /debug/metrics/prometheus
static_configs:
- targets: [
{% set targets = [] %}
{%- for service_config in service_configs.results %}
{%- if (service_config.content | b64decode | from_yaml).service == "OpGethService" %}
{%- set _ = targets.append("stereum-" ~ (service_config.content | b64decode | from_yaml).id ~ ":6060") %}
{%- endif %}
{% endfor %}
{% if targets %}
"{{ targets | join('",\n "') }}"
{% endif %}
]

# op-node beacon
- job_name: op_node_beacon
static_configs:
- targets: [
{% set targets = [] %}
{%- for service_config in service_configs.results %}
{%- if (service_config.content | b64decode | from_yaml).service == "OpNodeBeaconService" %}
{%- set _ = targets.append("stereum-" ~ (service_config.content | b64decode | from_yaml).id ~ ":7300") %}
{%- endif %}
{% endfor %}
{% if targets %}
"{{ targets | join('",\n "') }}"
{% endif %}
]

# EOF

0 comments on commit e2dde51

Please sign in to comment.