Update init script to enable prometheus metrics (#28)
All checks were successful
Integration Tests / test-integration (push) Successful in 2m11s
E2E Tests / test-e2e (push) Successful in 3m56s
Lint / Run golangci-lint (push) Successful in 4m51s
Unit Tests / test-unit (push) Successful in 2m24s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 9m36s
SDK Tests / sdk_tests (push) Successful in 10m25s
SDK Tests / sdk_tests_auctions (push) Successful in 14m25s

Part of https://www.notion.so/Monitoring-and-alerting-for-laconicd-86727c3b4dde4dc993d87d6e29f935fe

Reviewed-on: cerc-io/laconic2d#28
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Prathamesh Musale 2024-04-11 07:56:50 +00:00 committed by ashwin
parent 816e1623ac
commit 1d3311b864

View File

@ -66,6 +66,17 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
fi fi
# Enable telemetry (prometheus metrics: http://localhost:1317/metrics?format=prometheus)
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml
sed -i '' 's/prometheus-retention-time = 0/prometheus-retention-time = 60/g' $HOME/.laconicd/config/app.toml
sed -i '' 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
else
sed -i 's/enabled = false/enabled = true/g' $HOME/.laconicd/config/app.toml
sed -i 's/prometheus-retention-time = 0/prometheus-retention-time = 60/g' $HOME/.laconicd/config/app.toml
sed -i 's/prometheus = false/prometheus = true/g' $HOME/.laconicd/config/config.toml
fi
# Allocate genesis accounts (cosmos formatted addresses) # Allocate genesis accounts (cosmos formatted addresses)
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING