Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support prometheus push metrics #796

Merged
merged 8 commits into from
Jun 13, 2023
Merged

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Jun 2, 2023

Add configuration for and pass through to Besu library, tested with Besu's instructions https://besu.hyperledger.org/en/stable/public-networks/how-to/monitor/metrics/#run-prometheus-with-besu-in-push-mode

Example CLI Usage:

web3signer --metrics-push-enabled --metrics-push-port 9091 --metrics-push-host=127.0.0.1  \
--metrics-push-interval=30 --metrics-push-prometheus-job="web3signer-job" \
eth2 --slashing-protection-enabled=false

Example config.yaml Usage web3signer --config-file=config.yaml eth2:

metrics-push-enabled: true
metrics-push-port: 9091
metrics-push-host: 127.0.0.1
metrics-push-interval: 60
metrics-push-prometheus-job: "web3signer-job"

eth2.slashing-protection-enabled: false

Minimal Usage (using defaults):

web3signer --metrics-push-enabled eth2 --slashing-protection-enabled=false

Defaults:

--metrics-push-enabled Enable the metrics push gateway integration
                               (default: false)
--metrics-push-host=<HOST>
                             Host of the Prometheus Push Gateway for push mode
                               (default: 127.0.0.1)
--metrics-push-port=<PORT>
                             Port of the Prometheus Push Gateway for push mode
                               (default: 9001)
--metrics-push-interval=<INTEGER>
                             Interval in seconds to push metrics when in push
                               mode (default: 15)
--metrics-push-prometheus-job=<metricsPrometheusJob>
                             Job name to use when in push mode (default:
                               web3signer-job)

Fixed Issue(s)

Fixes #790

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

@siladu siladu marked this pull request as ready for review June 2, 2023 07:25
@siladu siladu added the doc-change-required Indicates an issue or PR that requires doc to be updated label Jun 2, 2023
Signed-off-by: Simon Dudley <[email protected]>
Copy link
Contributor

@usmansaleem usmansaleem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

…CommandlineParserTest.java

Co-authored-by: Jason Frame <[email protected]>
Copy link
Contributor

@usmansaleem usmansaleem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - minor comment around checking for null.

@siladu siladu merged commit 040e511 into Consensys:master Jun 13, 2023
@siladu siladu deleted the push-metrics branch June 13, 2023 03:55
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jun 20, 2023
@siladu siladu added the doc-change-required Indicates an issue or PR that requires doc to be updated label Jun 21, 2023
@bgravenorst
Copy link

Removing label because this issue is now in the Doc backlog.

@bgravenorst bgravenorst removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement prometheus push gateway
5 participants