<commit_before># zabbix

####Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with zabbix](#setup)
    * [What zabbix affects](#what-zabbix-affects)
    * [Beginning with Zabbix Client](#beginning-with-zabbix-client)
    * [Beginning with Zabbix Server](#beginning-with-zabbix-server)
4. [Usage - Configuration options and additional functionality](#usage)
    * [Usage - Zabbix Client (Agent)](#zabbix-client)
    * [Usage - UserParameters](#userparameters)
    * [Usage - Zabbix Server](#zabbix-server)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)

##Overview

Module for managing Zabbix Server & Client.

##Module Description

The zabbix module currently only supports installing and configuring the Zabbix client (agent), as well as creating UserParameters. Furture support is planned for the server and proxies.

##Setup

###What zabbix affects

* Zabbix Client (Agent) Installation, Configuration & Service.
* UserParameters.
* Server Installation, Configuration & Service.
* Zabbix Server WebUI.

###Beginning with Zabbix Client

`include ::zabbix::client` is enough to install the client with a default configuration file.

If you want to specify some parameters, for example setting the **Server** variable:

```puppet
class { '::zabbix::client':
  server => '192.168.32.100',
}
```

Or if you use Hiera:

```puppet
---
zabbix::client::server: '192.168.32.100'
```

###Beginning with Zabbix Server

`include ::zabbix::server` is enough to install the server and WebUI with a default configuration file.

If you want to specify some parameters, for example setting some custom database details:

```puppet
class { '::zabbix::server':
  dbhost => '192.168.32.100',
  dbname => 'zabbixserver',
  dbuser => 'zabbixserver',
}
```

Or if you use Hiera:

```puppet
---
zabbix::server::dbhost: '192.168.32.100'
zabbix::server::dbname: 'zabbixserver'
zabbix::server::dbuser: 'zabbixserver'

##Usage

Managing the zabbix client is done through the `::zabbix::client` class including interacting with it's variables.

Managing the zabbix server is done through the `::zabbix::server` class including interacting with it's variables.

###Zabbix Client

####I just want Zabbix Client, what's the minimum I need?

```puppet
include ::zabbix::client
```

####I just want to tweak the Server, nothing else.

```puppet
class { '::zabbix::client':
  server => '192.168.32.100',
}
```

####We have a custom set-up and use Hiera to set our config.

```puppet
---
zabbix::client::server: '192.168.32.100'
zabbix::client::listenport: '10051'
zabbix::client::listenip: %{::ipaddress_em2}
```

###UserParameters

To create a user parameter include the following in your config:

```puppet
zabbix::client::userparameter { 'mysql':
  key     => 'mysql.ping',
  command => 'mysqladmin -uroot ping|grep -c alive',
}
```

You can also include an optional **comment** option:

```puppet
zabbix::client::userparameter { 'mysql':
  comment => 'Check if MySQL is alive.',
  key     => 'mysql.ping',
  command => 'mysqladmin -uroot ping|grep -c alive',
}
```

###Zabbix Server

####I just want Zabbix Server, what's the minimum I need?

```puppet
include ::zabbix::server
```

####I want to use PostgreSQL instead of MySQL, what do I need as a minimum?.

```puppet
class { '::zabbix::server':
  database => 'pgsql',
}
```

####We have a custom set-up and use Hiera to set our config.

```puppet
---
zabbix::server::database: 'pgsql'
```

##Reference

###Classes

####Public Classes

* zabbix::client: Main class for the client (agent), installs, configures & manages the service.
* zabbix::client::userparameter: Main class for declaring Zabbix Userparameter's.
* zabbix::server: Main class for the server & WebUI, installs, configures & manages the service.

####Private Classes
<commit_msg>Updated Hiera sections in docs<commit_after># zabbix

####Table of Contents

1. [Overview](#overview)
2. [Module Description - What the module does and why it is useful](#module-description)
3. [Setup - The basics of getting started with zabbix](#setup)
    * [What zabbix affects](#what-zabbix-affects)
    * [Beginning with Zabbix Client](#beginning-with-zabbix-client)
    * [Beginning with Zabbix Server](#beginning-with-zabbix-server)
4. [Usage - Configuration options and additional functionality](#usage)
    * [Usage - Zabbix Client (Agent)](#zabbix-client)
    * [Usage - UserParameters](#userparameters)
    * [Usage - Zabbix Server](#zabbix-server)
5. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
5. [Limitations - OS compatibility, etc.](#limitations)
6. [Development - Guide for contributing to the module](#development)

##Overview

Module for managing Zabbix Server & Client.

##Module Description

The zabbix module currently only supports installing and configuring the Zabbix client (agent), as well as creating UserParameters. Furture support is planned for the server and proxies.

##Setup

###What zabbix affects

* Zabbix Client (Agent) Installation, Configuration & Service.
* UserParameters.
* Server Installation, Configuration & Service.
* Zabbix Server WebUI.

###Beginning with Zabbix Client

`include ::zabbix::client` is enough to install the client with a default configuration file.

If you want to specify some parameters, for example setting the **Server** variable:

```puppet
class { '::zabbix::client':
  server => '192.168.32.100',
}
```

Or if you use Hiera:

```yaml
---
zabbix::client::server: '192.168.32.100'
```

###Beginning with Zabbix Server

`include ::zabbix::server` is enough to install the server and WebUI with a default configuration file.

If you want to specify some parameters, for example setting some custom database details:

```puppet
class { '::zabbix::server':
  dbhost => '192.168.32.100',
  dbname => 'zabbixserver',
  dbuser => 'zabbixserver',
}
```

Or if you use Hiera:

```yaml
---
zabbix::server::dbhost: '192.168.32.100'
zabbix::server::dbname: 'zabbixserver'
zabbix::server::dbuser: 'zabbixserver'
```

##Usage

Managing the zabbix client is done through the `::zabbix::client` class including interacting with it's variables.

Managing the zabbix server is done through the `::zabbix::server` class including interacting with it's variables.

###Zabbix Client

####I just want Zabbix Client, what's the minimum I need?

```puppet
include ::zabbix::client
```

####I just want to tweak the Server, nothing else.

```puppet
class { '::zabbix::client':
  server => '192.168.32.100',
}
```

####We have a custom set-up and use Hiera to set our config.

```puppet
---
zabbix::client::server: '192.168.32.100'
zabbix::client::listenport: '10051'
zabbix::client::listenip: %{::ipaddress_em2}
```

###UserParameters

To create a user parameter include the following in your config:

```puppet
zabbix::client::userparameter { 'mysql':
  key     => 'mysql.ping',
  command => 'mysqladmin -uroot ping|grep -c alive',
}
```

You can also include an optional **comment** option:

```puppet
zabbix::client::userparameter { 'mysql':
  comment => 'Check if MySQL is alive.',
  key     => 'mysql.ping',
  command => 'mysqladmin -uroot ping|grep -c alive',
}
```

###Zabbix Server

####I just want Zabbix Server, what's the minimum I need?

```puppet
include ::zabbix::server
```

####I want to use PostgreSQL instead of MySQL, what do I need as a minimum?

```puppet
class { '::zabbix::server':
  database => 'pgsql',
}
```

####We have a custom set-up and use Hiera to set our config.

```puppet
---
zabbix::server::database: 'pgsql'
```

##Reference

###Classes

####Public Classes

* zabbix::client: Main class for the client (agent), installs, configures & manages the service.
* zabbix::client::userparameter: Main class for declaring Zabbix Userparameter's.
* zabbix::server: Main class for the server & WebUI, installs, configures & manages the service.

####Private Classes

{'fraction_non_alphanumeric': 0.13980343980343982, 'fraction_numerical': 0.01941031941031941, 'mean_word_length': 4.786069651741293, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 12, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2782833', 'n_tokens_mistral': 2776, 'n_tokens_neox': 2549, 'n_words': 896}