Puppet Class: zabbix::zapache

Inherits:
zabbix::params
Defined in:
manifests/zapache.pp

Summary

This will install and configure the zapache monitoring script Upstream: https://github.com/lorf/zapache

Overview

Examples:

Basic installation:

class { 'zabbix::agent':
  manage_resources => true,
  apache_status    => true,
  zbx_templates    => [ 'Template App Apache Web Server zapache'],
}

Parameters:

  • apache_status (Boolean) (defaults to: $zabbix::params::apache_status)

    Boolean. False by default. Installs zapache monitoring script when true.

Author:

  • Robert Tisdale <rob@roberttisdale.com>



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'manifests/zapache.pp', line 10

class zabbix::zapache (
  Boolean $apache_status = $zabbix::params::apache_status,
) inherits zabbix::params {
  if $apache_status {
    file { ['/var/lib/zabbixsrv/','/var/lib/zabbixsrv/externalscripts/']:
      ensure => directory,
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
    }
    file { '/var/lib/zabbixsrv/externalscripts/zapache':
      ensure => file,
      source => 'puppet:///modules/zabbix/zapache/zapache',
      owner  => 'root',
      group  => 'root',
      mode   => '0755',
    }
    file { '/etc/zabbix/zabbix_agentd.d/userparameter_zapache.conf':
      ensure  => file,
      source  => 'puppet:///modules/zabbix/zapache/userparameter_zapache.conf.sample',
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      require => Package['zabbix-agent'],
      notify  => Service['zabbix-agent'],
    }
    file { '/etc/httpd/conf.d/httpd-server-status.conf':
      ensure  => file,
      source  => 'puppet:///modules/zabbix/zapache/httpd-server-status.conf.sample',
      owner   => 'root',
      group   => 'root',
      mode    => '0644',
      require => [Package['zabbix-agent'],Package['httpd']],
      notify  => Service['httpd'],
    }
  }
}