{"id":20757598,"url":"https://github.com/dodevops/puppet-jmxtrans","last_synced_at":"2025-12-11T21:23:07.852Z","repository":{"id":48369470,"uuid":"56808103","full_name":"dodevops/puppet-jmxtrans","owner":"dodevops","description":"Configure metrics data with jmxtrans using Puppet","archived":false,"fork":false,"pushed_at":"2021-07-29T14:50:30.000Z","size":104,"stargazers_count":0,"open_issues_count":0,"forks_count":5,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-07-10T12:37:29.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/dodevops.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-21T21:57:54.000Z","updated_at":"2021-07-29T14:50:33.000Z","dependencies_parsed_at":"2022-08-20T04:00:12.509Z","dependency_job_id":null,"html_url":"https://github.com/dodevops/puppet-jmxtrans","commit_stats":null,"previous_names":["puppetlabs-operations/puppet-jmxtrans"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dodevops/puppet-jmxtrans","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpuppet-jmxtrans","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpuppet-jmxtrans/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpuppet-jmxtrans/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpuppet-jmxtrans/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dodevops","download_url":"https://codeload.github.com/dodevops/puppet-jmxtrans/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dodevops%2Fpuppet-jmxtrans/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266276174,"owners_count":23903983,"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":[],"created_at":"2024-11-17T09:43:21.196Z","updated_at":"2025-12-11T21:23:07.492Z","avatar_url":"https://github.com/dodevops.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### Table of Contents\n\n1. [Overview](#overview)\n1. [Module Description - What the module does and why it is useful](#module-description)\n1. [Usage - Configuration options and additional functionality](#usage)\n 1. [Installing jmxtrans](#installing-jmxtrans)\n 1. [Managing the service](#managing-the-service)\n 1. [Configuring servers and queries](#configuring-servers-and-queries)\n1. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nConfigure jmxtrans for collecting and exporting JVM metrics data.\n\nThis module was adopted from [PLoperations](https://github.com/ploperations) and was available as\n`ploperations/jmxtrans` before.\n\n## Module Description\n\nThis module can be used to install and manage the jmxtrans service, as well as\nconfigure how it connects to JVM processes, what data it pulls out, and where\nit sends the data it collects.\n\nFor more information on jmxtrans, see [the source repo][jmxtrans-source].\n\n### Requirements\n\nThis module is not dependent on any java puppet module, however without any java on the system, the startup of jmxtrans will fail. Please \ntake care to have a working java installation on the server (recommended of course with the puppetlabs/java module) and the java binary in \nthe PATH or at least a JAVA_HOME set. The jmxtrans startup script will try to detect the java via one of these ways.\n\n### Installing jmxtrans\n\nIf you have a repository configured on the system with a `jmxtrans` package\navailable, you can install jmxtrans by setting the `package_name` parameter on\nthe main `jmxtrans` class.\n\n~~~puppet\nclass { '::jmxtrans':\n  package_name =\u003e 'jmxtrans',\n}\n~~~\n\nIf you have a package available on the local filesystem or remotely over HTTP\n(if your package manager supports it), you can set the `package_source`\nparameter. Note that if you are on anything other than a Debian or EL-based\noperating system, you will also need to set `package_provider`.\n\n~~~puppet\nclass { '::jmxtrans':\n  package_name   =\u003e 'jmxtrans',\n  package_source =\u003e 'http://central.maven.org/maven2/org/jmxtrans/jmxtrans/254/jmxtrans-254.rpm',\n}\n~~~\n\n### Managing the service\n\nIf you want to manage the service, you can set the `service_name` parameter,\nwhich will set `ensure =\u003e running` on the service.\n\n~~~puppet\nclass { '::jmxtrans':\n  package_name =\u003e 'jmxtrans',\n  service_name =\u003e 'jmxtrans',\n}\n~~~\n\n### Configuring servers and queries\n\nThe `jmxtrans::query` defined type is used to configure \"servers\" and \"queries\"\nas described in [the jmxtrans documentation][jmxtrans-docs].\n\nExample usage:\n\n~~~puppet\njmxtrans::query { 'puppetserver':\n  host     =\u003e 'localhost',\n  port     =\u003e 1099,\n  queries  =\u003e [\n    {\n      object       =\u003e \"metrics:name=puppetlabs.${facts['hostname']}.compiler.compile\",\n      attributes   =\u003e ['Max', 'Min', 'Mean', 'StdDev', 'Count'],\n      result_alias =\u003e 'puppetlabs.puppetmaster.compiler.compile',\n      writers      =\u003e [\n        {\n          '@class'          =\u003e 'com.googlecode.jmxtrans.model.output.KeyOutWriter',\n          outputFile        =\u003e '/tmp/puppetserver-compile-metrics.txt',\n          maxLogFileSize    =\u003e '10MB',\n          maxLogBackupFiles =\u003e '200',\n          debug             =\u003e true,\n        },\n      ],\n    },\n    {\n      object       =\u003e \"metrics:name=puppetlabs.${facts['hostname']}.jruby.num-free-jrubies\",\n      attributes   =\u003e ['Value'],\n      result_alias =\u003e 'puppetlabs.puppetmaster.jruby.num-free-jrubies',\n      writers      =\u003e [\n        {\n          '@class'          =\u003e 'com.googlecode.jmxtrans.model.output.KeyOutWriter',\n          outputFile        =\u003e '/tmp/puppetserver-jruby-metrics.txt',\n          maxLogFileSize    =\u003e '10MB',\n          maxLogBackupFiles =\u003e '200',\n          debug             =\u003e true,\n        },\n      ],\n    },\n  ],\n}\n~~~\n\nThis will configure jmxtrans to connect to a JMX RMI on `localhost` listening\non port 1099, and it will:\n\n - extract the values for `Max`, `Min`, `Mean`, `StdDev`, and `Count` from the\n   `metrics:name=puppetlabs.${facts['hostname']}.compiler.compile` object and\n   write them to `/tmp/puppetserver-compile-metrics.txt`.\n - extract the value of the `Value` attribute for the object\n   `metrics:name=puppetlabs.${facts['hostname']}.jruby.num-free-jrubies` and\n   write it to `/tmp/puppetserver-jruby-metrics.txt`.\n   \nIf you intend to use the GraphiteWriter, StdoutWriter or GelfWriter on all the objects for\nthe server, there are top level parameters that you can set which will be\ninherited by all the query objects.\n\n## Development\n\nPull Requests on GitHub are welcome. Please include tests for any new features\nor functionality change. See [rspec-puppet] for details on writing unit tests\nfor Puppet.\n\nAlways keep the reference up to date by running\n\n    bundle exec puppet strings generate --format markdown\n\n\n[jmxtrans-source]: https://github.com/jmxtrans/jmxtrans\n[jmxtrans-docs]: https://github.com/jmxtrans/jmxtrans/wiki/Queries\n[rspec-puppet]: http://rspec-puppet.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fpuppet-jmxtrans","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdodevops%2Fpuppet-jmxtrans","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdodevops%2Fpuppet-jmxtrans/lists"}