{"id":33178963,"url":"https://github.com/MetricsHub/metricshub-community","last_synced_at":"2025-11-20T21:03:05.177Z","repository":{"id":218958919,"uuid":"747709885","full_name":"MetricsHub/metricshub-community","owner":"MetricsHub","description":"Universal Metrics Collection for OpenTelemetry","archived":false,"fork":false,"pushed_at":"2025-11-20T18:44:50.000Z","size":16545,"stargazers_count":42,"open_issues_count":29,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-11-20T20:11:03.105Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://metricshub.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MetricsHub.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2024-01-24T13:42:37.000Z","updated_at":"2025-11-20T08:47:46.000Z","dependencies_parsed_at":"2024-02-19T11:25:41.091Z","dependency_job_id":"ce526a98-c636-40dd-aa0b-524a5ea5cb84","html_url":"https://github.com/MetricsHub/metricshub-community","commit_stats":null,"previous_names":["sentrysoftware/metricshub","metricshub/metricshub-community"],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/MetricsHub/metricshub-community","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetricsHub%2Fmetricshub-community","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetricsHub%2Fmetricshub-community/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetricsHub%2Fmetricshub-community/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetricsHub%2Fmetricshub-community/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MetricsHub","download_url":"https://codeload.github.com/MetricsHub/metricshub-community/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MetricsHub%2Fmetricshub-community/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285511775,"owners_count":27184237,"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-11-20T02:00:05.334Z","response_time":54,"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-11-16T03:00:36.817Z","updated_at":"2025-11-20T21:03:05.165Z","avatar_url":"https://github.com/MetricsHub.png","language":"Java","funding_links":[],"categories":["指标库"],"sub_categories":[],"readme":"\n---\n\n\u003cdiv align=center\u003e\n\n[![Website](https://img.shields.io/website?up_message=available\u0026down_message=down\u0026url=https%3A%2F%2Fmetricshub.com\u0026style=for-the-badge)](https://metricshub.com)\n[![GitHub release (with filter)](https://img.shields.io/github/v/release/metricshub/metricshub-community?style=for-the-badge)](https://github.com/metricshub/metricshub-community/releases)\n[![Build](https://img.shields.io/github/actions/workflow/status/metricshub/metricshub-community/maven-deploy.yml?style=for-the-badge)](https://github.com/MetricsHub/metricshub-community/actions/workflows/maven-deploy.yml)\n![GitHub top language](https://img.shields.io/github/languages/top/metricshub/metricshub-community?style=for-the-badge)\n[![License](https://img.shields.io/badge/license-AGPL%203.0-7b3e7b?style=for-the-badge)](https://github.com/metricshub/metricshub-community/blob/main/LICENSE)\n\n\u003ca href=\"https://metricshub.com\" target=\"_blank\"\u003e\n\t\u003cpicture\u003e\n\t\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"metricshub-doc/src/site/resources/images/logo-dark.svg\"\u003e\n\t\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"metricshub-doc/src/site/resources/images/logo-light.svg\"\u003e\n\t\u003cimg alt=\"MetricsHub\" src=\"metricshub-doc/src/site/resources/images/logo-light.svg\" width=\"250\"\u003e\n\t\u003c/picture\u003e\n\u003c/a\u003e\n\u003ch4\u003eMetricsHub®, is an open-source metrics collection tool that leverages OpenTelemetry for vendor-neutral observability.\u003c/h4\u003e\n\u003c/div\u003e\n\n---\n\n## How to Install (Red Hat, Debian Linux)\n\n```shell-session\ncurl -fsSL https://get.metricshub.com | bash\n```\n\n## Project Structure\n\nThis is a multi-module project:\n\n* **/**: The root (parent of all submodules)\n* **metricshub-engine**: The brain, the heart of this project. It houses the core logic and essential functionalities that power the entire system.\n* **metricshub-agent**: The MetricsHub Agent module includes a Command-Line Interface (CLI) and is responsible for interacting with the MetricsHub engine. It acts as an entry point, collecting and transmitting data to the OpenTelemetry Collector.\n* **metricshub-classloader-agent**: Manages class loading for extensions, ensuring that they are loaded correctly within the JVM.\n* **metricshub-ipmi-extension**: Provides support for the Intelligent Platform Management Interface (IPMI) to monitor and manage hardware at the firmware level.\n* **metricshub-oscommand-extension**: Allows execution of OS-level commands and scripts to gather metrics and other data from the operating system.\n* **metricshub-snmp-extension-common**: Contains common functionalities and utilities used by SNMP-based extensions.\n* **metricshub-snmp-extension**: Enables Simple Network Management Protocol (SNMP) for monitoring and managing network devices.\n* **metricshub-snmpv3-extension**: Adds support for SNMPv3, which includes enhanced security features like authentication and encryption.\n* **metricshub-internaldb-extension**: Executes internal database queries using MetricsHub's internal database engine.\n* **metricshub-win-extension-common**: Contains common functionalities and utilities used by Windows-specific extensions.\n* **metricshub-wmi-extension**: Provides support for Windows Management Instrumentation (WMI) to gather detailed information about Windows systems.\n* **metricshub-winrm-extension**: Enables the use of Windows Remote Management (WinRM) for remote management and monitoring of Windows-based systems.\n* **metricshub-wbem-extension**: Supports the Web-Based Enterprise Management (WBEM) standard for accessing management information.\n* **metricshub-ping-extension**: Enables testing the reachability of hosts using ICMP-based ping commands.\n* **metricshub-jawk-extension**: Allows execution of Jawk scripts.\n* **metricshub-jdbc-extension**: Provides support for monitoring SQL databases.\n* **metricshub-jmx-extension**: Enables monitoring of Java applications through JMX (Java Management Extensions).\n* **metricshub-hardware**: Hardware Energy and Sustainability module, dedicated to managing and monitoring hardware-related metrics, focusing on energy consumption and sustainability aspects.\n* **metricshub-yaml-configuration-extension**: Extension that loads configuration fragments from YAML files located in a configuration directory.\n* **metricshub-programmable-configuration-extension**: Provides a programmable configuration mechanism, allowing users to define custom configurations through [Apache Velocity](https://velocity.apache.org/) scripts.\n* **metricshub-web**: Provides a user interface for interacting with MetricsHub features and functionalities.\n* **metricshub-it-common**: Contains common code and utilities used by integration tests across various modules.\n* **metricshub-community-windows**: Builds the `.zip` package for MetricsHub on Windows platforms.\n* **metricshub-community-linux**: Builds the `.tar.gz` package of MetricsHub on Linux platforms.\n* **metricshub-doc**: Houses the documentation for MetricsHub.\n\n\u003e [!TIP]\n\u003e Looking for connectors? Check the [MetricsHub Community Connectors](https://github.com/metricshub/community-connectors) repository.\n\n## How to build the Project\n\n### Requirements\n\n* Have [Maven 3.x properly installed and configured](https://maven.apache.org/download.cgi).\n* Latest LTS Release of [JDK 21](https://adoptium.net).\n\n### JRE Builder dependency\n\nMetricsHub Community uses a custom JRE builder hosted in a separate repository: [metricshub-jre-builder](https://github.com/metricshub/metricshub-jre-builder).\n\nThe custom JRE artifact is deployed to **GitHub Packages**. To consume this dependency, ensure your Maven `settings.xml` is properly configured with authentication to GitHub's package registry. Here are the required steps:\n\n##### 1. Update your `~/.m2/settings.xml`\n\nAdd the following `\u003cserver\u003e` block inside the `\u003cservers\u003e` section of your `settings.xml`:\n\n```xml\n\u003cservers\u003e\n\t...\n\t\u003cserver\u003e\n\t\t\u003cid\u003egithub\u003c/id\u003e\n\t\t\u003cusername\u003eYOUR_GITHUB_USERNAME\u003c/username\u003e\n\t\t\u003cpassword\u003eYOUR_PERSONAL_ACCESS_TOKEN\u003c/password\u003e\n\t\u003c/server\u003e\n\t...\n\u003c/servers\u003e\n\n```\n\n\u003e 💡 The personal access token (PAT) must have at least the `read:packages` and `repo` scopes.\n\n\u003e 🔐 **Want to encrypt your GitHub token?**\n\u003e Maven supports secure encryption of your credentials. Follow the official [Maven Password Encryption](https://maven.apache.org/guides/mini/guide-encryption.html) guide to encrypt your token.\n\n##### 2. Add GitHub packages to `\u003cprofiles\u003e`\n\nAdd the following configuration inside a new `\u003cprofile\u003e` section in your `settings.xml`, and activate it:\n\n```xml\n\u003cprofiles\u003e\n\t...\n\t\u003cprofile\u003e\n\t\t\u003cid\u003egithub\u003c/id\u003e\n\t\t\u003crepositories\u003e\n\t\t\t\u003crepository\u003e\n\t\t\t\u003cid\u003egithub\u003c/id\u003e\n\t\t\t\u003cname\u003eGitHub JRE Builder Package\u003c/name\u003e\n\t\t\t\u003curl\u003ehttps://maven.pkg.github.com/metricshub/metricshub-jre-builder\u003c/url\u003e\n\t\t\t\u003creleases\u003e\n\t\t\t\t\u003cenabled\u003etrue\u003c/enabled\u003e\n\t\t\t\u003c/releases\u003e\n\t\t\t\u003csnapshots\u003e\n\t\t\t\t\u003cenabled\u003etrue\u003c/enabled\u003e\n\t\t\t\u003c/snapshots\u003e\n\t\t\t\u003c/repository\u003e\n\t\t\u003c/repositories\u003e\n\t\u003c/profile\u003e\n\t...\n\u003c/profiles\u003e\n\n\u003cactiveProfiles\u003e\n\t...\n\t\u003cactiveProfile\u003egithub\u003c/activeProfile\u003e\n\u003c/activeProfiles\u003e\n```\n\n\u003e 📦 Artifacts published here are used to build a custom runtime tailored to MetricsHub’s needs.\n\n### Accessing Snapshots from Maven Central\n\nTo access **snapshot artifacts** from [Maven Central Snapshots](https://central.sonatype.com/repository/maven-snapshots/), you need to explicitly configure the repository in your Maven `~/.m2/settings.xml`.\n\nAdd the following `\u003crepository\u003e` entry:\n\n```xml\n\u003crepositories\u003e\n    ...\n    \u003crepository\u003e\n        \u003cid\u003ecentral-snapshots\u003c/id\u003e\n        \u003cname\u003eMaven Repository Switchboard\u003c/name\u003e\n        \u003curl\u003ehttps://central.sonatype.com/repository/maven-snapshots\u003c/url\u003e\n        \u003creleases\u003e\n            \u003cenabled\u003efalse\u003c/enabled\u003e\n        \u003c/releases\u003e\n        \u003csnapshots\u003e\n            \u003cenabled\u003etrue\u003c/enabled\u003e\n        \u003c/snapshots\u003e\n    \u003c/repository\u003e\n    ...\n\u003c/repositories\u003e\n```\n\n\u003e 💡 This is required if your build depends on snapshot versions of dependencies hosted on Maven Central’s snapshots repository.\n\n### Build\n\nTo build the MetricsHub package, from `./metricshub`:\n\n```sh\n$ mvn clean package\n```\n\n#### Building Windows Packages (.zip)\n\n* **Host:** Windows\n* Execute the `mvn package` command within the MetricsHub root directory (`metricshub`). You can find the `.zip` package in the `metricshub/metricshub-community-windows/target` directory upon completion (`metricshub-community-windows-\u003cversion\u003e.zip`).\n\n#### Building Linux Packages (.tar.gz)\n\n* **Host:** Linux\n* Execute the `mvn package` command within the MetricsHub root directory (`metricshub`). You can find the `.tar.gz` package in the `metricshub/metricshub-community-linux/target` directory upon completion (`metricshub-community-linux-\u003cversion\u003e.tar.gz`).\n  * The `Docker` package is compatible with the `debian:latest` image, it will be generated under the `metricshub/metricshub-community-linux/target` directory (`metricshub-community-linux-\u003cversion\u003e-docker.tar.gz`).\n\n## Checkstyle\n\nIn this project, we use Checkstyle to ensure consistent and clean Java code across our codebase. \n\nMaven Checkstyle Plugin is configured globally in the main `pom.xml` file, and it verifies the Java code during the build process:\n\n```xml\n\t\u003cplugin\u003e\n\t\t\u003cartifactId\u003emaven-checkstyle-plugin\u003c/artifactId\u003e\n\t\t\u003cversion\u003e3.3.0\u003c/version\u003e\n\t\t\u003cconfiguration\u003e\n\t\t\t\u003csourceEncoding\u003e${project.build.sourceEncoding}\u003c/sourceEncoding\u003e\n\t\t\t\u003cconfigLocation\u003echeckstyle.xml\u003c/configLocation\u003e\n\t\t\u003c/configuration\u003e\n\t\t\u003cexecutions\u003e\n\t\t\t\u003cexecution\u003e\n\t\t\t\t\u003cid\u003evalidate\u003c/id\u003e\n\t\t\t\t\u003cphase\u003evalidate\u003c/phase\u003e\n\t\t\t\t\u003cgoals\u003e\n\t\t\t\t\t\u003cgoal\u003echeckstyle\u003c/goal\u003e\n\t\t\t\t\t\u003cgoal\u003echeck\u003c/goal\u003e\n\t\t\t\t\u003c/goals\u003e\n\t\t\t\u003c/execution\u003e\n\t\t\u003c/executions\u003e\n\t\u003c/plugin\u003e\n```\n\nThe Checkstyle rules that govern our code quality and style are defined in the `./checkstyle.xml` file. It's important to adhere to these rules to maintain code consistency and quality throughout the project.\n\nThe build will fail if one or more Checkstyle rules are violated.\n\nTo perform Checkstyle analysis and generate a report on violations, navigate to the directory of the Maven project you wish check and run the following `mvn` command:\n\n```bash\nmvn checkstyle:checkstyle\n```\n\nAll the encountered Checkstyle issues are reported under the `target/site` directory.\n\nTo perform Checkstyle analysis and output violations to the console, navigate to the directory of the Maven project you wish check and run the following `mvn` command:\n\n```bash\nmvn checkstyle:check\n```\n\n## Code Formatting\n\nIn this project, we maintain code formatting using [prettier-java](https://github.com/jhipster/prettier-java), a tool that helps ensure clean and consistent Java code. It automatically formats your code according to a predefined set of rules.\n\n### Prettier Maven Plugin\n\nTo automatically format the Java code in a specific Maven module, navigate to the directory of the Maven project you wish to format and run the following `mvn` command:\n\n```bash\nmvn prettier:write\n```\n\nTo validate the formatted code, navigate to the directory of the Maven project you wish to check and run the following `mvn` command:\n\n```bash\nmvn prettier:check\n```\n\nThe build will fail if you forgot to run Prettier.\n\n## Submitting a PR\n\nBefore you submit a PR, make sure to use the available tools for code formatting, and ensure that the style checks and unit tests pass.\n\n## License\n\nLicense is GNU Affero General Public License v3.0. Each source file must include the AGPL-3.0 header (build will fail otherwise).\nTo update source files with the proper header, simply execute the below command:\n\n```bash\nmvn license:update-file-header\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMetricsHub%2Fmetricshub-community","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMetricsHub%2Fmetricshub-community","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMetricsHub%2Fmetricshub-community/lists"}