-
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.
Add Prometheus metrics support to Swarm Client
This commit adds preliminary support to the Swarm Client for Prometheus metrics (see https://prometheus.io). Currently, only stats about JVM usage 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.
- Loading branch information
1 parent
ff52450
commit e0205f8
Showing
5 changed files
with
67 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,22 @@ | ||
# 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 at the root-level of the service page. 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/`. | ||
|
||
## Data Reported | ||
|
||
The following metrics are reported by the client: | ||
|
||
- Basic process info, including: | ||
- Process uptime | ||
- CPU time consumed | ||
- Virtual memory consumed | ||
- Resident memory consumed | ||
- File descriptors consumed | ||
- JVM metrics such as CPU and memory usage, thread states, etc. |