-
Notifications
You must be signed in to change notification settings - Fork 779
use statsd for indexer monitoring #3279
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ahornace
suggested changes
Oct 14, 2020
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/StatsdConfig.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/RuntimeEnvironment.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/RuntimeEnvironment.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/Metrics.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/Metrics.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/Metrics.java
Outdated
Show resolved
Hide resolved
opengrok-indexer/src/main/java/org/opengrok/indexer/configuration/StatsdConfig.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Adam Hornáček <[email protected]>
Co-authored-by: Adam Hornáček <[email protected]>
Co-authored-by: Adam Hornáček <[email protected]>
ahornace
reviewed
Oct 14, 2020
ahornace
reviewed
Oct 14, 2020
opengrok-indexer/src/main/java/org/opengrok/indexer/Metrics.java
Outdated
Show resolved
Hide resolved
Pull Request Test Coverage Report for Build 5493
💛 - Coveralls |
ahornace
approved these changes
Oct 15, 2020
Thanks for the review ! |
vladak
pushed a commit
to vladak/OpenGrok
that referenced
this pull request
Oct 19, 2020
introduce StatsdRegistry Co-authored-by: Adam Hornáček <[email protected]> fixes oracle#3245
vladak
pushed a commit
that referenced
this pull request
Apr 9, 2021
introduce StatsdRegistry Co-authored-by: Adam Hornáček <[email protected]> fixes #3245
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change introduces remote monitoring of indexer via statsd registry in Micrometer. I wanted to use statsd for indexer because it does not require scraping and therefore the need for a web server. This would either conflict with already running web server on the same machine (assuming the indexer is usually run on the same machine as the web application) or would involve poking holes into firewall to allow the scraping to pass through to distinct TCP port.
Example read-only configuration:
This was used to generate the graphs in #3248 (comment) (I used statsd-exporter for Prometheus and Grafana)
The metrics are not tagged unless the indexer is run per project.
During testing I noticed that some of the metrics recorded in the final stages of indexing are not sent out even with buffering set to false and big delay at the end of the Indexer#main. This is not such a big deal given that statsd traffic is usually not reliable anyway (assuming UDP by default). I will definitely investigate.
Once this is merged in I will update https://github.com/oracle/opengrok/wiki/Monitoring with example rig configuration.