Version information
Start using this module
Add this module to your Puppetfile:
mod 'tiredpixel-pikka_bird', '0.1.0'
Learn more about managing modules with a PuppetfileDocumentation
Pikka Bird (Puppet)
Pikka Bird ops monitoring tool Puppet module.
A Puppet module for Pikka Bird Collector and Pikka Bird Server, making installation, configuration, and upgrades as easy as flipping a pancake.
Pikka Bird is currently in a draft phase, which means that payloads and schemas might be changed in a backwards-incompatible fashion. Although it is unlikely, in extreme cases this could require you to reinstall with an empty database. If this upsets you too much, please say hello and come back later. :) Currently, it is not recommended that you use Pikka Bird as a replacement for any of your usual monitoring tools.
More sleep lost by tiredpixel.
Installation
Install the following externals:
-
Operating System
Obviously, you need one of these! ;) But which ones are supported? Currently, I'm developing this against Ubuntu Server, which means I'm certainly happy to support the broader Debian family. But I'd very much like to support other families, too, for all components of Pikka Bird (this module, Pikka Bird Collector, Pikka Bird Server). If you're running other operating systems and would like to help, please get in touch, and I can work out whether we can support it. :) [tiredpixel]
-
Recent versions of Puppet are supported. (A patch detailing which versions this works for is welcome.)
Usage
The module is split down the middle into two components: Pikka Bird Collector and Pikka Bird Server. The packages used are those released to Pip; everything else is defined in this module (there are currently no separate OS packages).
The Collector, by default, also manages creating a system user, installing Python dependencies, and upgrading Pip (needed if you're using an OS version which is too old to resolve dependencies properly). But you can disable this behaviour if you don't need it or are trying to install on servers which have control over these things (e.g. if you're monitoring servers hosting Python apps.)
The Server, by default, also manages installing PostgreSQL package dependencies (just the bindings, not the whole database). Again, you can disable this behaviour if you don't need it. Installation of the database itself is your problem, as is creating the desired database and user. :) There are no plans for this module to try to control that, as there is already an excellent module which handles this for you, and if you're not using it, you probably have your own ways of setting it up anyway. Pikka Bird Server only supports PostgreSQL, and there are no plans to change this.
It is expected that the Server will also be running the Collector; I can't think why you wouldn't want to monitor the server actually collecting the data. :) It is possible to not install the Collector if you desire, but the management of Pip, system users, etc. is only present in the Collector, so you'd have to handle this yourself, if so.
Pikka Bird Collector
To create a system user, upgrade Pip, install
Pikka Bird Collector, define the pikka-bird-collector
service,
bring it online, and start sending metrics to Pikka Bird Server:
class { '::pikka_bird::collector':
package_ensure => '0.2.0', # optional, but recommended
server_uri => 'http://pikka-bird.example.com:8042',
}
What is monitored by default is up to Pikka Bird Collector to decide. Currently, this is: load average; CPU usage; memory usage; disk usage.
See Reference for details of parameters supported.
Pikka Bird Server
To install PostgreSQL package dependencies (just the bindings),
install Pikka Bird Server, define the pikka-bird-server
service,
migrate the database, bring it online, and start listening for metrics from
Pikka Bird Collector:
class { '::pikka_bird::server':
package_ensure => '0.1.0', # optional, but recommended
database_uri => 'postgresql://pikka_bird:@localhost:5432/pikka_bird',
}
Multiple workers are started by default; the intention is for the default settings set up by the above to be production-grade. But of course you can tune them if you like. :)
See Reference for details of parameters supported.
Reference
pikka_bird::collector
-
ensure
: State of class. (NOTE: There are currently issues with uninstall.) (default:present
) -
format
: Which format to send metrics in (binary or JSON). (default:binary
) -
interval
: How frequently, on average, to send metrics after the previous collection. (s) (default:60
) -
log_level
: Log level. (default:INFO
) -
package_ensure
: State of Pikka Bird Collector package. (default:present
) -
package_manage
: Whether to manage Pikka Bird Collector package. (default:true
) -
package_name
: Name of Pikka Bird Collector package. (default:pikka-bird-collector
) -
path
:PATH
to use in execution. (default:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
) -
path_conf
: Location ofconf.d/
directory containing service definitions. (default:/etc/pikka-bird-collector/conf.d
) -
path_config
: Location of service configuration. (default:/etc/default/pikka-bird-collector
) -
path_daemon
: Location of service daemon. (default:/usr/local/bin/pikka-bird-collector
) -
path_etc
: Location ofetc/
. (default:/etc/pikka-bird-collector
) -
path_init
: Location ofinit.d/
script. (default:/etc/init.d/pikka-bird-collector
) -
path_log
: Location of logs. (default:/var/log/pikka-bird-collector
) -
path_manage
: Whether to manage locations, creating directories, etc. (default:true
) -
path_mode
: (TODO: fix this) -
path_pid
: Location of service pid record. (default:/var/run/pikka-bird-collector.pid
) -
pip_ensure
: Version of Pip to install. (default:latest
) -
pip_manage
: Whether to manage Pip. (default:true
) -
pip_name
: Name of Pip package. (default:pip
) -
python_dev
: Whether to install Python dev dependencies. (default:true
) -
python_manage
: Whether to manage Python. (default:true
) -
python_pip
: Whether to install Pip. (default:true
) -
python_version
: Version of Python to use or install. (default:system
) -
server_uri
: Address of Pikka Bird Server. (default:http://pikka-bird:${server_port}
) -
service_enable
: Whether to enable Pikka Bird Collector service. (default:true
) -
service_ensure
: Status of Pikka Bird Collector service. (default:running
) -
service_manage
: Whether to manage Pikka Bird Collector service. (default:true
) -
service_name
: Name of Pikka Bird Collector service. (default:pikka-bird-collector
) -
user_manage
: Whether to manage system user. (default:true
) -
user_name
: Name of system user. (default:pikka-bird
)
pikka_bird::server
-
ensure
: State of class. (NOTE: There are currently issues with uninstall.) (default:present
) -
bind_ip
: IP to bind to for listening. (default:0.0.0.0
) -
database_uri
: URI of PostgreSQL database, containing credentials. (NOTE: An open issue in Pikka Bird Server means it is currently not possible to supply this without leaking the URI to all users on the server; if you need to keep this private until it's sorted, you might like to use PostgreSQLuser
authentication rather thanMD5
.) (default:postgresql://pikka_bird:@localhost:5432/pikka_bird
) -
libpq_dev_ensure
: State of PostgreSQL bindings dependency package. (default:present
) -
libpq_dev_manage
: Whether to manage PostgreSQL bindings dependency package. (default:true
) -
libpq_dev_name
: Name of PostgreSQL bindings dependency package. (default:pikka-bird-server
) -
log_level
: Log level. (default:INFO
) -
package_ensure
: State of Pikka Bird Server package. (default:present
) -
package_manage
: Whether to manage Pikka Bird Server package. (default:true
) -
package_name
: Name of Pikka Bird Server package. (default:pikka-bird-server
) -
path
:PATH
to use in execution. (default:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
) -
path_config
: Location of service configuration. (default:/etc/default/pikka-bird-server
) -
path_daemon
: Location of service daemon. (default:/usr/local/bin/pikka-bird-server
) -
path_etc
: Location ofetc/
. (default:/etc/pikka-bird-server
) -
path_init
: Location ofinit.d/
script. (default:/etc/init.d/pikka-bird-server
) -
path_log
: Location of logs. (default:/var/log/pikka-bird-server
) -
path_manage
: Whether to manage locations, creating directories, etc. (default:true
) -
path_mode
: (TODO: fix this) -
path_pid
: Location of service pid record. (default:/var/run/pikka-bird-server.pid
) -
port
: Port to listen on. (default:8042
) -
service_enable
: Whether to enable Pikka Bird Server service. (default:true
) -
service_ensure
: Status of Pikka Bird Server service. (default:running
) -
service_manage
: Whether to manage Pikka Bird Server service. (default:true
) -
service_name
: Name of Pikka Bird Server service. (default:pikka-bird-server
) -
user_name
: Name of system user. (default:pikka-bird
) -
workers
: Number of workers to start. (default:16
)
Development
-
Libraries
Using Bundler,
bundle install
.
The default Ruby version supported is defined in .ruby-version
.
Any other versions supported are defined in .travis.yml
.
There are currently no tests whatsoever (yes, indeed). I'm running the module in a stack which not only compiles manifests but also runs everything across multiple servers, so I'm currently checking patches directly there. [tiredpixel] (Patches containing tests are welcome.)
Stay Tuned
We have a Librelist mailing list! To subscribe, send an email to pikka.bird@librelist.com. To unsubscribe, send an email to pikka.bird-unsubscribe@librelist.com. There be archives.
You can also become a watcher on GitHub. And don't forget you can become a stargazer if you are so minded. :D
Contributions
Contributions are embraced with much love and affection! <3 Please fork the repository and wizard your magic, preferably with plenty of fairy-dust sprinkled over the tests. Then send me a pull request. :) If you're thinking about working on something involved, it would be great if you could wave via the issue tracker or mailing list; I'd hate for good effort to be wasted!
Do whatever makes you happy. We'll probably still like you. :)
Blessing
May you find peace, and help others to do likewise.
Licence
© tiredpixel 2015.
It is free software, released under the MIT License, and may be redistributed
under the terms specified in LICENSE.txt
.
Pikka Bird (Puppet) Changelog
This changelog documents the main changes between released versions. For a full list of changes, consult the commit history.
0.1.0
-
first release! :D
-
configure a fully-functional metrics collector using just 1 parameter; around 30 parameters supported in total [tiredpixel]
-
configure a fully-functional metrics server using just 1 parameter (actually, you could do it with 0); around 25 parameters supported in total [tiredpixel]
-
support for Pikka Bird Collector 0.2.0, including: creating system user, upgrading Pip, installing Collector package, defining service, bringing online and sending metrics to Server [tiredpixel]
-
support for Pikka Bird Server 0.1.0, including: installing package bindings dependencies, installing Server package; defining service, migrating database, bringing online and receiving metrics from Collector [tiredpixel]
-
automatic database schema migrations [tiredpixel]
-
no Collector service configs (yet), but already automatic support for: load average; CPU usage; memory usage; disk usage [tiredpixel]
Dependencies
- puppetlabs-stdlib (>= 1.0.0)
- stankevich-python (>= 1.0.0)