-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds preliminary support to the Swarm Client for Prometheus metrics (see https://prometheus.io), by way of Micrometer (see https://micrometer.io). Currently, only process resource usage and JVM statistics are reported, but in the future we could expand this to report stats specific to Swarm Client. One reason for adding this feature is to facilitate monitoring of Swarm Client nodes. If the Swarm Client service itself crashes, then alertmanager (see https://github.com/prometheus/alertmanager) can be used to send alerts about the service being down. At the moment, only Prometheus is configured as an endpoint, but in the future other metrics platforms could also be supported.
- Loading branch information
1 parent
799e51f
commit 3131c1b
Showing
6 changed files
with
123 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Prometheus monitoring | ||
|
||
The Jenkins Swarm Client has support for [Prometheus](https://prometheus.io) monitoring, which can be used to scrape | ||
data from a Prometheus server. To start a Prometheus endpoint, simply use a non-zero value for the `-prometheusPort` | ||
option when starting the client JAR. The service will be stopped when the Swarm Client exits. | ||
|
||
The actual metrics can be accessed on the `/prometheus` endpoint. So for example, if the node's IP address is | ||
`169.254.10.12`, and `9100` is passed to `-prometheusPort`, then the metrics can be accessed at: | ||
`http://169.254.10.12:9100/prometheus`. | ||
|
||
## Data Reported | ||
|
||
The client reports metrics for: | ||
|
||
- Basic process info, including: | ||
- Process uptime | ||
- CPU time consumed | ||
- Virtual memory consumed | ||
- Resident memory consumed | ||
- File descriptors consumed | ||
- JVM metrics such as: | ||
- CPU usage | ||
- Memory usage | ||
- Thread states | ||
- Garbage collection statistics | ||
- Class loader statistics |
This file contains 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