Skip to content

Commit d96215f

Browse files
author
Aman Shah
committed
Merge pull request 'Added the support to add splunk add-ons' (#1544) from splunk_addon into master
Reviewed-on: https://gitea.obmondo.com/EnableIT/LinuxAid/pulls/1544
2 parents d85b0ef + 7b3a3f9 commit d96215f

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

modules/enableit/common/manifests/monitor/splunk/forwarder.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222
#
2323
# @param noop_value No-operation mode value. Defaults to undef.
2424
#
25+
# @param addons A hash of Splunk add-ons/apps to install via splunk::addon. Keys are add-on
26+
# names (e.g. 'Splunk_TA_nix') and values are hashes of splunk::addon parameters.
27+
# Defaults to an empty hash.
28+
#
2529
# @groups settings enable, noop_value
2630
#
2731
# @groups authentication password_hash, seed_password
@@ -32,6 +36,8 @@
3236
#
3337
# @groups logging log_keep_count, log_max_file_size_b
3438
#
39+
# @groups addons addons
40+
#
3541
class common::monitor::splunk::forwarder (
3642
String[1] $password_hash,
3743
Eit_types::Version $version = '7.2.4',
@@ -44,6 +50,7 @@
4450
Boolean $enable = false,
4551
Boolean $manage = false,
4652
Eit_types::Noop_Value $noop_value = undef,
53+
Hash[String[1], Hash] $addons = {},
4754
) {
4855

4956

124 KB
Binary file not shown.
701 Bytes
Binary file not shown.
7.45 KB
Binary file not shown.

modules/enableit/profile/manifests/collector/splunk/forwarder.pp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Optional[Hash] $forwarder_output = $common::monitor::splunk::forwarder::forwarder_output,
1111
Integer $log_keep_count = $common::monitor::splunk::forwarder::log_keep_count,
1212
Eit_types::Bytes $log_max_file_size_b = $common::monitor::splunk::forwarder::log_max_file_size_b,
13+
Hash[String[1], Hash] $addons = $common::monitor::splunk::forwarder::addons,
1314
) {
1415

1516
user { 'splunkfwd' :
@@ -80,6 +81,12 @@
8081
notify => Service[$splunk::params::forwarder_service],
8182
}
8283
}
84+
85+
$addons.each |$addon_name, $addon_params| {
86+
splunk::addon { $addon_name:
87+
* => $addon_params,
88+
}
89+
}
8390
} else {
8491

8592
if $facts['init_system'] == 'systemd' {

0 commit comments

Comments
 (0)