Skip to content

Instantly share code, notes, and snippets.

@drwahl
Created February 22, 2016 20:07
Show Gist options
  • Save drwahl/af47cdc719e76239344f to your computer and use it in GitHub Desktop.
Save drwahl/af47cdc719e76239344f to your computer and use it in GitHub Desktop.
#
# Cookbook Name:: dreamcompute
# Recipe:: akrug-logstash
# DreamCompute nagios common packages
# Copyright 2015, DreamHost
#
# All rights reserved - Do Not Redistribute
#
include_recipe 'logstash::agent'
logstash_pattern 'rug' do
templates(
'rug' => 'rug'
)
end
unless Chef::Config[:solo] || Chef::Config[:local_mode]
graphite_node = search(:node, "role:graphite AND chef_environment:#{node.chef_environment}").first
end
logstash_config 'rug' do
templates(
'rug-filter.conf' => 'rug-filter'
)
variables(
'graphite_host_ip' => graphite_node['ipaddress']
)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment