Giter VIP home page Giter VIP logo

chef-pgbadger's Introduction

PgBadger Cookbook

Installs/configures PgBadger

Requirements

packages

  • perl - pgbadger needs only perl to run

cookbooks

  • apt
  • cron

Attributes

pgbadger::default

Key Type Description Default
['pgbadger']['databases'] Array List of databases to perform. []
['pgbadger']['data_dir'] String Path for generated reports /var/www/pgbadger
['pgbadger']['log_path'] String Path to PostgreSQL log /var/log/postgresql/postgresql-#{node['postgresql']['defaults']['server']['version']}-main.log
['pgbadger']['rhytm'] String Periodicity of reports generation. E.g. hourly, daily, monthly, etc. hourly
['pgbadger']['user'] String Reports owner root

Usage

pgbadger::install

Just include pgbadger::install in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[pgbadger::install]"
  ]
}

pgbadger::default

Include pgbadger in your node's run_list and add list of databases to node attributes:

{
  "name": "my_node",
  "pgbadger": {
    "databases": [
      "lucifer",
      "antropolog"
    ]
  },
  "run_list": [
    "recipe[pgbadger]"
  ]
}

pgbadger::web

Include pgbadger::web in your node's run_list and create data bag pgbadger_users with items like following:

{
  "id": "report_viewer",
  "password": "superduperpassword"
}

It will create file .passwd in node['pgbadge']['data_dir'] directory with user:password pairs, compatible with NGINX and Apache

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

Special thanks

Sponsored by Evil Martians

Authors

chef-pgbadger's People

Contributors

bregor avatar dragonsmith avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.