74cfe3b94d
Current implementation of memcached and RabbitMQ monitoring in Zabbix is wrong. It doesn't work if we trying to check stats not from separate script. So, that script was created. Change-Id: I2cc11c39c91f485164872c8c8b11ef9d61ce9ae0 Closes-Bug: 1394252
28 lines
794 B
Puppet
28 lines
794 B
Puppet
class zabbix::monitoring::memcached_mon {
|
|
|
|
include zabbix::params
|
|
|
|
if defined(Class['memcached']) {
|
|
zabbix_template_link { "$zabbix::params::host_name Template App Memcache":
|
|
host => $zabbix::params::host_name,
|
|
template => 'Template App Memcache',
|
|
api => $zabbix::params::api_hash,
|
|
}
|
|
$nodes_hash = hiera('nodes')
|
|
$node = filter_nodes($nodes_hash,'name',$::hostname)
|
|
$internal_address = $node[0]['internal_address']
|
|
|
|
file { '/etc/zabbix/scripts/check_memcached.sh':
|
|
mode => '0755',
|
|
ensure => present,
|
|
content => template('zabbix/check_memcached.sh.erb'),
|
|
}
|
|
|
|
zabbix::agent::userparameter {
|
|
'memcache':
|
|
key => 'memcache[*]',
|
|
command => '/etc/zabbix/scripts/check_memcached.sh $1',
|
|
}
|
|
}
|
|
}
|