{"id":15157040,"url":"https://github.com/puppetlabs/puppet-metrics-viewer","last_synced_at":"2025-09-30T07:30:26.932Z","repository":{"id":66233272,"uuid":"87331353","full_name":"puppetlabs/puppet-metrics-viewer","owner":"puppetlabs","description":"A CLI tool for generating visualizations of your Puppet metrics data","archived":true,"fork":false,"pushed_at":"2021-02-01T22:01:37.000Z","size":1423,"stargazers_count":13,"open_issues_count":0,"forks_count":12,"subscribers_count":66,"default_branch":"master","last_synced_at":"2024-09-22T05:32:22.260Z","etag":null,"topics":["activemq","docker","grafana","graphite","metrics","puppet","puppet-enterprise","puppetdb","puppetserver","visualization"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/puppetlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-05T16:18:53.000Z","updated_at":"2023-01-28T10:47:37.000Z","dependencies_parsed_at":"2023-02-21T13:45:26.191Z","dependency_job_id":null,"html_url":"https://github.com/puppetlabs/puppet-metrics-viewer","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/puppetlabs%2Fpuppet-metrics-viewer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppet-metrics-viewer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppet-metrics-viewer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/puppetlabs%2Fpuppet-metrics-viewer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/puppetlabs","download_url":"https://codeload.github.com/puppetlabs/puppet-metrics-viewer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219874799,"owners_count":16554617,"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":["activemq","docker","grafana","graphite","metrics","puppet","puppet-enterprise","puppetdb","puppetserver","visualization"],"created_at":"2024-09-26T20:00:21.093Z","updated_at":"2025-09-30T07:30:26.575Z","avatar_url":"https://github.com/puppetlabs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-metrics-viewer\n\n**This project has been archived and will not recieve any further updates** The functionality within this project has been implemented in the [puppet_metrics_dashboard](https://github.com/puppetlabs/puppet_metrics_dashboard) repository. Please use that repository moving forward.\n\nThis repository contains a command line tool for generating visualizations of your Puppet metrics data in Docker.\n\nIt assumes you have collected the metrics using the [puppetlabs/puppet_metrics_collector](https://forge.puppet.com/puppetlabs/puppet_metrics_collector) module.\n\nIt downloads a script from that module, and Grafana dashboards from the [puppetlabs/puppet_metrics_dashboard](https://github.com/puppetlabs/puppet_metrics_dashboard) module.\n\n## Viewing metrics in Grafana\n\n![Screen shot](./images/grafana.jpg)\n\nTo use this tool, you will need [docker](https://www.docker.com/products/overview) (and docker-compose) installed.\n_Tip:_ If you're using a Mac, use the official Mac packages for Docker instead of installing from Brew.\n(If you figure out how to use this with Docker installed from Brew, let us know.)\n\nWith Docker installed, you can run the `view-in-grafana.sh` script, passing it the directory containing the data files to load.\n\nFor example:\n\n```\n./view-in-grafana.sh ~/Downloads/puppet_metrics/puppetserver\n```\n\nYou can then view the metrics by visiting `http://localhost:3000` in a web browser.\n\n - username: `admin`\n - password: `admin`.\n\n## Advanced options for viewing metrics with Grafana\n\nThe `view-in-grafana.sh` script has several options that can change the behavior of the environment.\n\n### Limit the data that will be imported\n\nBy default, the script uses a data retention of 30 days.\nYou can optionally specify a different data retention period.\n\nFor example:\n\n```\n./view-in-grafana.sh ~/Downloads/puppet_metrics/puppetserver 10\n```\n\n_Note:_ `.json` files outside the retention period will be deleted, as the assumption is that they exist in the tar archives.\n\n### Use Graphite as the backend database\n\nBy default, InfluxDB is used to store data.\nYou can optionally specify Graphite.\n\nFor example:\n\n```\n./view-in-grafana.sh -d graphite  ~/Downloads/puppet_metrics/puppetserver\n```\n\n### Build the local containers instead of from Docker Hub\n\nTo test Grafana updates, you can specify the `-b` option to build the local `grafana-puppetserver` container.\n\nFor example:\n\n```\n./view-in-grafana.sh -b ~/Downloads/puppet_metrics/puppetserver\n```\n\n## Load to a pre-existing InfluxDB or Graphite database backend\n\nThe `json2timeseriesdb` script from [puppetlabs/puppet_metrics_collector](https://forge.puppet.com/puppetlabs/puppet_metrics_collector) module can be used to transform data in the JSON files into a format that can be imported into any InfluxDB or Graphite database backend.\n\nUsage:\n\n```\n./json2timeseriesdb [--pattern PATTERN] [filename_1 ... filename_n]\n```\n\nOutput is in Graphite's plain text input format.\nThe output can be sent to a host running Graphite by passing its hostname to the `--netcat` flag:\n\n```\n./json2timeseriesdb ~/Downloads/logdump/puppetserver/*.json --netcat localhost\n```\n\nData will be sent to port 2003.\nA custom port can be used by sending output to `nc`:\n\n```\n./json2timeseriesdb ~/Downloads/logdump/puppetserver/*.json | nc localhost 4242\n```\n\nOutput in InfluxDB's format can be specified using the `--convert-to` flag:\n\n```\n./json2timeseriesdb ~/Downloads/logdump/puppetserver/*.json --convert-to influxdb\n```\n\nWhen `--netcat` is used with InfluxDB, the `--influx-db` flag must be used to specify an InfluxDB database:\n\n```\n./json2timeseriesdb ~/Downloads/logdump/puppetserver/*.json --convert-to influxdb --netcat localhost --influx-db pe-metrics\n```\n\n(Data will be sent to port 8086.)\n\nThe above examples can be used for small numbers of files.\nWhen more files exist than can be referenced as arguments, use `--pattern`:\n\n```\n./json2timeseriesdb --pattern '~/Downloads/logdump/puppetserver/*.json' --netcat localhost\n```\n\nThe `--pattern` flag accepts a Ruby glob argument, which Ruby will then expand into a list of files to process.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppet-metrics-viewer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpuppetlabs%2Fpuppet-metrics-viewer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpuppetlabs%2Fpuppet-metrics-viewer/lists"}