{"id":15517520,"url":"https://github.com/bodgit/puppet-graphite","last_synced_at":"2025-03-16T22:49:09.867Z","repository":{"id":57664478,"uuid":"71402867","full_name":"bodgit/puppet-graphite","owner":"bodgit","description":"Puppet Module for managing Graphite","archived":false,"fork":false,"pushed_at":"2018-05-01T18:15:07.000Z","size":30,"stargazers_count":0,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T03:32:59.620Z","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/bodgit.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}},"created_at":"2016-10-19T22:00:12.000Z","updated_at":"2018-05-01T18:14:54.000Z","dependencies_parsed_at":"2022-09-10T16:10:24.119Z","dependency_job_id":null,"html_url":"https://github.com/bodgit/puppet-graphite","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-graphite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-graphite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-graphite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bodgit%2Fpuppet-graphite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bodgit","download_url":"https://codeload.github.com/bodgit/puppet-graphite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243945478,"owners_count":20372894,"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-10-02T10:13:41.014Z","updated_at":"2025-03-16T22:49:09.827Z","avatar_url":"https://github.com/bodgit.png","language":"Ruby","readme":"# graphite\n\nTested with Travis CI\n\n[![Build Status](https://travis-ci.org/bodgit/puppet-graphite.svg?branch=master)](https://travis-ci.org/bodgit/puppet-graphite)\n[![Coverage Status](https://coveralls.io/repos/bodgit/puppet-graphite/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/bodgit/puppet-graphite?branch=master)\n[![Puppet Forge](http://img.shields.io/puppetforge/v/bodgit/graphite.svg)](https://forge.puppetlabs.com/bodgit/graphite)\n[![Dependency Status](https://gemnasium.com/bodgit/puppet-graphite.svg)](https://gemnasium.com/bodgit/puppet-graphite)\n\n#### Table of Contents\n\n1. [Overview](#overview)\n2. [Module Description - What the module does and why it is useful](#module-description)\n3. [Setup - The basics of getting started with graphite](#setup)\n    * [What graphite affects](#what-graphite-affects)\n    * [Beginning with graphite](#beginning-with-graphite)\n4. [Usage - Configuration options and additional functionality](#usage)\n    * [Classes and Defined Types](#classes-and-defined-types)\n        * [Class: graphite::api](#class-graphiteapi)\n        * [Class: graphite::api::memcached](#class-graphiteapimemcached)\n        * [Class: graphite::api::redis](#class-graphiteapiredis)\n        * [Class: graphite::web](#class-graphiteweb)\n        * [Class: graphite::web::ldap](#class-graphitewebldap)\n    * [Examples](#examples)\n5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)\n5. [Limitations - OS compatibility, etc.](#limitations)\n6. [Development - Guide for contributing to the module](#development)\n\n## Overview\n\nThis module manages both the Graphite Django-based web frontend and/or the\nlighter API frontend.\n\n## Module Description\n\nThis module installs the relevant frontend packages, configures them and\noptionally enables LDAP authentication and/or caching via Memcached or Redis\nwhere possible. It also manages running the frontend either directly as a\nstandalone service or through a webserver such as Apache.\n\n## Setup\n\nIf running on Puppet 3.x you will need to have the future parser enabled. On\nRHEL/CentOS platforms you will need to enable the EPEL repository first.\n\n### What graphite affects\n\n* The package(s) providing the Graphite web software.\n* The `/etc/graphite-web/local_settings.py` configuration file.\n* Creating the database schema.\n* Generating a basic Apache virtual host configuration.\n* The package(s) providing the Graphite API software.\n* The `/etc/graphite-api.yaml` configuraton file.\n* The service controlling the running of Graphite API as a daemon.\n\n### Beginning with graphite\n\n```puppet\nclass { '::graphite::web':\n  secret_key =\u003e 'mysecretkey',\n}\n\n# or\n\ninclude ::graphite::api\n```\n\n## Usage\n\n### Classes and Defined Types\n\n#### Class: `graphite::api`\n\n**Parameters within `graphite::api`:**\n\n##### `address`\n\nIP address to listen on, defaults to `127.0.0.1`.\n\n##### `allowed_origins`\n\nAn array of allowed host header values. Builds the `allowed_origins` setting.\n\n##### `carbon_hosts`\n\nAn array of hashes for each carbon instance. Hash must contain `host`\nand `port` keys and optionally an `instance` key. Builds the `carbon.hosts`\nsetting.\n\n##### `carbon_metric_prefix`\n\nMaps to the `carbon.carbon_prefix` setting.\n\n##### `carbon_retry_delay`\n\nMaps to the `carbon.retry_delay` setting.\n\n##### `carbon_timeout`\n\nMaps to the `carbon.timeout` setting.\n\n##### `conf_file`\n\nDefaults to `/etc/graphite-api.yaml`.\n\n##### `group`\n\nGroup to run as, defaults to `graphite-api`.\n\n##### `package_name`\n\nThe package name to install.\n\n##### `port`\n\nPort to listen on, defaults to `8888`.\n\n##### `render_errors`\n\nMaps to the `render_errors` setting.\n\n##### `replication_factor`\n\nMaps to the `carbon.replicaton_factor` setting.\n\n##### `service_name`\n\nThe name of the service, defaults to `graphite-api`.\n\n##### `state_dir`\n\nPath to the state directory, defaults to `/var/lib/graphite-api`.\n\n##### `time_zone`\n\nMaps to the `time_zone` setting.\n\n##### `user`\n\nUser to run as, defaults to `graphite-api`.\n\n##### `whisper_dir`\n\nMaps to the `whisper.directories` setting.\n\n##### `workers`\n\nNumber of workers to run, defaults to `4`.\n\n#### Class: `graphite::api::memcached`\n\n**Parameters within `graphite::api::memcached`:**\n\n##### `servers`\n\nAn array of hashes for each memcached server. Hash must contain `host` and\n`port` keys.\n\n##### `key_prefix`\n\nDefaults to `graphite-api`.\n\n##### `timeout`\n\nDefauls to `60`.\n\n#### Class: `graphite::api::redis`\n\n**Parameters within `graphite::api::redis`:**\n\n##### `host`\n\nRedis hostname.\n\n##### `database`\n\nRedis database number, defaults to `0`.\n\n##### `key_prefix`\n\nDefaults to `graphite-api`.\n\n##### `package_name`\n\nThe package name of the Redis support package to install.\n\n##### `password`\n\nOptional Redis password.\n\n##### `port`\n\nRedis port, defauls to `6379`.\n\n##### `timeout`\n\nDefaults to `60`.\n\n#### Class: `graphite::web`\n\n**Parameters within `graphite::web`:**\n\n##### `secret_key`\n\nMaps to the `SECRET_KEY` setting.\n\n##### `allowed_hosts`\n\nAn array of allowed host header values. Builds the `ALLOWED_HOSTS` setting.\n\n##### `apache_resources`\n\nA hash of Apache resources to create, each key should be an Apache defined\ntype with the value being a further hash where each key is the title and the\nvalue is the resource attributes.\n\n##### `carbonlink_hosts`\n\nAn array of hashes for each carbon instance. Hash must contain `host`\nand `port` keys and optionally an `instance` key. Builds the\n`CARBONLINK_HOSTS` setting.\n\n##### `carbonlink_query_bulk`\n\nMaps to the `CARBONLINK_QUERY_BULK` setting.\n\n##### `carbonlink_timeout`\n\nMaps to the `CARBONLINK_TIMEOUT` setting.\n\n##### `cluster_servers`\n\nAn array of hashes for each remote web instance. Hash must contain `host` key\nand optionally a `port` key. Builds the `CLUSTER_SERVERS` setting.\n\n##### `conf_dir`\n\nMaps to the `CONF_DIR` setting. Also used as the path for the various\nconfiguration files.\n\n##### `databases`\n\nHash of hashes for the database settings. Only key supported is `default` and\nthe child hash must contain `name` and `engine` keys and optionally `user`,\n`password`, `host` and `port` keys. Builds the `DATABASES` setting.\n\n##### `debug`\n\nMaps to the `DEBUG` setting.\n\n##### `default_cache_duration`\n\nMaps to the `DEFAULT_CACHE_DURATION` setting.\n\n##### `documentation_url`\n\nMaps to the `DOCUMENTATION_URL` setting.\n\n##### `flushrrdcached`\n\nMaps to the `FLUSHRRDCACHED` setting.\n\n##### `graphite_root`\n\nMaps to the `GRAPHITE_ROOT` setting. Defaults to `/usr/share/graphite`.\n\n##### `http_server`\n\nOnly `apache` is currently supported.\n\n##### `log_cache_performance`\n\nMaps to the `LOG_CACHE_PERFORMANCE` setting.\n\n##### `log_dir`\n\nMaps to the `LOG_DIR` setting.\n\n##### `log_metric_access`\n\nMaps to the `LOG_METRIC_ACCESS` setting.\n\n##### `log_rendering_performance`\n\nMaps to the `LOG_RENDERING_PERFORMANCE` setting.\n\n##### `memcache_hosts`\n\nAn array of hashes for each memcached server. Hash must contain `host` and\n`port` keys. Builds the `MEMCACHE_HOSTS` setting.\n\n##### `package_name`\n\nThe name of the package to install.\n\n##### `remote_find_cache_duration`\n\nMaps to the `REMOTE_FIND_CACHE_DURATION` setting.\n\n##### `remote_prefetch_data`\n\nMaps to the `REMOTE_PREFETCH_DATA` setting.\n\n##### `remote_rendering`\n\nMaps to the `REMOTE_RENDERING` setting.\n\n##### `remote_render_connect_timeout`\n\nMaps to the `REMOTE_RENDER_CONNECT_TIMEOUT` setting.\n\n##### `remote_store_fetch_timeout`\n\nMaps to the `REMOTE_STORE_FETCH_TIMEOUT` setting.\n\n##### `remote_store_find_timeout`\n\nMaps to the `REMOTE_STORE_FIND_TIMEOUT` setting.\n\n##### `remote_store_merge_results`\n\nMaps to the `REMOTE_STORE_MERGE_RESULTS` setting.\n\n##### `remote_store_retry_delay`\n\nMaps to the `REMOTE_STORE_RETRY_DELAY` setting.\n\n##### `remote_store_use_post`\n\nMaps to the `REMOTE_STORE_USE_POST` setting.\n\n##### `rendering_hosts`\n\nAn array of hashes for each remote web instance. Hash must contain `host` key\nand optionally a `port` key. Builds the `RENDERING_HOSTS` setting.\n\n##### `rrd_dir`\n\nMaps to the `RRD_DIR` setting. Defaults to `${storage_dir}/rrd`.\n\n##### `storage_dir`\n\nMaps to the `STORAGE_DIR` setting. Defaults to `/var/lib/carbon`.\n\n##### `time_zone`\n\nMaps to the `TIME_ZONE` setting.\n\n##### `whisper_dir`\n\nMaps to the `WHISPER_DIR` setting. Defaults to `${storage_dir}/whisper`.\n\n#### Class: `graphite::web::ldap`\n\n**Parameters within `graphite::web::ldap`:**\n\n##### `uri`\n\nMaps to the `LDAP_URI` setting.\n\n##### `search_base`\n\nMaps to the `LDAP_SEARCH_BASE` setting.\n\n##### `bind_dn`\n\nMaps to the `LDAP_BASE_USER` setting.\n\n##### `bind_password`\n\nMaps to the `LDAP_BASE_PASS` setting.\n\n##### `search_filter`\n\nMaps to the `LDAP_USER_QUERY` setting.\n\n##### `package_name`\n\nThe name of the LDAP support package to install.\n\n### Examples\n\nInstall Graphite API in front of a single carbon cache instance:\n\n```puppet\ninclude ::carbon\n\nclass { '::graphite::api':\n  carbon_hosts =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 7002,\n    },\n  ],\n  require      =\u003e Class['::carbon'],\n}\n```\n\nExtend the above to include a Memcached caching layer:\n\n```puppet\ninclude ::carbon\ninclude ::memcached\n\nclass { '::graphite::api':\n  carbon_hosts =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 7002,\n    },\n  ],\n  require      =\u003e Class['::carbon'],\n}\n\nclass { '::graphite::api::memcached':\n  servers =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 11211,\n    },\n  ],\n  require =\u003e Class['::memcached'],\n}\n```\n\nUse Redis instead:\n\n```puppet\ninclude ::carbon\ninclude ::redis\n\nclass { '::graphite::api':\n  carbon_hosts =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 7002,\n    },\n  ],\n  require      =\u003e Class['::carbon'],\n}\n\nclass { '::graphite::api::redis':\n  host    =\u003e '127.0.0.1',\n  require =\u003e Class['::redis'],\n}\n```\n\nInstall Graphite web in front of a single carbon cache instance with\nMemcached caching enabled:\n\n```puppet\ninclude ::carbon\ninclude ::memcached\n\nclass { '::apache':\n  default_confd_files =\u003e false,\n  default_mods        =\u003e false,\n  default_vhost       =\u003e false,\n}\n\nclass { '::graphite::web':\n  secret_key       =\u003e 'abc123',\n  carbonlink_hosts =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 7002,\n    },\n  ],\n  memcache_hosts   =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 11211,\n    },\n  ],\n  require          =\u003e Class['::carbon'],\n}\n```\n\nExtend the above to also configure LDAP authentication:\n\n```puppet\ninclude ::openldap\ninclude ::openldap::client\nclass { '::openldap::server':\n  root_dn              =\u003e 'cn=Manager,dc=example,dc=com',\n  root_password        =\u003e 'secret',\n  suffix               =\u003e 'dc=example,dc=com',\n  access               =\u003e [\n    'to attrs=userPassword by self =xw by anonymous auth',\n    'to * by dn.base=\"gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth\" manage by users read',\n  ],\n  ldap_interfaces      =\u003e ['127.0.0.1'],\n  local_ssf            =\u003e 256,\n}\n::openldap::server::schema { 'cosine':\n  position =\u003e 1,\n}\n::openldap::server::schema { 'inetorgperson':\n  position =\u003e 2,\n}\n::openldap::server::schema { 'nis':\n  position =\u003e 3,\n}\n\ninclude ::carbon\ninclude ::memcached\n\nclass { '::apache':\n  default_confd_files =\u003e false,\n  default_mods        =\u003e false,\n  default_vhost       =\u003e false,\n}\n\nclass { '::graphite::web':\n  secret_key       =\u003e 'abc123',\n  carbonlink_hosts =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 7002,\n    },\n  ],\n  memcache_hosts   =\u003e [\n    {\n      'host' =\u003e '127.0.0.1',\n      'port' =\u003e 11211,\n    },\n  ],\n  require          =\u003e Class['::carbon'],\n}\n\nclass { '::graphite::web::ldap':\n  bind_dn       =\u003e 'cn=Manager,dc=example,dc=com',\n  bind_password =\u003e 'secret',\n  search_base   =\u003e 'dc=example,dc=com',\n  search_filter =\u003e '(uid=%s)',\n  uri           =\u003e 'ldap://127.0.0.1',\n  require       =\u003e Class['::openldap::server'],\n}\n```\n\n## Reference\n\n### Classes\n\n#### Public Classes\n\n* [`graphite::api`](#class-graphiteapi): Main class for managing the Carbon daemons.\n* [`graphite::api::memcached`](#class-graphiteapimemcached): Main class for managing the Carbon daemons.\n* [`graphite::api::redis`](#class-graphiteapiredis): Main class for managing the Carbon daemons.\n* [`graphite::web`](#class-graphiteweb): Main class for managing the Carbon daemons.\n* [`graphite::web::ldap`](#class-graphitewebldap): Main class for managing the Carbon daemons.\n\n#### Private Classes\n\n* `graphite::params`: Different configuration data for different systems.\n* `graphite::api::install`: Handles Graphite API installation.\n* `graphite::api::config`: Handles Graphite API configuration.\n* `graphite::api::params`: Different configuration data for different systems.\n* `graphite::api::service`: Handles running the Graphite API service.\n* `graphite::api::memcached::install`: Installs the Memcached support.\n* `graphite::api::memcached::config`: Handles configuring Memcached caching.\n* `graphite::api::redis::install`: Installs the Redis support.\n* `graphite::api::redis::config`: Handles configuring Redis caching.\n* `graphite::web::install`: Handles Graphite web installation.\n* `graphite::web::config`: Handles Graphite web configuration.\n* `graphite::web::params`: Different configuration data for different systems.\n* `graphite::web::ldap::install`: Installs the LDAP support.\n* `graphite::web::ldap::config`: Handles configuring LDAP authentication.\n\n## Limitations\n\nThis module intentionally doesn't manage the Carbon daemons, see my other\nmodule which does that.\n\nThis module has been built on and tested against Puppet 3.0 and higher.\n\nThe module has been tested on:\n\n* RedHat/CentOS Enterprise Linux 7\n\nTesting on other platforms has been light and cannot be guaranteed.\n\n## Development\n\nPlease log issues or pull requests at\n[github](https://github.com/bodgit/puppet-graphite).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fpuppet-graphite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodgit%2Fpuppet-graphite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodgit%2Fpuppet-graphite/lists"}