Installs/configures PgBadger
perl
- pgbadger needs only perl to run
apt
cron
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 |
Just include pgbadger::install
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[pgbadger::install]"
]
}
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]"
]
}
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
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
Sponsored by Evil Martians
- Maxim Filatov bregor@evilmartians.com
- Kirill Kouznetsov agon.smith@gmail.com