Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x, 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.0 < 9.0.0
- ,
Start using this module
Add this module to your Puppetfile:
mod 'aursu-grayloginstall', '0.2.3'
Learn more about managing modules with a PuppetfileDocumentation
grayloginstall
Installation of GrayLog on the server with all components (MongoDD and Elasticsearch)
Table of Contents
- Description
- Setup - The basics of getting started with grayloginstall
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
Installation of GrayLog on the server with all components (MongoDD and Elasticsearch)
Setup
What grayloginstall affects OPTIONAL
Setup Requirements OPTIONAL
PuppetDB proper setup required for Cluster setup
Beginning with grayloginstall
Usage
class { 'grayloginstall::server':
root_password => $root_password,
password_secret => $password_secret,
mongodb_password => $mongodb_password,
elastic_seed_hosts => $elastic_seed_hosts,
elastic_network_host => $elastic_network_host,
elastic_master_only => $elastic_master_only,
cluster_network => $cluster_network,
repo_sslverify => 0,
is_master => $is_master,
enable_web => $enable_web,
http_server => $http_server,
}
Reference
See REFERENCE.md
Limitations
Development
Release Notes/Contributors/Etc. Optional
Reference
Table of Contents
Classes
grayloginstall
: A short summary of the purpose of this classgrayloginstall::cluster
: Retrieve and export cluster settings via PuppetDBgrayloginstall::elastic
: Configure elasticsearch for use with Grayloggrayloginstall::java
: Install Java Runtimegrayloginstall::mongodb
: Setup MongoDB service as part of replica setgrayloginstall::params
: A short summary of the purpose of this classgrayloginstall::server
: Setup GrayLog servergrayloginstall::web
: Setup Web service for GrayLog web interface
Defined types
grayloginstall::elastic_host
: Elasticsearch resource to export into PuppetDBgrayloginstall::mongodb_host
: MongoDB resource to export into PuppetDB
Functions
grayloginstall::configaddr
grayloginstall::discovery_hosts
grayloginstall::mongo_password
grayloginstall::pup_selfaddr
grayloginstall::selfaddr
grayloginstall::selfsubnet
Data types
Grayloginstall::MongoAddr
Grayloginstall::NetworkHost
: https://nginx.org/en/docs/ngx_core_module.html#error_log
Classes
grayloginstall
A description of what this class does
Examples
include grayloginstall
grayloginstall::cluster
Retrieve and export cluster settings via PuppetDB
Examples
include grayloginstall::cluster
Parameters
The following parameters are available in the grayloginstall::cluster
class.
cluster_name
Data type: String
Default value: $grayloginstall::params::cluster_name
fallback_default
Data type: Boolean
Default value: false
subnet
Data type: Optional[Stdlib::IP::Address]
Default value: undef
external_subnet
Data type: Optional[Stdlib::IP::Address]
Default value: undef
grayloginstall::elastic
Configure elasticsearch for use with Graylog
Examples
Basic usage
class { 'grayloginstall::elastic':
network_host => '_eth1:ipv4_',
discovery_seed_hosts => ['192.168.178.10', '192.168.178.20'],
}
Parameters
The following parameters are available in the grayloginstall::elastic
class.
version
Data type: String
Elasticsearch version (Graylog 3 does not work with Elasticsearch 7.x)
Default value: $grayloginstall::params::elastic_version
minimum_master_nodes
Data type: Integer
it is vital to configure the discovery.zen.minimum_master_nodes setting so that each master-eligible node knows the minimum number of master-eligible nodes that must be visible in order to form a cluster. Default is 2 (avoiding split brain in case of 2-3 nodes) See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/discovery-settings.html#minimum_master_nodes
Default value: 2
network_host
Data type: Optional[Grayloginstall::NetworkHost]
The node will bind to this hostname or IP address and publish (advertise) this host to other nodes in the cluster. Accepts an IP address, hostname, a special value. Default is site (any site-local addresses on the system, for example 192.168.0.1) See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/modules-network.html#network-interface-values
Default value: undef
discovery_seed_hosts
Data type: Optional[Array[Stdlib::IP::Address]]
seed list of other nodes in the cluster. Default is ["127.0.0.1", "[::1]"] - elasticsearch will bind to the available loopback addresses and will scan ports 9300 to 9305 to try to connect to other nodes running on the same server See https://www.elastic.co/guide/en/elasticsearch/reference/6.8/discovery-settings.html#unicast.hosts
Default value: undef
master_only
Data type: Boolean
Default value: false
grayloginstall::java
Install Java Runtime
Examples
include grayloginstall::java
grayloginstall::mongodb
Setup MongoDB service as part of replica set
Examples
include grayloginstall::mongodb
Parameters
The following parameters are available in the grayloginstall::mongodb
class.
graylog_password
Data type: String
manage_open_files_limit
Data type: Boolean
Default value: true
manage_selinux
Data type: Boolean
Default value: false
version
Data type: String
Default value: $grayloginstall::params::mongodb_version
bind_ip
Data type: Optional[Array[Stdlib::IP::Address]]
Default value: undef
repo_sslverify
Data type: Optional[Integer[0,1]]
Default value: undef
setup_replica_set
Data type: Boolean
Default value: true
replica_set_name
Data type: String
Default value: $grayloginstall::params::mongodb_replset_name
replica_set_members
Data type: Optional[Grayloginstall::MongoAddr]
Default value: undef
graylog_user
Data type: String
Default value: $grayloginstall::params::mongodb_user
graylog_database
Data type: String
Default value: $grayloginstall::params::mongodb_database
grayloginstall::params
A description of what this class does
Examples
include grayloginstall::params
grayloginstall::server
Setup GrayLog server
Examples
include grayloginstall::server
Parameters
The following parameters are available in the grayloginstall::server
class.
root_password
Data type: String
Root password to pass to SHA2 function in order to set up root_password_sha2
(Graylog)
password_secret
Data type: String[64]
Secret that is used for password encryption and salting (Graylog)
mongodb_addr
Data type: Optional[Grayloginstall::MongoAddr]
MongoDB conneectionn address. If provided than has higher priority than self-managed instance of MongoDB
(see mongodb_bind_ip
and mongodb_replset_members
)
Default value: undef
manage_mongodb
Data type: Boolean
Boolean flag whether to manage own MongoDB instance or not
Default value: true
mongodb_bind_ip
Data type: Optional[Array[Stdlib::IP::Address]]
Array of IP addresses. If provided, MongoDB will bind to these addresses only.
If not provided MongoDB will bind to address that reside in cluster_network
if specified.
Otherwise it will fallback to default (see grayloginstall::params
)
Default value: undef
http_bind_ip
Data type: Optional[Stdlib::IP::Address]
IP part of graylog setting http_bind_address
(it has higher priority than http_bind_external
)
Default is 127.0.0.1
See https://docs.graylog.org/en/3.2/pages/configuration/web_interface.html
Default value: undef
http_bind_port
Data type: Integer
Port part of graylog setting http_bind_address Default is 9000 See https://docs.graylog.org/en/3.2/pages/configuration/web_interface.html
Default value: $grayloginstall::params::http_bind_port
http_external_uri
The public URI of Graylog which will be used by the Graylog web interface to communicate with the Graylog REST API. Graylog web interface.
external_network
Data type: Optional[Stdlib::IP::Address]
In case of private and public network assigned to server (or multiple networks) - it is possible to specify external network to bind on WEB interface (see http_bind_external)
Default value: undef
http_bind_cluster
Data type: Boolean
Whether to bind WEB interface to cluster network (if provided - see cluster_network
) or to fallback to http_bind_external
(see below). If specified both http_bind_ip and http_bind_cluster than http_bind_ip option has higher priority
Default value: true
http_bind_external
Data type: Boolean
Whether to bind WEB interface to external network (if provided - see external_network
) or to fallback to default server IP
(see $::facts['networking']['ip']). If specified http_bind_ip or http_bind_cluster than these options have higher priority
Default value: true
mongodb_password
Data type: String
package_version
Data type: String
Default value: $grayloginstall::params::graylog_version
major_version
Data type: String
Default value: $grayloginstall::params::graylog_major
mongodb_conn_replset_name
Data type: Optional[String]
Default value: undef
mongodb_user
Data type: String
Default value: $grayloginstall::params::mongodb_user
mongodb_database
Data type: String
Default value: $grayloginstall::params::mongodb_database
setup_replica_set
Data type: Boolean
Default value: true
mongodb_replset_members
Data type: Optional[Grayloginstall::MongoAddr]
Default value: undef
mongodb_replset_name
Data type: Optional[String]
Default value: $grayloginstall::params::mongodb_replset_name
manage_elastic
Data type: Boolean
Default value: true
elastic_network_host
Data type: Optional[Grayloginstall::NetworkHost]
Default value: undef
elastic_seed_hosts
Data type: Optional[Array[Stdlib::IP::Address]]
Default value: undef
elastic_master_only
Data type: Boolean
Default value: false
manage_java
Data type: Boolean
Default value: true
repo_sslverify
Data type: Optional[Integer[0,1]]
Default value: undef
cluster_network
Data type: Optional[Stdlib::IP::Address]
Default value: undef
enable_web
Data type: Boolean
Default value: true
http_server
Data type: Optional[Stdlib::Fqdn]
Default value: undef
http_secure
Data type: Boolean
Default value: false
http_ssl_cert
Data type: Optional[String]
Default value: undef
http_ssl_key
Data type: Optional[String]
Default value: undef
cluster_name
Data type: String
Default value: $grayloginstall::params::cluster_name
is_master
Data type: Boolean
Default value: false
grayloginstall::web
Setup Web service for GrayLog web interface
Examples
include grayloginstall::web
Parameters
The following parameters are available in the grayloginstall::web
class.
server_name
Data type: String
ssl
Data type: Boolean
Default value: false
ssl_cert
Data type: Optional[String]
Default value: undef
ssl_key
Data type: Optional[String]
Default value: undef
http_bind_ip
Data type: Stdlib::IP::Address
Default value: $grayloginstall::params::http_bind_ip
http_bind_port
Data type: Integer
Default value: $grayloginstall::params::http_bind_port
Defined types
grayloginstall::elastic_host
Elasticsearch resource to export into PuppetDB
Examples
grayloginstall::elastic_host { 'namevar': }
Parameters
The following parameters are available in the grayloginstall::elastic_host
defined type.
ip
Data type: Stdlib::IP::Address
cluster_name
Data type: String
hostname
Data type: Stdlib::Fqdn
Default value: $::facts['fqdn']
hosts_target
Data type: Stdlib::Unixpath
Default value: '/etc/graylog/elasticsearch.hosts'
grayloginstall::mongodb_host
MongoDB resource to export into PuppetDB
Examples
grayloginstall::mongodb_host { 'namevar': }
Parameters
The following parameters are available in the grayloginstall::mongodb_host
defined type.
ip
Data type: Stdlib::IP::Address
cluster_name
Data type: String
hostname
Data type: Stdlib::Fqdn
Default value: $::facts['fqdn']
hosts_target
Data type: Stdlib::Unixpath
Default value: '/etc/graylog/mongodb.hosts'
Functions
grayloginstall::configaddr
Type: Puppet Language
The grayloginstall::configaddr function.
grayloginstall::configaddr(Variant[String, Array[String]] $addr)
The grayloginstall::configaddr function.
Returns: Any
addr
Data type: Variant[String, Array[String]]
grayloginstall::discovery_hosts
Type: Ruby 4.x API
The grayloginstall::discovery_hosts function.
grayloginstall::discovery_hosts(String $lookup_type, Optional[Array] $equery)
The grayloginstall::discovery_hosts function.
Returns: Any
lookup_type
Data type: String
equery
Data type: Optional[Array]
grayloginstall::discovery_hosts(String $lookup_type, String $lookup_param, Optional[Array] $equery)
The grayloginstall::discovery_hosts function.
Returns: Any
lookup_type
Data type: String
lookup_param
Data type: String
equery
Data type: Optional[Array]
grayloginstall::mongo_password
Type: Ruby 4.x API
The grayloginstall::mongo_password function.
grayloginstall::mongo_password(String $pw)
The grayloginstall::mongo_password function.
Returns: Any
pw
Data type: String
grayloginstall::pup_selfaddr
Type: Puppet Language
The grayloginstall::pup_selfaddr function.
grayloginstall::pup_selfaddr(Stdlib::IP::Address $addr)
The grayloginstall::pup_selfaddr function.
Returns: Boolean
addr
Data type: Stdlib::IP::Address
grayloginstall::selfaddr
Type: Ruby 4.x API
The grayloginstall::selfaddr function.
grayloginstall::selfaddr(String $addr)
The grayloginstall::selfaddr function.
Returns: Boolean
addr
Data type: String
grayloginstall::selfsubnet
Type: Ruby 4.x API
The grayloginstall::selfsubnet function.
grayloginstall::selfsubnet(String $subnet)
The grayloginstall::selfsubnet function.
Returns: Any
subnet
Data type: String
Data types
Grayloginstall::MongoAddr
The Grayloginstall::MongoAddr data type.
Alias of Array[Variant[ Stdlib::IP::Address, Stdlib::Fqdn ]]
Grayloginstall::NetworkHost
https://nginx.org/en/docs/ngx_core_module.html#error_log
Alias of Variant[Stdlib::IP::Address, Enum['_local_'], Enum['_site_'], Enum['_global_'], Pattern[/_[a-z0-9]+_/], Pattern[/_[a-z0-9]+:ipv[46]_/]]
Dependencies
- puppetlabs/stdlib (>= 4.25.0 < 10.0.0)
- puppet/mongodb (>= 4.2.1 < 7.0.0)
- aursu/graylog (>= 2.0.1 < 3.0.0)