{"id":21291510,"url":"https://github.com/postfinance/apache-exporter","last_synced_at":"2025-09-03T07:32:53.462Z","repository":{"id":49909519,"uuid":"285491247","full_name":"postfinance/apache-exporter","owner":"postfinance","description":"Exports server statistics provided by mod_status of an Apache HTTP server to Prometheus metrics format","archived":false,"fork":false,"pushed_at":"2021-06-08T11:52:22.000Z","size":39,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-06-30T10:04:14.129Z","etag":null,"topics":["exporter","metrics","prometheus"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/postfinance.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":"2020-08-06T06:24:31.000Z","updated_at":"2024-11-19T19:25:27.000Z","dependencies_parsed_at":"2022-08-29T17:50:18.619Z","dependency_job_id":null,"html_url":"https://github.com/postfinance/apache-exporter","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/postfinance/apache-exporter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfinance%2Fapache-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfinance%2Fapache-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfinance%2Fapache-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfinance%2Fapache-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/postfinance","download_url":"https://codeload.github.com/postfinance/apache-exporter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/postfinance%2Fapache-exporter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273409320,"owners_count":25100442,"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-03T02:00:09.631Z","response_time":76,"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":["exporter","metrics","prometheus"],"created_at":"2024-11-21T13:34:05.536Z","updated_at":"2025-09-03T07:32:53.396Z","avatar_url":"https://github.com/postfinance.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Exporter for Prometheus\nExports server statistics provided by mod_status of an Apache HTTP server to Prometheus metrics format\n\n## Usage \n\nIt can be built with:\n\n```\nmvn clean install\n```\n\nIt can be importer in your Maven project with\n\n```\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.github.postfinance.prometheus\u003c/groupId\u003e\n  \u003cartifactId\u003eapache-exporter\u003c/artifactId\u003e\n  \u003cversion\u003eVERSION\u003c/version\u003e\n\u003c/dependency\u003e\n\n```\n\n### ModStatus URL\n\nThe Apache ModStatus URL where the metrics are read, can be configured with\n\n* A parameter in the ApacheExporter constructor\n* A System Property: httpdModStatusUrl\n* An Environment Property: HTTPD_MOD_STATUS_URL\n\nThe default value is http://localhost/server-status?auto\n\n### Apache HTTPD Metrics\n\nTo obtain the metrics for apache, an istance of the ApacheExporter class should be created \nand one of the following methods called:\n\n* First method\n\n```\npublic String export() throws IOException\npublic String export(String interfaceName) throws IOException\n```\nreturns a String in the format:\n\n```\n# HELP apache_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which apache_exporter was built.\n# TYPE apache_exporter_build_info gauge\napache_exporter_build_info{branch=\"HEAD\",goversion=\"go1.12.6\",revision=\"6195241a96c02af175ba2842dfd883682133b066\",version=\"0.7.0\"} 1\n# HELP apache_scoreboard Apache scoreboard statuses\n# TYPE apache_scoreboard gauge\napache_scoreboard{state=\"closing\"} 0\napache_scoreboard{state=\"dns\"} 0\napache_scoreboard{state=\"graceful_stop\"} 0\napache_scoreboard{state=\"idle\"} 6\napache_scoreboard{state=\"idle_cleanup\"} 0\napache_scoreboard{state=\"keepalive\"} 1\napache_scoreboard{state=\"logging\"} 0\napache_scoreboard{state=\"open_slot\"} 142\napache_scoreboard{state=\"read\"} 0\napache_scoreboard{state=\"reply\"} 1\napache_scoreboard{state=\"startup\"} 0\n# HELP apache_sent_kilobytes_total Current total kbytes sent (*)\n# TYPE apache_sent_kilobytes_total counter\napache_sent_kilobytes_total 5721\n# HELP apache_up Could the apache server be reached\n# TYPE apache_up gauge\napache_up 1\n# HELP apache_uptime_seconds_total Current uptime in seconds (*)\n# TYPE apache_uptime_seconds_total counter\napache_uptime_seconds_total 9255\n# HELP apache_workers Apache worker statuses\n# TYPE apache_workers gauge\napache_workers{state=\"busy\"} 2\napache_workers{state=\"idle\"} 6\n\n```\n\nExample:\n\n```\n  ApacheExporter exporter = new ApacheExporter(\"http://myhost:7070/midw-status?auto\");\n  String result = exporter.export()\n```\n\n* Second method\n\n```\npublic ArrayList\u003cCollector.MetricFamilySamples\u003e exportSamplesList()\npublic ArrayList\u003cCollector.MetricFamilySamples\u003e exportSamplesList(String interfaceName)\n```\n\nIt returns a list of samples of type Collector.MetricFamilySamples\n\n\nExample:\n\n```\n  ApacheExporter exporter = new ApacheExporter(\"http://myhost:7070/midw-status?auto\");\n  List\u003cCollector.MetricFamilySamples\u003e mfsList = exporter.exportSamplesList(\"eth0\")\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostfinance%2Fapache-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpostfinance%2Fapache-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpostfinance%2Fapache-exporter/lists"}