{"id":14994563,"url":"https://github.com/retailnext/puppet-agent-exporter","last_synced_at":"2025-10-30T04:31:29.721Z","repository":{"id":39612094,"uuid":"360044472","full_name":"retailnext/puppet-agent-exporter","owner":"retailnext","description":"Prometheus exporter for Puppet Agent status","archived":false,"fork":false,"pushed_at":"2025-02-12T00:40:03.000Z","size":139,"stargazers_count":8,"open_issues_count":7,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-12T01:33:49.224Z","etag":null,"topics":["prometheus","prometheus-exporter","puppet","puppet-agent"],"latest_commit_sha":null,"homepage":"","language":"Go","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/retailnext.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}},"created_at":"2021-04-21T05:37:09.000Z","updated_at":"2025-02-12T00:40:07.000Z","dependencies_parsed_at":"2023-02-08T08:46:06.788Z","dependency_job_id":"4f78ec94-2ff7-41a2-bdd9-fd61535bb62f","html_url":"https://github.com/retailnext/puppet-agent-exporter","commit_stats":{"total_commits":50,"total_committers":2,"mean_commits":25.0,"dds":"0.020000000000000018","last_synced_commit":"3be61e8330442a8ac068dfea2a337503e91099c0"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailnext%2Fpuppet-agent-exporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailnext%2Fpuppet-agent-exporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailnext%2Fpuppet-agent-exporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retailnext%2Fpuppet-agent-exporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retailnext","download_url":"https://codeload.github.com/retailnext/puppet-agent-exporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238934083,"owners_count":19554788,"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":["prometheus","prometheus-exporter","puppet","puppet-agent"],"created_at":"2024-09-24T16:03:53.569Z","updated_at":"2025-10-30T04:31:24.448Z","avatar_url":"https://github.com/retailnext.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# puppet-agent-exporter\n\n## Puppet Agent Prometheus Exporter\n\nThis [Prometheus](https://prometheus.io/)\n[exporter](https://prometheus.io/docs/instrumenting/exporters/)\nexposes the status of the Puppet Agent on the host it is running on.\n\nUnlike [puppet-prometheus_reporter](https://github.com/voxpupuli/puppet-prometheus_reporter)\nand other solutions that rely on the Puppet Agent successfully a report to the\nPuppet Server, this allows you to actively monitor the status of every node in\nyour environment that is discoverable by Prometheus.\n\n### Metrics Exposed\n\n```\n# HELP puppet_config Puppet configuration.\n# TYPE puppet_config gauge\npuppet_config{environment=\"\",server=\"puppet.redacted\"} 1\n# HELP puppet_last_catalog_version The version of the last attempted Puppet catalog.\n# TYPE puppet_last_catalog_version gauge\npuppet_last_catalog_version{version=\"1680640107\"} 1\n# HELP puppet_last_run_at_seconds Time of the last Puppet run.\n# TYPE puppet_last_run_at_seconds gauge\npuppet_last_run_at_seconds 1.6806401024160552e+09\n# HELP puppet_last_run_duration_seconds Duration of the last Puppet run.\n# TYPE puppet_last_run_duration_seconds gauge\npuppet_last_run_duration_seconds 28.023470087\n# HELP puppet_last_run_success 1 if the last Puppet run was successful.\n# TYPE puppet_last_run_success gauge\npuppet_last_run_success 1\n```\n\n### Example Alert Rules\n\n```yaml\ngroups:\n  - name: Puppet\n    rules:\n      - alert: MultiplePuppetFailing\n        expr: count(puppet_last_run_success) - count(puppet_last_run_success == 1) \u003e 4\n      - alert: PuppetEnvironmentSet\n        expr: puppet_config{environment!=\"\"}\n        for: 4h\n      - alert: PuppetFailing\n        expr: puppet_last_run_success == 0\n        for: 40m\n      - alert: LastPuppetTooLongAgo\n        expr: time() - puppet_last_run_at_seconds \u003e 3*60*60\n        for: 40m\n```\n\nWe've found it worthwhile to avoid alerting on conditions affecting individual\nnodes until that condition has persisted long enough to affect more than one\nrun. (For example, a transient hiccup in an APT proxy, etc...)\n\nAlerting on the catalog being too old helps catch situations like a node being\nset to an environment that no longer exists, or if it's having TLS or network\nissues contacting the Puppet Server.\n\nAlerting on a non-default environment being set helps catch operator error,\nfor example when a node is used to test changes from a branch environment\nbut forgotten about after that branch is merged.\n\n## Project Status: **Works For Us**\n\nThis is an open-source release of something we've used for quite a while\ninternally.\n\n*   The package APIs functions are likely to be refactored drastically,\n    potentially without warning in release notes.\n\n    (This isn't really meant to be a library.)\n\n*   We may add a systemd unit to the packaging at some point.\n\n*   We probably won't make breaking changes to the arguments without warning.\n\n### Areas needing improvement\n\n*   Test coverage\n*   General code hygiene and refactoring\n*   Better packaging (supporting RPM distros, including a systemd unit, etc...)\n\n## Contributing\n\nContributions considered, but be aware that this is mostly just something we\nneeded. It's public because there's no reason anyone else should have to waste\nan afternoon (or more) building something similar, and we think the approach\nis good enough that others would benefit from adopting.\n\nThis project is licensed under the [Apache License, Version 2.0](LICENSE).\n\nPlease include a `Signed-off-by` in all commits, per\n[Developer Certificate of Origin version 1.1](DCO).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailnext%2Fpuppet-agent-exporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretailnext%2Fpuppet-agent-exporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretailnext%2Fpuppet-agent-exporter/lists"}