{"id":16774054,"url":"https://github.com/zigarn/kafka-connect-jmx","last_synced_at":"2025-04-10T20:04:11.677Z","repository":{"id":57744180,"uuid":"118013420","full_name":"zigarn/kafka-connect-jmx","owner":"zigarn","description":"Kafka connect JMX Source Connector","archived":false,"fork":false,"pushed_at":"2019-05-09T05:42:49.000Z","size":17,"stargazers_count":7,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-24T17:51:55.701Z","etag":null,"topics":["connector","jmx","kafka","kafka-connect","kafka-connect-jmx","kafka-connector","source-connector"],"latest_commit_sha":null,"homepage":"","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/zigarn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-18T17:12:25.000Z","updated_at":"2022-05-28T12:36:46.000Z","dependencies_parsed_at":"2022-08-30T10:51:32.998Z","dependency_job_id":null,"html_url":"https://github.com/zigarn/kafka-connect-jmx","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigarn%2Fkafka-connect-jmx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigarn%2Fkafka-connect-jmx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigarn%2Fkafka-connect-jmx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zigarn%2Fkafka-connect-jmx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zigarn","download_url":"https://codeload.github.com/zigarn/kafka-connect-jmx/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248287972,"owners_count":21078819,"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","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":["connector","jmx","kafka","kafka-connect","kafka-connect-jmx","kafka-connector","source-connector"],"created_at":"2024-10-13T06:47:53.221Z","updated_at":"2025-04-10T20:04:11.654Z","avatar_url":"https://github.com/zigarn.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JMX Source Connector\n\nThe JmxSourceConnector is a [Source Connector](https://docs.confluent.io/current/connect/javadocs/index.html?org/apache/kafka/connect/source/SourceConnector.html) that collects JMX metrics and push them to Kafka.\n\nBuild status: [![CircleCI](https://circleci.com/gh/zigarn/kafka-connect-jmx.svg?style=svg)](https://circleci.com/gh/zigarn/kafka-connect-jmx)\n\n## Configuration\n\n| Name                    | Type   | Importance | Default Value | Validator | Documentation                                            |\n| ----------------------- | ------ | ---------- | ------------- | --------- | ---------------------------------------------------------|\n| `topic`                 | String | High       |               |           | The topic to publish data to                             |\n| `jmx.url`               | String | High       |               |           | The JMX URL to fetch data from                           |\n| `jmx.username`          | String | Medium     | `\"\"`          |           | The username to connect to JMX                           |\n| `jmx.password`          | String | Medium     | `[hidden]`    |           | The password to connect to JMX                           |\n| `connection.attempts`   | Int    | Low        | `3`           | `[0,...]` | Maximum number of attempts to retrieve a JMX connection  |\n| `connection.backoff.ms` | Long   | Low        | `10 000`      | `[0,...]` | Backoff time in milliseconds between connection attempts |\n\n\n### Connect-standalone example\n\nThis configuration is used typically along with [standalone mode](https://docs.confluent.io/current/connect/concepts.html#standalone-workers):\n\n```properties\nname=jmx-connector\ntasks.max=1\n\nconnector.class=com.zigarn.kafka.connect.jmx.JmxSourceConnector\ntopic=connect-jmx\njmx.url=service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi\n# Set the following configuration if JMX authentication is necessary\njmx.username=jmx_user\njmx.password=jmx_password\n```\n\n### Connect-distributed\n\nThis configuration is used typically along with [distributed mode](http://docs.confluent.io/current/connect/concepts.html#distributed-workers):\n\n```json\n{\n    \"name\": \"jmx-connector\",\n    \"config\": {\n        \"connector.class\": \"com.zigarn.kafka.connect.jmx.JmxSourceConnector\",\n        \"topic\": \"connect-jmx\",\n        \"jmx.url\": \"service:jmx:rmi:///jndi/rmi://localhost:9999/jmxrmi\",\n        \"connection.attempts\": 5,\n        \"connection.backoff.ms\": 1000\n    }\n}\n```\n\nPut this configuration in a `connector.json` file, then post it to one of the Kafka-connect workers:\n\n```shell\ncurl -s -X POST -H 'Content-Type: application/json' --data @connector.json http://localhost:8083/connectors\n```\n\n## Output\n\nFor each MBean available on the JMX server, a record will be sent to the configured topic with the following structure:\n\n - key: [`Struct`](https://docs.confluent.io/current/connect/javadocs/org/apache/kafka/connect/data/Struct.html) with fields:\n   - `jmx.url`: JMX service URL the MBean was retrieved from\n   - `bean`: canonical name of the MBean\n   - `timestamp`: timestamp when the MBean was retrieved\n - value: a map of MBean attributes with attribute name as key and String representation of attribute value as value\n\nFor example:\n\n```json\n// Key\n{\n  \"jmx.url\":\"/jndi/rmi://localhost:9999/jmxrmi\",\n  \"bean\":\"kafka.producer:client-id=confluent-control-center-heartbeat-sender-1-producer,type=producer-metrics\",\n  \"timestamp\":1516713540685\n}\n// Value\n{\n  \"connection-creation-total\":\"4.0\",\n  \"bufferpool-wait-time-total\":\"0.0\",\n  \"batch-split-total\":\"0.0\",\n  \"produce-throttle-time-max\":\"0.0\",\n  \"select-rate\":\"0.3663979748184665\",\n  \"connection-close-total\":\"0.0\",\n  \"outgoing-byte-rate\":\"113.48899714429699\",\n  \"record-send-total\":\"300.0\",\n  \"batch-size-max\":\"137.0\",\n  \"produce-throttle-time-avg\":\"0.0\",\n  \"iotime-total\":\"6.6670434E7\",\n  \"successful-authentication-total\":\"4.0\",\n  \"batch-split-rate\":\"0.0\",\n  \"io-waittime-total\":\"2.5733506471E11\",\n  \"request-rate\":\"0.06719075455217363\",\n  \"buffer-available-bytes\":\"3.3554432E7\",\n  ...\n  \"io-time-ns-avg\":\"90059.09090909091\",\n  \"compression-rate-avg\":\"0.9496202588081359\",\n  \"record-retry-rate\":\"0.0\",\n  \"request-latency-max\":\"104.0\",\n  \"record-size-max\":\"157.0\",\n  \"select-total\":\"2.5733506471E11\",\n  \"buffer-total-bytes\":\"3.3554432E7\",\n  \"batch-size-avg\":\"136.4\"\n}\n```\n\n## Further documentation\n\nPlease see [documentation](docs).\n\n## License\n\n[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigarn%2Fkafka-connect-jmx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzigarn%2Fkafka-connect-jmx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzigarn%2Fkafka-connect-jmx/lists"}