{"id":22663605,"url":"https://github.com/galuque/datomic-jmx-metrics","last_synced_at":"2026-03-10T14:32:52.494Z","repository":{"id":178201351,"uuid":"661462967","full_name":"galuque/datomic-jmx-metrics","owner":"galuque","description":"Handler function to expose Datomic's metrics via JMX. ","archived":false,"fork":false,"pushed_at":"2023-07-14T01:29:15.000Z","size":15,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-12T07:41:24.237Z","etag":null,"topics":["clojure","datomic","jmx","metrics","monitoring"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/galuque.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2023-07-02T23:21:09.000Z","updated_at":"2023-10-12T15:00:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"45659933-a5df-4f65-b2d4-e1e6a71d9545","html_url":"https://github.com/galuque/datomic-jmx-metrics","commit_stats":null,"previous_names":["galuque/datomic-jmx-metrics"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/galuque/datomic-jmx-metrics","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fdatomic-jmx-metrics","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fdatomic-jmx-metrics/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fdatomic-jmx-metrics/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fdatomic-jmx-metrics/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galuque","download_url":"https://codeload.github.com/galuque/datomic-jmx-metrics/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galuque%2Fdatomic-jmx-metrics/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30337247,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T12:41:07.687Z","status":"ssl_error","status_checked_at":"2026-03-10T12:41:06.728Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["clojure","datomic","jmx","metrics","monitoring"],"created_at":"2024-12-09T12:31:09.503Z","updated_at":"2026-03-10T14:32:52.473Z","avatar_url":"https://github.com/galuque.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Datomic JMX Metrics\n\nProvides a handler function to be used by Datomic's transactor and peer server to expose metrics via JMX. \n\nIt uses the [custom monitoring](https://docs.datomic.com/pro/operation/monitoring.html#custom) feature of Datomic\n\nWith the metrics exposed via JMX, you can use tools like [JConsole](https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html) or [VisualVM](https://visualvm.github.io/) to monitor your Datomic system in development.\n\nAnd in production you can use tools like [Prometheus](https://prometheus.io/) and [Grafana](https://grafana.com/) to monitor your Datomic system using [JMX exporter](https://github.com/prometheus/jmx_exporter)\n\n## Usage\n\nTo monitor a transactor, add the following to your transactor properties file:\n\n```ini\nmetrics-callback=io.github.galuque.datomic.jmx.metrics/callback\n```\n\nor add the `datomic.metricsCallback` Java system property to your transactor startup command:\n\n```bash\nbin/transactor ... -Ddatomic.metricsCallback=io.github.galuque.datomic.jmx.metrics/callback ...\n```\n\nTo monitor a peer server you have to set the `datomic.metricsCallback` Java system property in the peer server startup command.\n\n```bash\nbin/run -m datomic.peer-server -Ddatomic.metricsCallback=io.github.galuque.datomic.jmx.metrics/callback ...\n``` \n\nIn both cases you need the `datomic-jmx-metrics` library in the classpath of the transactor or peer server.\n\nYou can download the latest release JAR and add it to the `lib` directory of your Datomic installation.\n\n```bash\ncurl -LJO https://github.com/galuque/datomic-jmx-metrics/releases/download/v0.1.5/datomic-jmx-metrics-0\n.1.11.jar \u0026\u0026 mv datomic-jmx-metrics-0.1.11.jar /path/to/datomic/lib\n```\n\n(This is a \"thin\" jar, it doesn't include any dependencies, the only dependency is \"org.clojure/java.jmx\" which is already included in Datomic)\n\nFinally you need to expose the JMX port of the transactor or peer server to be able to connect to it with a JMX client.\n\nYou can do that with the following Java system properties:\n\n```bash\nbin/transactor ... -Dcom.sun.management.jmxremote.port=9004 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false ...\n```\n\n(This is not recommended for production environments, see [JMX Monitoring and Management](https://docs.oracle.com/javase/8/docs/technotes/guides/management/agent.html) for more information)\n\n### Example project\n\nIn the \"monitoring\" branch of the [datomic-compose](https://github.com/galuque/datomic-compose/tree/monitoring) project you can find an example of how to use this library to monitor a Datomic system using prometheus and grafana.\n\n## Development\n\nRun the project's tests:\n\n    $ clojure -T:build test\n\nRun the project's CI pipeline and build a JAR:\n\n    $ clojure -T:build ci\n\nThis will produce an updated `pom.xml` file with synchronized dependencies inside the `META-INF`\ndirectory inside `target/classes` and the JAR in `target`. You can update the version (and SCM tag)\ninformation in generated `pom.xml` by updating `build.clj`.\n\n## License\n\nCopyright © 2023 Gabriel Luque Di Donna\n\nDistributed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaluque%2Fdatomic-jmx-metrics","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaluque%2Fdatomic-jmx-metrics","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaluque%2Fdatomic-jmx-metrics/lists"}