You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This module provides a method to deploy Splunk Server or Splunk Universal
4
-
Forwarder with common configurations and ensure the services maintain a running
5
-
state.
3
+
1.[Overview](#overview)
4
+
2.[Module Description - What the module does and why it is useful](#module-description)
5
+
3.[Setup - The basics of getting started with splunk](#setup)
6
+
*[What splunk affects](#what-splunk-affects)
7
+
*[Setup requirements](#setup-requirements)
8
+
*[Beginning with splunk](#beginning-with-splunk)
9
+
4.[Usage - Configuration options and additional functionality](#usage)
10
+
5.[Reference - An under-the-hood peek at what the module is doing and how](#reference)
11
+
5.[Limitations - OS compatibility, etc.](#limitations)
12
+
6.[Development - Guide for contributing to the module](#development)
13
+
14
+
## Overview
15
+
16
+
This module provides a method to deploy Splunk Server or Splunk Universal Forwarder
17
+
with common configurations and ensure the services maintain a running
18
+
state. It provides types/providers to interact with the various Splunk/Forwarder
19
+
configuration files.
20
+
21
+
## Module Description
6
22
7
23
This module does not configure firewall rules. Firewall rules will need to be
8
24
configured separately in order to allow for correct operation of Splunk and the
9
25
Splunk Universal Forwarder. Additionally, this module does not supply Splunk or
10
26
Splunk Universal Forwarder installation media. Installation media will need to
11
-
be aquired seperately, and the module configured to use it.
27
+
be aquired seperately, and the module configured to use it. Users can use yum
28
+
or apt to install these components if they're self-hosted.
29
+
30
+
31
+
If applicable, this section should have a brief description of the technology the module integrates with and what that integration enables. This section should answer the questions: "What does this module *do*?" and "Why would I use it?"
32
+
12
33
13
-
### Installation & Setup
34
+
## Setup
35
+
36
+
### What splunk affects
37
+
38
+
* Installs the Splunk/Forwarder package and manages their config files. It does not purge them by default.
39
+
* The module will set up both Splunk and Splunkforwarder to run as the 'root' user on POSIX platforms.
40
+
41
+
### Setup Requirements **OPTIONAL**
14
42
15
43
To begin using this module, use the Puppet Module Tool (PMT) from the command
16
44
line to install this module:
@@ -20,11 +48,14 @@ line to install this module:
20
48
This will place the module into your primary module path if you do not utilize
21
49
the --target-dir directive.
22
50
51
+
You can also use r10k or code-manager to deploy the module so ensure that you have the correct entry in your Puppetfile.
52
+
23
53
Once the module is in place, there is just a little setup needed.
24
54
25
55
First, you will need to place your downloaded splunk installers into the files
26
-
directory, `<module_path>/splunk/files/`. The files must be placed according to
27
-
directory structure example given below.
56
+
directory, `<module_path>/splunk/files/`. If you're using r10k or code-manager you'll need to override the `splunk::params::src_root` parameter to point at a modulepath outside of the Splunk module because each deploy will overwrite the files.
57
+
58
+
The files must be placed according to directory structure example given below.
28
59
29
60
The expected directory structure is:
30
61
@@ -41,19 +72,20 @@ A semi-populated example files directory might then contain:
Second, you will need to supply the `splunk::params` class with three critical
59
91
pieces of information.
@@ -62,7 +94,102 @@ pieces of information.
62
94
* The build of Splunk you are using
63
95
* The root URL to use to retrieve the packages
64
96
65
-
In the example given above, the version is 4.3.2, the build is 123586, and the
97
+
In the example given above, the version is 6.3.3, the build is f44afce176d0, and the
66
98
root URL is puppet:///modules/splunk. See the splunk::params class
67
99
documentation for more information.
68
100
101
+
### Beginning with splunk
102
+
103
+
Once the Splunk packages are hosted in the users repository or hosted by the Puppet Server in the modulepath the module is ready to deploy.
104
+
105
+
## Usage
106
+
107
+
If a user is installing Splunk with packages provided from their modulepath, this is the most basic way of installing Splunk Server with default settings:
108
+
```puppet
109
+
include ::splunk
110
+
```
111
+
This is the most basic way of installing the Splunk Universal Forwarder with default settings:
112
+
```puppet
113
+
class { '::splunk::params':
114
+
server => $my_splunk_server,
115
+
}
116
+
117
+
include ::splunk::forwarder
118
+
```
119
+
Once both Splunk and Splunk Universal Forwarder have been deployed on their respective nodes, the Forwarder is ready to start sending logs.
120
+
121
+
In order to start sending some log data, users can take advantage of the `Splunkforwarder_input` type. Here is a basic example of adding an input to start sending Puppet Server logs:
This virtual resource will get collected by the `::splunk::forwarder` class if it is tagged with `splunk_forwarder` and will add the appropriate setting to the inputs.conf file and refresh the service.
131
+
132
+
## Reference
133
+
134
+
###::splunk::params Parameters
135
+
136
+
####`version`
137
+
####`build`
138
+
####`src_root`
139
+
####`splunkd_port`
140
+
####`logging_port`
141
+
####`server`
142
+
143
+
###::splunk Parameters
144
+
145
+
####`package_source`
146
+
####`package_name`
147
+
####`package_ensure`
148
+
####`logging_port`
149
+
####`splunk_user`
150
+
####`splunkd_port`
151
+
####`web_port`
152
+
####`purge_inputs`
153
+
####`purge_outputs`
154
+
####`purge_outputs`
155
+
####`purge_authentication`
156
+
####`purge_authorize`
157
+
####`purge_distsearch`
158
+
####`purge_indexes`
159
+
####`purge_limits`
160
+
####`purge_props`
161
+
####`purge_server`
162
+
####`purge_transforms`
163
+
####`purge_web`
164
+
165
+
###::splunk::forwarder Parameters
166
+
167
+
####`server`
168
+
####`package_source`
169
+
####`package_name`
170
+
####`package_ensure`
171
+
####`logging_port`
172
+
####`splunkd_port`
173
+
####`install_options`
174
+
####`splunk_user`
175
+
####`splunkd_listen`
176
+
####`purge_inputs`
177
+
####`purge_outputs`
178
+
####`pkg_provider`
179
+
####`forwarder_confdir`
180
+
####`forwarder_input`
181
+
####`forwarder_output`
182
+
####`create_password`
183
+
184
+
## Limitations
185
+
186
+
- Currently tested manually on Centos 7, but we will eventually add automated testing and are targeting compatibility with other platforms.
187
+
- Tested with Puppet 4.x but should work with older versions. This will get updated soon.
0 commit comments