monitor::plugin { 'mysql_health_slave_sql_running':
plugin => 'check_mysql_health',
options_hash => { use => 'replication-service' },
tool => ['puppi', 'nagios']
}
nagios::service { $safe_name:
ensure => $ensure,
options_hash => $options_hash,
template => $real_template,
check_command => $check_command,
}
But when it instance the nagios::service class, notthing happend because i think the parameter "options_hash" doesnt use anywhere... ?¿ Maybe is something missing on class, i thought it would be applied on the template but it doesnt.
define service {
host_name <%= @host_name %>
service_description <%= @real_service_description %>
check_command <%= @real_check_command %>
use <%= @use %>
}
# Load Average
define service {
host_name <%= @host_name %>
service_description Load_Average
check_command check_nrpe!check_load!noarg
use <%= @use %>
servicegroups load_average
contact_groups <%= @owner_name %>
<% if ( @environment =~ /development|test|default/i ) then -%>
notification_interval 60
notification_period workhours
<% else -%>
notification_interval 15
notification_period 24x7
<% end -%>
--
You received this message because you are subscribed to a topic in the Google Groups "Example42 Puppet Modules" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/example42-puppet-modules/mL4DeVFxCeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to example42-puppet-m...@googlegroups.com.
To post to this group, send email to example42-pu...@googlegroups.com.
Visit this group at http://groups.google.com/group/example42-puppet-modules.
For more options, visit https://groups.google.com/d/optout.
define service {
<%if @options_hash['host_name'] -%>
host_name <%= @options_hash['host_name'] %>
<% else -%>
host_name <%= @host_name %>
<% end -%>
<%if @options_hash['real_service_description'] -%>
service_description <%= @options_hash['real_service_description'] %>
<% else -%>
service_description <%= @real_service_description %>
<% end -%>
<%if @options_hash['real_check_command'] -%>
check_command <%= @options_hash['real_check_command'] %>
<% else -%>
check_command <%= @real_check_command %>
<% end -%>
<%if @options_hash['use'] -%>
use <%= @options_hash['use'] %>
<% else -%>
use <%= @use %>
<% end -%>
}
monitor::plugin { 'mysql_health_slave_sql_running':
plugin => 'check_mysql_health',
options_hash => { use => 'replication-service' },
tool => ['puppi', 'nagios']
template => 'module/custom_service.erb',
}
define service {
host_name <%= @host_name %>
service_description <%= @real_service_description %>
check_command <%= @real_check_command %>
use <%= @options_hash['use'] %>
}
--
You received this message because you are subscribed to a topic in the Google Groups "Example42 Puppet Modules" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/example42-puppet-modules/mL4DeVFxCeI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to example42-puppet-m...@googlegroups.com.
To post to this group, send email to example42-pu...@googlegroups.com.
Visit this group at http://groups.google.com/group/example42-puppet-modules.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to example42-puppet-modules+unsub...@googlegroups.com.
To post to this group, send email to example42-puppet-modules@googlegroups.com.
Visit this group at http://groups.google.com/group/example42-puppet-modules.
For more options, visit https://groups.google.com/d/optout.