Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .env.sample.holesky
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ MEV_RELAYS=https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7
# Loki log aggregation server addresses. Disable loki log aggregation by setting an empty address.
#CHARON_LOKI_ADDRESSES=

# Charon Cluster Name. Mandatory to send logs with Promtail.
#CLUSTER_NAME=
# Charon Cluster Name. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_NAME=""

# Charon Cluster Peer. Mandatory to send logs with Promtail.
#CLUSTER_PEER=
# Charon Cluster Peer. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_PEER=""

# Nickname to identify this charon node on monitoring (max 32 characters).
#CHARON_NICKNAME=
#CHARON_NICKNAME=""

# Docker network of running charon node. See `docker network ls`.
#CHARON_DOCKER_NETWORK=
Expand Down Expand Up @@ -196,23 +196,23 @@ MEV_RELAYS=https://0xab78bf8c781c58078c3beb5710c57940874dd96aef2835e7742c866b4c7
# Prometheus service owner used to uniquely identify user from which metrics are pushed.
#SERVICE_OWNER=charon_user

# Uncomment these if you have log exporting with Promtail
# Uncomment these if you have log exporting with Alloy
# and want to disable log export on a particular container.
#EL_NETHERMIND_PROMTAIL_MONITORED=false
#EL_RETH_PROMTAIL_MONITORED=false
#CL_LIGHTHOUSE_PROMTAIL_MONITORED=false
#CL_GRANDINE_PROMTAIL_MONITORED=false
#CL_TEKU_PROMTAIL_MONITORED=false
#CL_LODESTAR_PROMTAIL_MONITORED=false
#CHARON_PROMTAIL_MONITORED=false
#VC_LODESTAR_PROMTAIL_MONITORED=false
#VC_NIMBUS_PROMTAIL_MONITORED=false
#VC_PRYSM_PROMTAIL_MONITORED=false
#VC_TEKU_PROMTAIL_MONITORED=false
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
#EJECTOR_PROMTAIL_MONITORED=false
#DV_EXIT_PROMTAIL_MONITORED=false
#EL_NETHERMIND_ALLOY_MONITORED=false
#EL_RETH_ALLOY_MONITORED=false
#CL_LIGHTHOUSE_ALLOY_MONITORED=false
#CL_GRANDINE_ALLOY_MONITORED=false
#CL_TEKU_ALLOY_MONITORED=false
#CL_LODESTAR_ALLOY_MONITORED=false
#CHARON_ALLOY_MONITORED=false
#VC_LODESTAR_ALLOY_MONITORED=false
#VC_NIMBUS_ALLOY_MONITORED=false
#VC_PRYSM_ALLOY_MONITORED=false
#VC_TEKU_ALLOY_MONITORED=false
#MEV_MEV_BOOST_ALLOY_MONITORED=false
#MEV_COMMIT_BOOST_ALLOY_MONITORED=false
#EJECTOR_ALLOY_MONITORED=false
#DV_EXIT_ALLOY_MONITORED=false

######### Debug Config #########

Expand Down
42 changes: 21 additions & 21 deletions .env.sample.hoodi
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ MEV_RELAYS=https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae871
# Loki log aggregation server addresses. Disable loki log aggregation by setting an empty address.
#CHARON_LOKI_ADDRESSES=

# Charon Cluster Name. Mandatory to send logs with Promtail.
#CLUSTER_NAME=
# Charon Cluster Name. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_NAME=""

# Charon Cluster Peer. Mandatory to send logs with Promtail.
#CLUSTER_PEER=
# Charon Cluster Peer. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_PEER=""

# Nickname to identify this charon node on monitoring (max 32 characters).
#CHARON_NICKNAME=
#CHARON_NICKNAME=""

# Docker network of running charon node. See `docker network ls`.
#CHARON_DOCKER_NETWORK=
Expand Down Expand Up @@ -196,23 +196,23 @@ MEV_RELAYS=https://0x98f0ef62f00780cf8eb06701a7d22725b9437d4768bb19b363e882ae871
# Prometheus service owner used to uniquely identify user from which metrics are pushed.
#SERVICE_OWNER=charon_user

# Uncomment these if you have log exporting with Promtail
# Uncomment these if you have log exporting with Alloy
# and want to disable log export on a particular container.
#EL_NETHERMIND_PROMTAIL_MONITORED=false
#EL_RETH_PROMTAIL_MONITORED=false
#CL_LIGHTHOUSE_PROMTAIL_MONITORED=false
#CL_GRANDINE_PROMTAIL_MONITORED=false
#CL_TEKU_PROMTAIL_MONITORED=false
#CL_LODESTAR_PROMTAIL_MONITORED=false
#CHARON_PROMTAIL_MONITORED=false
#VC_LODESTAR_PROMTAIL_MONITORED=false
#VC_NIMBUS_PROMTAIL_MONITORED=false
#VC_PRYSM_PROMTAIL_MONITORED=false
#VC_TEKU_PROMTAIL_MONITORED=false
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
#EJECTOR_PROMTAIL_MONITORED=false
#DV_EXIT_PROMTAIL_MONITORED=false
#EL_NETHERMIND_ALLOY_MONITORED=false
#EL_RETH_ALLOY_MONITORED=false
#CL_LIGHTHOUSE_ALLOY_MONITORED=false
#CL_GRANDINE_ALLOY_MONITORED=false
#CL_TEKU_ALLOY_MONITORED=false
#CL_LODESTAR_ALLOY_MONITORED=false
#CHARON_ALLOY_MONITORED=false
#VC_LODESTAR_ALLOY_MONITORED=false
#VC_NIMBUS_ALLOY_MONITORED=false
#VC_PRYSM_ALLOY_MONITORED=false
#VC_TEKU_ALLOY_MONITORED=false
#MEV_MEV_BOOST_ALLOY_MONITORED=false
#MEV_COMMIT_BOOST_ALLOY_MONITORED=false
#EJECTOR_ALLOY_MONITORED=false
#DV_EXIT_ALLOY_MONITORED=false

######### Debug Config #########

Expand Down
42 changes: 21 additions & 21 deletions .env.sample.mainnet
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ MEV_RELAYS=https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b
# Loki log aggregation server addresses. Disable loki log aggregation by setting an empty address.
#CHARON_LOKI_ADDRESSES=

# Charon Cluster Name. Mandatory to send logs with Promtail.
#CLUSTER_NAME=
# Charon Cluster Name. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_NAME=""

# Charon Cluster Peer. Mandatory to send logs with Promtail.
#CLUSTER_PEER=
# Charon Cluster Peer. Mandatory to send logs with Alloy and metrics with Prometheus.
#CLUSTER_PEER=""

# Nickname to identify this charon node on monitoring (max 32 characters).
#CHARON_NICKNAME=
#CHARON_NICKNAME=""

# Docker network of running charon node. See `docker network ls`.
#CHARON_DOCKER_NETWORK=
Expand Down Expand Up @@ -196,23 +196,23 @@ MEV_RELAYS=https://0xa15b52576bcbf1072f4a011c0f99f9fb6c66f3e1ff321f11f461d15e31b
# Prometheus service owner used to uniquely identify user from which metrics are pushed.
#SERVICE_OWNER=charon_user

# Uncomment these if you have log exporting with Promtail
# Uncomment these if you have log exporting with Alloy
# and want to disable log export on a particular container.
#EL_NETHERMIND_PROMTAIL_MONITORED=false
#EL_RETH_PROMTAIL_MONITORED=false
#CL_LIGHTHOUSE_PROMTAIL_MONITORED=false
#CL_GRANDINE_PROMTAIL_MONITORED=false
#CL_TEKU_PROMTAIL_MONITORED=false
#CL_LODESTAR_PROMTAIL_MONITORED=false
#CHARON_PROMTAIL_MONITORED=false
#VC_LODESTAR_PROMTAIL_MONITORED=false
#VC_NIMBUS_PROMTAIL_MONITORED=false
#VC_PRYSM_PROMTAIL_MONITORED=false
#VC_TEKU_PROMTAIL_MONITORED=false
#MEV_MEV_BOOST_PROMTAIL_MONITORED=false
#MEV_COMMIT_BOOST_PROMTAIL_MONITORED=false
#EJECTOR_PROMTAIL_MONITORED=false
#DV_EXIT_PROMTAIL_MONITORED=false
#EL_NETHERMIND_ALLOY_MONITORED=false
#EL_RETH_ALLOY_MONITORED=false
#CL_LIGHTHOUSE_ALLOY_MONITORED=false
#CL_GRANDINE_ALLOY_MONITORED=false
#CL_TEKU_ALLOY_MONITORED=false
#CL_LODESTAR_ALLOY_MONITORED=false
#CHARON_ALLOY_MONITORED=false
#VC_LODESTAR_ALLOY_MONITORED=false
#VC_NIMBUS_ALLOY_MONITORED=false
#VC_PRYSM_ALLOY_MONITORED=false
#VC_TEKU_ALLOY_MONITORED=false
#MEV_MEV_BOOST_ALLOY_MONITORED=false
#MEV_COMMIT_BOOST_ALLOY_MONITORED=false
#EJECTOR_ALLOY_MONITORED=false
#DV_EXIT_ALLOY_MONITORED=false

######### Debug Config #########

Expand Down
87 changes: 87 additions & 0 deletions alloy/config.alloy.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
discovery.docker "docker" {
host = "unix:///var/run/docker.sock"
}

loki.process "docker" {
forward_to = [loki.write.default.receiver]

stage.docker { }
}

discovery.relabel "docker" {
targets = discovery.docker.docker.targets

rule {
source_labels = ["__meta_docker_container_label_alloy_monitored"]
regex = "true"
action = "keep"
}

rule {
source_labels = ["__meta_docker_container_name"]
regex = "/(.*)"
target_label = "container"
}

rule {
source_labels = ["container"]
regex = ".*charon.*"
target_label = "job"
replacement = "charon"
}

rule {
source_labels = ["container"]
regex = ".*nethermind.*"
target_label = "job"
replacement = "nethermind"
}

rule {
source_labels = ["container"]
regex = ".*lodestar.*"
target_label = "job"
replacement = "lodestar"
}

rule {
source_labels = ["container"]
regex = ".*lighthouse.*"
target_label = "job"
replacement = "lighthouse"
}

rule {
source_labels = ["container"]
regex = ".*mev-boost.*"
target_label = "job"
replacement = "mev-boost"
}

rule {
target_label = "cluster_name"
replacement = "$CLUSTER_NAME"
}

rule {
target_label = "cluster_peer"
replacement = "$CLUSTER_PEER"
}
}

loki.source.docker "docker" {
host = "unix:///var/run/docker.sock"
targets = discovery.docker.docker.targets
forward_to = [loki.process.docker.receiver]
relabel_rules = discovery.relabel.docker.rules
}

loki.write "default" {
endpoint {
url = "$CHARON_LOKI_ADDRESSES"
}
external_labels = {
cluster_name = "$CLUSTER_NAME",
cluster_peer = "$CLUSTER_PEER",
}
}
34 changes: 34 additions & 0 deletions alloy/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/sh

if [ -z "${CHARON_LOKI_ADDRESSES:-}" ]; then
echo "Error: \$CHARON_LOKI_ADDRESSES variable is empty" >&2
exit 1
fi

if [ -z "${CLUSTER_NAME:-}" ]; then
echo "Error: \$CLUSTER_NAME variable is empty" >&2
exit 1
fi

if [ -z "${CLUSTER_PEER:-}" ]; then
echo "Error: \$CLUSTER_PEER variable is empty" >&2
exit 1
fi

SRC="/etc/alloy/config.alloy.example"
DST="/etc/alloy/config.alloy"

echo "Rendering template: $SRC -> $DST"

sed -e "s|\$CHARON_LOKI_ADDRESSES|${CHARON_LOKI_ADDRESSES}|g" \
-e "s|\$CLUSTER_NAME|${CLUSTER_NAME}|g" \
-e "s|\$CLUSTER_PEER|${CLUSTER_PEER}|g" \
"$SRC" > "$DST"

echo "Config successfully rendered to $DST"

# Execute the command passed as arguments if any
if [ $# -gt 0 ]; then
echo "Executing: $@"
exec "$@"
fi
8 changes: 4 additions & 4 deletions compose-cl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
image: sifrai/grandine:${GRANDINE_VERSION:-v2.0.0}
restart: unless-stopped
labels:
- "promtail-monitored=${CL_GRANDINE_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${CL_GRANDINE_ALLOY_MONITORED:-true}"
command:
- --data-dir=/root/.grandine
- --eth1-rpc-urls=http://${EL}:8551
Expand Down Expand Up @@ -48,7 +48,7 @@ services:
image: sigp/lighthouse:${LIGHTHOUSE_VERSION:-v8.0.0}
restart: unless-stopped
labels:
- "promtail-monitored=${CL_LIGHTHOUSE_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${CL_LIGHTHOUSE_ALLOY_MONITORED:-true}"
command: |
lighthouse bn
--network=${NETWORK}
Expand Down Expand Up @@ -83,7 +83,7 @@ services:
image: consensys/teku:${VC_VERSION:-25.11.0}
restart: unless-stopped
labels:
- "promtail-monitored=${CL_TEKU_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${CL_TEKU_ALLOY_MONITORED:-true}"
command: |
--network=${NETWORK}
--checkpoint-sync-url=${LIGHTHOUSE_CHECKPOINT_SYNC_URL}
Expand Down Expand Up @@ -115,7 +115,7 @@ services:
image: chainsafe/lodestar:${VC_VERSION:-v1.36.0}
restart: unless-stopped
labels:
- "promtail-monitored=${CL_LODESTAR_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${CL_LODESTAR_ALLOY_MONITORED:-true}"
command: |
beacon
--network=${NETWORK}
Expand Down
4 changes: 2 additions & 2 deletions compose-el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ services:
- ${EL_IP_HTTP:-127.0.0.1}:${EL_PORT_HTTP:-8545}:8545 # JSON-RPC
- ${EL_IP_ENGINE:-127.0.0.1}:${EL_PORT_ENGINE:-8551}:8551 # ENGINE-API
labels:
- "promtail-monitored=${EL_NETHERMIND_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${EL_NETHERMIND_ALLOY_MONITORED:-true}"
command: |
--config=${NETWORK}
--data-dir=/nethermind/data
Expand Down Expand Up @@ -56,7 +56,7 @@ services:
- ${EL_IP_HTTP:-127.0.0.1}:${EL_PORT_HTTP:-8545}:8545 # JSON-RPC
- ${EL_IP_ENGINE:-127.0.0.1}:${EL_PORT_ENGINE:-8551}:8551 # ENGINE-API
labels:
- "promtail-monitored=${EL_RETH_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${EL_RETH_ALLOY_MONITORED:-true}"
command: |
node
--chain=${NETWORK}
Expand Down
4 changes: 2 additions & 2 deletions compose-mev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ services:
volumes:
- ./commit-boost/config.toml:/etc/commit-boost/config.toml:ro
labels:
- "promtail-monitored=${MEV_COMMIT_BOOST_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${MEV_COMMIT_BOOST_ALLOY_MONITORED:-true}"
networks: [dvnode]
restart: unless-stopped

Expand All @@ -40,6 +40,6 @@ services:
-request-timeout-getpayload=${MEV_TIMEOUT_GETPAYLOAD:-4000}
-request-timeout-regval=${MEV_TIMEOUT_REGVAL:-3000}
labels:
- "promtail-monitored=${MEV_MEV_BOOST_PROMTAIL_MONITORED:-true}"
- "alloy-monitored=${MEV_MEV_BOOST_ALLOY_MONITORED:-true}"
networks: [dvnode]
restart: unless-stopped
Loading