Skip to content

Commit b0557e3

Browse files
committed
refinements and enable observability services
1 parent b920e85 commit b0557e3

3 files changed

Lines changed: 11 additions & 8 deletions

File tree

bob-common/mkosi.extra/etc/prometheus/prometheus.yml.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ scrape_configs:
2323
static_configs:
2424
- targets: ['localhost:9256']
2525

26+
{{ if (datasource "config" "remote_write_flashbots_url") }}
2627
# Remote write configuration (dynamically configured)
2728
remote_write:
28-
{{ if (datasource "config" "remote_write_flashbots_url") }}
2929
# Flashbots endpoint
3030
- url: {{ datasource "config" "remote_write_flashbots_url" }}
3131
write_relabel_configs:

bob-common/mkosi.extra/usr/bin/fetch-config.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,17 @@ CONFIG_METRICS_FLASHBOTS_PASSWORD='${metrics_flashbots_password}'
4646
METRICS_ENDPOINT='${metrics_endpoint}'
4747
EOF
4848

49-
# Create observability config for Prometheus if metrics are configured
50-
if [ -n "$metrics_flashbots_url" ]; then
51-
mkdir -p /etc/flashbox
52-
cat <<EOF > "$OBSERVABILITY_CONFIG_PATH"
49+
# Create observability config for Prometheus (always needed for gomplate templating)
50+
mkdir -p /etc/flashbox
51+
cat <<EOF > "$OBSERVABILITY_CONFIG_PATH"
5352
{
5453
"remote_write_flashbots_url": "${metrics_flashbots_url}",
5554
"remote_write_flashbots_username": "${metrics_flashbots_username}",
5655
"remote_write_flashbots_password": "${metrics_flashbots_password}",
5756
"remote_write_flashbots_auth": $([ -n "${metrics_flashbots_username}" ] && echo '"true"' || echo '""')
5857
}
5958
EOF
60-
echo "Observability configuration written to $OBSERVABILITY_CONFIG_PATH"
61-
fi
59+
echo "Observability configuration written to $OBSERVABILITY_CONFIG_PATH"
6260
}
6361

6462
# Check for local QEMU development environment

bob-common/mkosi.postinst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,19 @@ mkdir "$BUILDROOT/etc/dropbear"
2222
mkdir -p "$BUILDROOT/etc/systemd/system/minimal.target.wants"
2323
for service in \
2424
network-setup.service \
25+
fetch-config.service \
2526
logrotate.timer \
2627
delay-pipe.service \
2728
wait-for-key.service \
2829
searcher-firewall.service \
2930
dropbear.service \
31+
input-only-proxy.service \
3032
searcher-container.service \
3133
ssh-pubkey-server.service \
32-
cvm-reverse-proxy.service
34+
cvm-reverse-proxy.service \
35+
prometheus.service \
36+
node-exporter.service \
37+
process-exporter.service
3338
do
3439
mkosi-chroot systemctl enable "$service"
3540
ln -sf "/etc/systemd/system/$service" "$BUILDROOT/etc/systemd/system/minimal.target.wants/"

0 commit comments

Comments
 (0)