This repository has been archived by the owner on Jan 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from gds-operations/carbon_aggregator
Optional support for carbon-aggregator
- Loading branch information
Showing
8 changed files
with
145 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'spec_helper' | ||
|
||
describe 'graphite', :type => :class do | ||
context 'param defaults' do | ||
it { should contain_service('carbon-aggregator').with_ensure('stopped') } | ||
it { should contain_service('carbon-cache') } | ||
it { should contain_service('graphite-web') } | ||
end | ||
|
||
context 'carbon_aggregator' do | ||
let(:params) {{ | ||
:carbon_aggregator => true, | ||
}} | ||
|
||
it { should contain_service('carbon-aggregator').with_ensure('running') } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
description "Carbon aggregator service for Graphite" | ||
|
||
start on (net-device-up | ||
and local-filesystems | ||
and runlevel [2345]) | ||
stop on runlevel [!2345] | ||
|
||
respawn | ||
|
||
chdir '<%= @root_dir %>' | ||
env GRAPHITE_STORAGE_DIR='<%= @root_dir %>/storage' | ||
env GRAPHITE_CONF_DIR='<%= @root_dir %>/conf' | ||
exec python '<%= @root_dir %>/bin/carbon-aggregator.py' \ | ||
<% if @aggregation_rules_ensure == 'present' -%> | ||
--rules='<%= @root_dir %>/conf/aggregation-rules.conf' \ | ||
<% end -%> | ||
--debug start |