Skip to content

Stouts/Stouts.graphite-api

Repository files navigation

Stouts.graphite-api

Build Status Galaxy

Ansible role which manage Graphite-API

  • Install and configure Graphite-Api
  • Install and configure Graphite-Carbon and Graphite-Whisper
  • Proxy the API with nginx

Dependencies

The roles are required:

The roles are recomended to install:

Variables

Here is the list of all variables and their default values:

graphite_api_enabled: yes                     # The role is enabled

graphite_api_home: /opt/graphite              # Installation directory
graphite_api_user: graphite                   # Set owner
graphite_api_group: "{{ graphite_api_user }}" # Set group

# Setup Graphite-API
graphite_api_timezone: Europe/Berlin
graphite_api_whisper_directories:
- "{{graphite_api_home}}/storage/whisper"
graphite_api_search_index: "{{graphite_api_home}}/index"

# Setup Graphite-Carbon
graphite_api_carbon: yes                    # Install and setup Graphite Carbon
graphite_api_carbon_udp: no                 # Enable Carbon UDP listener
graphite_api_carbon_udp_address: 0.0.0.0    # Listen address
graphite_api_carbon_udp_port: 2003          # Listen port
graphite_api_carbon_line_port: 2003
graphite_api_carbon_pickle_port: 2004
graphite_api_carbon_cache_query_port: 7002

# Setup Graphite-Whisper
graphite_api_whisper: yes

# Setup storage schemas
graphite_api_storage_schemas:
- name: stats
  priority: 110
  pattern: ^stats\..*
  retentions: "10s:6h,1m:7d,10m:1y"
- name: carbon
  pattern: ^carbon\.
  retentions: "60:90d"
- name: default
  pattern: ".*"
  retentions: "60s:1d"

# Setup Gunicorn
graphite_api_gunicorn_host: 127.0.0.1
graphite_api_gunicorn_port: 8080

# Setup NGINX
graphite_api_nginx_host: "{{inventory_hostname}}"
graphite_api_nginx_port: 80
graphite_api_nginx_auth: no                         # Enable HTTP Authorization
graphite_api_nginx_auth_users: []                   # Setup HTTP Auth users
                                                    # graphite_api_nginx_auth_users:
                                                    #   - { name: team, password: secret }
graphite_api_nginx_allow_origin: ""                 # Set domain for enable CORS

# The following parameters are for toggling dependencies
nginx_enabled: yes
python_enabled: yes

Usage

Add Stouts.graphite-api to your roles and setup the variables in your playbook file. Example:

- hosts: all

  roles:
    - Stouts.graphite-api

  vars:
    graphite_api_nginx_port: 8888

License

Licensed under the MIT License. See the LICENSE file for details.

Feedback, bug-reports, requests, ...

Are welcome!

About

Ansible role to install and configure Graphite API service

Resources

License

Stars

Watchers

Forks

Packages

No packages published