Falcore

Build Status

Falcore is a Ruby gem for aggregating system information from the Jenkins API.

Installation

Add this line to your application's Gemfile:

gem 'falcore'

And then execute:

$ bundle

Or install it yourself as:

$ gem install falcore

Vocabulary

  • aggregator - takes information from the Jenkins master about itself and child slaves and converts the information into Ruby objects
  • dumper - converts Ruby objects into an output format (such as Nagios or StatsD)

Usage

  1. Create a Falcore configuration file somewhere on disk:
  [jenkins]
    endpoint = https://localhost:8889

You must add the jenkins.endpoint configuration value. This tells Falcore where to query Jenkins for information. You should include the protocol, host or IP address, port, and proxy if applicable.

  1. Add configuration for each "dumper" you would like to use. The configuration varies by dumper, so consult the documentation accordingly:
  [jenkins]
    endpoint = https://localhost:8889

  [statsd]
    host = 127.0.0.1
    port = 8824

  [nagios]
    host = https://my.nagios.server
  1. Run Falcore:

Foreground:

  falcore --config /path/to/your/config.falcore

As a daemon:

  falcore --config /path/to/your/config.falcore --daemon

Dumpers

Statsd

The Statsd dumper is a generic Statsd dumper that namespaces data by hostname.

[statsd]
  host = 127.0.0.1
  port = 8125

This will dump information to a local Statsd on port 8125. The information is namespaced by the Jenkins master, and slaves are nested under their appropiate master. For example:

jenkins.master.disk_space
jenkins.master.slave-12345.disk_space

DogStatsd

The DogStatsd dumper is a DataDog-specific dumper that adds additional sugar when pushing the data to DataDog. The format for the configuration is almost identical to Statsd, but with a different config header.

[dogstatsd]
  host = 127.0.0.1
  port = 8125

This will dump information to a local DogStatsd server running on port 8125. Unlike the Statsd dumper, the information is not namespaced. Instead, each node (master or slave) is tagged with a name that corresponds to the Jenkins displayName attribute. You can then filter or aggregate by name to separate information on the graphs.

License & Authors

Copyright 2014 Chef Software, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.