Changed yaml files for checks to build with concat

Change-Id: I635920bb4ecb2a35caa33a8709517901e84f797e
This commit is contained in:
Ryan Bak 2014-12-17 10:00:46 -07:00
parent 55052af810
commit 13ea7d6cd4
30 changed files with 488 additions and 172 deletions

View File

@ -5,27 +5,36 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the apache check are:
# name (the instance key): The name of the instance.
# apache_status_url (required)
# dimensions
# e.g.
# $instances = [{apache_status_url => 'http://your.server.name/server-status'}]
# instances:
# server:
# apache_status_url: 'http://your.server.name/server-status'
#
class monasca::checks::apache(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/apache.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/apache.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/apache.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/apache.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'apache_header':
target => "${conf_dir}/apache.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::apache', $instances)
}
}

View File

@ -10,35 +10,46 @@
# [*ping_timeout*]
# ping_timeout is an integer number of seconds
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the host_alive check are:
# name (the instance key): The name of the instance.
# host_name (required)
# alive_test (required)
# e.g.
# $instances = [{host_name => 'somehost.somedomain.net',
# alive_test => 'ssh'},
# {host_name => 'gateway.somedomain.net',
# alive_test => 'ping'},
# {host_name => '192.168.0.221',
# alive_test => 'ssh'}]
# instances:
# host:
# host_name: 'somehost.somedomain.net'
# alive_test: 'ssh'
# gateway:
# host_name: 'gateway.somedomain.net'
# alive_test: 'ping'
# other:
# host_name: '192.168.0.221'
# alive_test: 'ssh'
#
class monasca::checks::host_alive(
$ssh_port = '22',
$ssh_timeout = '0.5',
$ping_timeout = '1',
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/host_alive.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/host_alive.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/host_alive.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/host_alive.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/host_alive.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'host_alive_header':
target => "${conf_dir}/host_alive.yaml",
order => '0',
content => template('monasca/checks/host_alive.yaml.erb'),
}
create_resources('monasca::checks::instances::host_alive', $instances)
}
}

View File

@ -5,9 +5,10 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the http_check check are:
# name (the instance key): The name of the instance.
# url (required)
# timeout (default = 10)
# username
@ -19,26 +20,34 @@
# disable_ssl_validation (default = True)
# dimensions
# e.g.
# $instances = [{url => 'http://192.168.0.254:8774/v2.0',
# dimensions => '{service: compute_api}',
# match_pattern => '.*version=2.*',
# timeout => '10',
# use_keystone => 'True',
# collect_response_time => 'True'}]
# instances:
# nova-api:
# url: 'http://192.168.0.254:8774/v2.0'
# dimensions: '{service: compute_api}'
# match_pattern: '.*version=2.*'
# timeout: '10'
# use_keystone: 'True'
# collect_response_time: 'True'
#
class monasca::checks::http_check(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/http_check.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/http_check.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/http_check.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/http_check.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'http_check_header':
target => "${conf_dir}/http_check.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::http_check', $instances)
}
}

View File

@ -0,0 +1,11 @@
define monasca::checks::instances::apache (
$apache_status_url,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_apache_instance":
target => "${conf_dir}/apache.yaml",
content => template('monasca/checks/apache.erb'),
order => '1',
}
}

View File

@ -0,0 +1,11 @@
define monasca::checks::instances::host_alive (
$host_name,
$alive_test,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_host_alive_instance":
target => "${conf_dir}/host_alive.yaml",
content => template('monasca/checks/host_alive.erb'),
order => '1',
}
}

View File

@ -0,0 +1,19 @@
define monasca::checks::instances::http_check (
$url,
$timeout = undef,
$username = undef,
$password = undef,
$match_pattern = undef,
$use_keystone = undef,
$collect_response_time = undef,
$headers = undef,
$disable_ssl_validation = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_http_check_instance":
target => "${conf_dir}/http_check.yaml",
content => template('monasca/checks/http_check.erb'),
order => '1',
}
}

View File

@ -0,0 +1,17 @@
define monasca::checks::instances::mysql (
$server = undef,
$user = undef,
$port = undef,
$pass = undef,
$sock = undef,
$defaults_file = undef,
$dimensions = undef,
$options = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_mysql_instance":
target => "${conf_dir}/mysql.yaml",
content => template('monasca/checks/mysql.erb'),
order => '1',
}
}

View File

@ -0,0 +1,13 @@
define monasca::checks::instances::nagios_wrapper (
$check_command,
$host_name = undef,
$check_interval = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_nagios_wrapper_instance":
target => "${conf_dir}/nagios_wrapper.yaml",
content => template('monasca/checks/nagios_wrapper.erb'),
order => '1',
}
}

View File

@ -0,0 +1,13 @@
define monasca::checks::instances::network (
$collect_connection_state = undef,
$excluded_interfaces = undef,
$excluded_interface_re = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_network_instance":
target => "${conf_dir}/network.yaml",
content => template('monasca/checks/network.erb'),
order => '1',
}
}

View File

@ -0,0 +1,14 @@
define monasca::checks::instances::process (
$search_string,
$exact_match = undef,
$cpu_check_interval = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_process_instance":
target => "${conf_dir}/process.yaml",
content => template('monasca/checks/process.erb'),
order => '1',
}
}

View File

@ -0,0 +1,19 @@
define monasca::checks::instances::rabbitmq (
$rabbitmq_api_url,
$rabbitmq_user = undef,
$rabbitmq_pass = undef,
$queues = undef,
$nodes = undef,
$exchanges = undef,
$max_detailed_queues = undef,
$max_detailed_exchanges = undef,
$max_detailed_nodes = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_rabbitmq_instance":
target => "${conf_dir}/rabbitmq.yaml",
content => template('monasca/checks/rabbitmq.erb'),
order => '1',
}
}

View File

@ -0,0 +1,13 @@
define monasca::checks::instances::zk (
$host = undef,
$port = undef,
$timeout = undef,
$dimensions = undef,
) {
$conf_dir = $::monasca::agent::conf_dir
concat::fragment { "${title}_zk_instance":
target => "${conf_dir}/zk.yaml",
content => template('monasca/checks/zk.erb'),
order => '1',
}
}

View File

@ -5,9 +5,10 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the mysql check are:
# name (the instance key): The name of the instance.
# server
# user
# port
@ -17,31 +18,39 @@
# dimensions
# options
# e.g.
# $instances = [{defaults_file => '/root/.my.cnf',
# server => 'localhost',
# user => 'root'}]
# instances:
# local:
# defaults_file: '/root/.my.cnf'
# server: 'localhost'
# user: 'root'
#
class monasca::checks::mysql(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
$virtual_env = $::monasca::agent::virtual_env
File["${conf_dir}/mysql.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/mysql.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/mysql.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/mysql.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'mysql_header':
target => "${conf_dir}/mysql.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::mysql', $instances)
}
python::pip { 'MySQL-python' :
virtualenv => $::monasca::agent::virtual_env,
virtualenv => $virtual_env,
owner => 'root',
require => Python::Virtualenv[$virtual_env],
before => Service['monasca-agent'],
}
}

View File

@ -8,36 +8,43 @@
# [*temp_file_path*]
# Where to store last-run timestamps for each check
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the nagios_wrapper check are:
# name (required)
# service_name (the instance key): The name of the instance.
# check_command (required)
# host_name
# check_interval
# dimensions
# e.g.
# $instances = [{service_name => 'load',
# check_command => 'check_load -r -w 2,1.5,1 -c 10,5,4'},
# {service_name => 'disk',
# check_command => 'check_disk -w 15\% -c 5\% -A -i /srv/node',
# check_interval => '300'}]
# instances:
# load:
# check_command: 'check_load -r -w 2,1.5,1 -c 10,5,4'
# disk:
# check_command: 'check_disk -w 15\% -c 5\% -A -i /srv/node'
# check_interval: '300'
#
class monasca::checks::nagios_wrapper(
$check_path = '/usr/lib/nagios/plugins:/usr/local/bin/nagios',
$temp_file_path = '/dev/shm/',
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/nagios_wrapper.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/nagios_wrapper.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/nagios_wrapper.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/nagios_wrapper.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/nagios_wrapper.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'nagios_wrapper_header':
target => "${conf_dir}/nagios_wrapper.yaml",
order => '0',
content => template('monasca/checks/nagios_wrapper.yaml.erb'),
}
create_resources('monasca::checks::instances::nagios_wrapper', $instances)
}
}

View File

@ -5,30 +5,39 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the network check are:
# name (the instance key): The name of the instance.
# collect_connection_state (default = False)
# excluded_interfaces
# excluded_interface_re: A regular expression for excluded interfaces
# dimensions
# e.g.
# $instances = [{collect_connection_state => 'False',
# excluded_interfaces => '[lo, lo0]'}]
# instances:
# net:
# collect_connection_state: 'False'
# excluded_interfaces: '[lo, lo0]'
#
class monasca::checks::network(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/network.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/network.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/network.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/network.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'network_header':
target => "${conf_dir}/network.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::network', $instances)
}
}

View File

@ -5,38 +5,42 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the process check are:
# name (required): The name of the instance.
# name (the instance key): The name of the instance.
# search_string (required): An array of process names to search for.
# exact_match (default = True): Whether the search_string should exactly
# match the service name. (Boolean)
# cpu_check_interval (default = 0.1):
# dimensions: Additional dimensions for the instance.
# e.g.
# $instances = [{name => 'nova-api',
# search_string => '[nova-api]',
# dimensions => '{component: nova-api, service: compute}'},
# {name => 'ssh',
# search_string => '['ssh', 'sshd']'}
# {name => 'mysql',
# search_string => '[mysql]',
# exact_match => 'True'}]
# instances:
# nova-api:
# search_string: '[nova-api]'
# dimensions: '{component: nova-api, service: compute}'
# rabbitmq-server:
# search_string: '[rabbitmq-server]'
#
class monasca::checks::process(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/process.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/process.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/process.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/process.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'process_header':
target => "${conf_dir}/process.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::process', $instances)
}
}

View File

@ -5,9 +5,10 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the rabbitmq check are:
# name (the instance key): The name of the instance.
# rabbitmq_user (default = guest)
# rabbitmq_pass (default = guest)
# rabbitmq_api_url (required)
@ -19,26 +20,34 @@
# max_detailed_nodes
# dimensions
# e.g.
# $instances = [{rabbitmq_user => 'guest',
# rabbitmq_pass => 'guest',
# rabbitmq_api_url => 'http://localhost:15672/api',
# exchanges => '[[nova, cinder, ceilometer, glance, keystone, neutron, heat]',
# nodes => '[rabbit@devstack]',
# queues => '[conductor]'}]
# instances:
# rabbit:
# rabbitmq_user: 'guest'
# rabbitmq_pass: 'guest'
# rabbitmq_api_url: 'http://localhost:15672/api'
# exchanges: '[nova, cinder, ceilometer, glance, keystone, neutron, heat]'
# nodes: '[rabbit@devstack]'
# queues: '[conductor]'
#
class monasca::checks::rabbitmq(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/rabbitmq.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/rabbitmq.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/rabbitmq.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/rabbitmq.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'rabbitmq_header':
target => "${conf_dir}/rabbitmq.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::rabbitmq', $instances)
}
}

View File

@ -5,31 +5,40 @@
# === Parameters
#
# [*instances*]
# An array of instances for the check.
# A hash of instances for the check.
# Each instance should be a hash of the check's parameters.
# Parameters for the zk check are:
# name (the instance key): The name of the instance.
# host (default = localhost)
# port (default = 2181)
# timeout (default = 3.0)
# dimensions
# e.g.
# $instances = [{host => 'localhost',
# port => '2181',
# timeout => '3'}]
# instances:
# local:
# host: 'localhost'
# port: '2181'
# timeout: '3'
#
class monasca::checks::zk(
$instances = [],
$instances = undef,
){
$conf_dir = $::monasca::agent::conf_dir
File["${conf_dir}/zk.yaml"] ~> Service['monasca-agent']
file { "${conf_dir}/zk.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
content => template('monasca/checks/generic.yaml.erb'),
require => File[$conf_dir],
if($instances){
Concat["${conf_dir}/zk.yaml"] ~> Service['monasca-agent']
concat { "${conf_dir}/zk.yaml":
owner => 'root',
group => $::monasca::group,
mode => '0640',
warn => true,
require => File[$conf_dir],
}
concat::fragment { 'zk_header':
target => "${conf_dir}/zk.yaml",
order => '0',
content => "---\ninit_config: null\ninstances:\n",
}
create_resources('monasca::checks::instances::zk', $instances)
}
}

View File

@ -0,0 +1,5 @@
- name: <%= @title %>
apache_status_url: <%= @apache_status_url %>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

View File

@ -1,12 +0,0 @@
---
init_config: null
instances:
<% instances.each do |instance| -%>
<% for index in 0 ... instance.size -%>
<% if index == 0 -%>
- <%= instance.keys[index] %>: <%= instance.values[index] %>
<% else -%>
<%= instance.keys[index] %>: <%= instance.values[index] %>
<% end -%>
<% end -%>
<% end -%>

View File

@ -0,0 +1,3 @@
- name: <%= @title %>
host_name: <%= @host_name %>
alive_test: <%= @alive_test %>

View File

@ -5,12 +5,3 @@ init_config:
ping_timeout: <%= ping_timeout %>
instances:
<% instances.each do |instance| -%>
<% for index in 0 ... instance.size -%>
<% if index == 0 -%>
- <%= instance.keys[index] %>: <%= instance.values[index] %>
<% else -%>
<%= instance.keys[index] %>: <%= instance.values[index] %>
<% end -%>
<% end -%>
<% end -%>

View File

@ -0,0 +1,29 @@
- name: <%= @title %>
url: <%= @url %>
<%- if @timeout -%>
timeout: <%= @timeout %>
<%- end -%>
<%- if @username -%>
username: <%= @username %>
<%- end -%>
<%- if @password -%>
password: <%= @password %>
<%- end -%>
<%- if @match_pattern -%>
match_pattern: <%= @match_pattern %>
<%- end -%>
<%- if not @use_keystone.nil? -%>
use_keystone: <%= @use_keystone %>
<%- end -%>
<%- if not @collect_response_time.nil? -%>
collect_response_time: <%= @collect_response_time %>
<%- end -%>
<%- if @headers -%>
headers: <%= @headers %>
<%- end -%>
<%- if not @disable_ssl_validation.nil? -%>
disable_ssl_validation: <%= @disable_ssl_validation %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

View File

@ -0,0 +1,25 @@
- name: <%= @title %>
<%- if @server -%>
server: <%= @server %>
<%- end -%>
<%- if @user -%>
user: <%= @user %>
<%- end -%>
<%- if @port -%>
port: <%= @port %>
<%- end -%>
<%- if @pass -%>
pass: <%= @pass %>
<%- end -%>
<%- if @sock -%>
sock: <%= @sock %>
<%- end -%>
<%- if @defaults_file -%>
defaults_file: <%= @defaults_file %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>
<%- if @options -%>
options: <%= @options %>
<%- end -%>

View File

@ -0,0 +1,11 @@
- service_name: <%= @title %>
check_command: <%= @check_command %>
<%- if @host_name -%>
host_name: <%= @host_name %>
<%- end -%>
<%- if @check_interval -%>
check_interval: <%= @check_interval %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

View File

@ -4,12 +4,3 @@ init_config:
temp_file_path: <%= temp_file_path %>
instances:
<% instances.each do |instance| -%>
<% for index in 0 ... instance.size -%>
<% if index == 0 -%>
- <%= instance.keys[index] %>: <%= instance.values[index] %>
<% else -%>
<%= instance.keys[index] %>: <%= instance.values[index] %>
<% end -%>
<% end -%>
<% end -%>

View File

@ -0,0 +1,13 @@
- name: <%= @title %>
<%- if not @collect_connection_state.nil? -%>
collect_connection_state: <%= @collect_connection_state %>
<%- end -%>
<%- if @excluded_interfaces -%>
excluded_interfaces: <%= @excluded_interfaces %>
<%- end -%>
<%- if @excluded_interface_re -%>
excluded_interface_re: <%= @excluded_interface_re %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

View File

@ -0,0 +1,11 @@
- name: <%= @title %>
search_string: <%= @search_string %>
<%- if not @exact_match.nil? -%>
exact_match: <%= @exact_match %>
<%- end -%>
<%- if @cpu_check_interval -%>
cpu_check_interval: <%= @cpu_check_interval %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

View File

@ -0,0 +1,29 @@
- name: <%= @title %>
rabbitmq_api_url: <%= @rabbitmq_api_url %>
<%- if @rabbitmq_user -%>
rabbitmq_user: <%= @rabbitmq_user %>
<%- end -%>
<%- if @rabbitmq_pass -%>
rabbitmq_pass: <%= @rabbitmq_pass %>
<%- end -%>
<%- if @queues -%>
queues: <%= @queues %>
<%- end -%>
<%- if @nodes -%>
nodes: <%= @nodes %>
<%- end -%>
<%- if @exchanges -%>
exchanges: <%= @exchanges %>
<%- end -%>
<%- if @max_detailed_queues -%>
max_detailed_queues: <%= @max_detailed_queues %>
<%- end -%>
<%- if @max_detailed_exchanges -%>
max_detailed_exchanges: <%= @max_detailed_exchanges %>
<%- end -%>
<%- if @max_detailed_nodes -%>
max_detailed_nodes: <%= @max_detailed_nodes %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>

14
templates/checks/zk.erb Normal file
View File

@ -0,0 +1,14 @@
- name: <%= @title %>
search_string: <%= @search_string %>
<%- if @host -%>
host: <%= @host %>
<%- end -%>
<%- if @port -%>
port: <%= @port %>
<%- end -%>
<%- if @timeout -%>
timeout: <%= @timeout %>
<%- end -%>
<%- if @dimensions -%>
dimensions: <%= @dimensions %>
<%- end -%>