{"id":31058423,"url":"https://github.com/marcelmay/prometheus-client-webapp","last_synced_at":"2025-09-15T07:50:57.277Z","repository":{"id":57730708,"uuid":"389404363","full_name":"marcelmay/prometheus-client-webapp","owner":"marcelmay","description":"A simple WAR wrapper for instrumenting your app server","archived":false,"fork":false,"pushed_at":"2021-07-27T17:46:24.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-02T13:48:19.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcelmay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-25T17:29:28.000Z","updated_at":"2021-07-27T17:46:27.000Z","dependencies_parsed_at":"2022-09-26T22:01:34.684Z","dependency_job_id":null,"html_url":"https://github.com/marcelmay/prometheus-client-webapp","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/marcelmay/prometheus-client-webapp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmay%2Fprometheus-client-webapp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmay%2Fprometheus-client-webapp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmay%2Fprometheus-client-webapp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmay%2Fprometheus-client-webapp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcelmay","download_url":"https://codeload.github.com/marcelmay/prometheus-client-webapp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcelmay%2Fprometheus-client-webapp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275225867,"owners_count":25427000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-15T02:00:09.272Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-15T07:50:51.792Z","updated_at":"2025-09-15T07:50:57.253Z","avatar_url":"https://github.com/marcelmay.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prometheus-client-webapp\nA simple WAR wrapper for instrumenting your app server and exposing metrics.\n\n[![Maven Central](https://img.shields.io/maven-central/v/de.m3y.prometheus.client/prometheus-client-webapp)](https://search.maven.org/search?q=g:de.m3y.prometheus.client%20AND%20a:prometheus-client-webapp) \n\nThis is an alternative to the usually preferred [jmx_exporter](https://github.com/prometheus/jmx_exporter)\nand suitable when you have minimal access to your app server,\ne.g. in a large centrally managed setup splitting operations and development responsiblities.\n\nThe WAR\n* registers JVM [DefaultExports](https://github.com/prometheus/client_java/blob/master/simpleclient_hotspot/src/main/java/io/prometheus/client/hotspot/DefaultExports.java)\n* registers [JmxCollector](https://github.com/prometheus/jmx_exporter/blob/master/collector/src/main/java/io/prometheus/jmx/JmxCollector.java)\n* exposes metrics via [MetricsServlet](https://github.com/prometheus/client_java/blob/master/simpleclient_servlet/src/main/java/io/prometheus/client/exporter/MetricsServlet.java)\n\n## Configuration\nYou can configure the [JmxCollector](https://github.com/prometheus/jmx_exporter#configuration)\n1. by setting system property `jmx_collector_config_file` pointing to a local file\n2. by setting in your web.xml a context parameter pointing to a local file\n   ```\n   \u003ccontext-param\u003e\n        \u003cparam-name\u003ejmx_collector_config_file\u003c/param-name\u003e\n        \u003cparam-value\u003e/PATH/TO/CONFIGFILE\u003c/param-value\u003e\n    \u003c/context-param\u003e\n   ```\n3. by setting the default config directly in the web.xml (**default config!**)  \n   ```\n    \u003ccontext-param\u003e\n        \u003cparam-name\u003ejmx_collector_config\u003c/param-name\u003e\n        \u003cparam-value\u003e\n            ---\n            # Default config embedded in web.xml\n            rules:\n            - pattern: \".*\"\n        \u003c/param-value\u003e\n    \u003c/context-param\u003e\n   ```\nThis last setting is the default config.\nFirst configuration found wins. So you can always override via system property.\n\n## Metrics\n| Metric names | Type | Descriptions |\n|--------|------|--------------|\n| prometheus_webapp_build_info{version, buildTime, buildScmVersion, buildScmBranch} | Info | Build info of this WAR |\n| jvm_* | | Default JVM metrics, see [Prometheus client hotpot](https://prometheus.github.io/client_java/io/prometheus/client/hotspot/package-summary.html) |\n| jmx_* | | Default JMX Collector metrics, see [Prometheus jmx_exporter](https://github.com/prometheus/jmx_exporter) |\n\n## Building\n\n```\nmvn clean install\n```\n\n### A simple test run\n```\nmvn jetty:run\nopen http://localhost:8080/\n```\n\n## Requirements\nFor building:\n* JDK 8\n* [Maven 3.6.x](http://maven.apache.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelmay%2Fprometheus-client-webapp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelmay%2Fprometheus-client-webapp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelmay%2Fprometheus-client-webapp/lists"}