Skip to content

Commit 6d3b800

Browse files
committed
Merge pull request #39 from puppetlabs-operations/update_readme
Add a more modern version of our README template with updates.
2 parents 485cfb5 + bb69f27 commit 6d3b800

File tree

1 file changed

+145
-18
lines changed

1 file changed

+145
-18
lines changed

README.markdown

+145-18
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,44 @@
1-
### Overview
1+
#### Table of Contents
22

3-
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
622

723
This module does not configure firewall rules. Firewall rules will need to be
824
configured separately in order to allow for correct operation of Splunk and the
925
Splunk Universal Forwarder. Additionally, this module does not supply Splunk or
1026
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+
1233

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**
1442

1543
To begin using this module, use the Puppet Module Tool (PMT) from the command
1644
line to install this module:
@@ -20,11 +48,14 @@ line to install this module:
2048
This will place the module into your primary module path if you do not utilize
2149
the --target-dir directive.
2250

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+
2353
Once the module is in place, there is just a little setup needed.
2454

2555
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.
2859

2960
The expected directory structure is:
3061

@@ -41,19 +72,20 @@ A semi-populated example files directory might then contain:
4172
`-- files
4273
|-- splunk
4374
| `-- linux
44-
| |-- splunk-4.3.2-123586-linux-2.6-amd64.deb
45-
| |-- splunk-4.3.2-123586-linux-2.6-intel.deb
46-
| `-- splunk-4.3.2-123586-linux-2.6-x86_64.rpm
75+
| |-- splunk-6.3.3-f44afce176d0-linux-2.6-amd64.deb
76+
| |-- splunk-6.3.3-f44afce176d0-linux-2.6-intel.deb
77+
| `-- splunk-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm
4778
`-- universalforwarder
4879
|-- linux
49-
| |-- splunkforwarder-4.3.2-123586-linux-2.6-amd64.deb
50-
| |-- splunkforwarder-4.3.2-123586-linux-2.6-intel.deb
51-
| `-- splunkforwarder-4.3.2-123586-linux-2.6-x86_64.rpm
80+
| |-- splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb
81+
| |-- splunkforwarder-6.3.3-f44afce176d0-linux-2.6-intel.deb
82+
| `-- splunkforwarder-6.3.3-f44afce176d0-linux-2.6-x86_64.rpm
5283
|-- solaris
53-
| `-- splunkforwarder-4.3.2-123586-solaris-9-intel.pkg
84+
| `-- splunkforwarder-6.3.3-f44afce176d0-solaris-9-intel.pkg
5485
`-- windows
55-
|-- splunkforwarder-4.3.2-123586-x64-release.msi
56-
`-- splunkforwarder-4.3.2-123586-x86-release.msi
86+
|-- splunkforwarder-6.3.3-f44afce176d0-x64-release.msi
87+
`-- splunkforwarder-6.3.3-f44afce176d0-x86-release.msi
88+
5789

5890
Second, you will need to supply the `splunk::params` class with three critical
5991
pieces of information.
@@ -62,7 +94,102 @@ pieces of information.
6294
* The build of Splunk you are using
6395
* The root URL to use to retrieve the packages
6496

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
6698
root URL is puppet:///modules/splunk. See the splunk::params class
6799
documentation for more information.
68100

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:
122+
```puppet
123+
@splunkforwarder_input { 'puppetserver-sourcetype':
124+
section => 'monitor:///var/log/puppetlabs/puppetserver/puppetserver.log',
125+
setting => 'sourcetype',
126+
value => 'puppetserver',
127+
tag => 'splunk_forwarder'
128+
}
129+
```
130+
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.
188+
189+
## Development
190+
191+
TBD
192+
193+
## Release Notes/Contributors/Etc **Optional**
194+
195+
TBD

0 commit comments

Comments
 (0)