Open dafydd2277 opened 6 years ago
while investigating a similar desire, I found that if you set
splunk::forwarder::forwarder_ouput
to an empty hash via hiera or class parameter, that outputs.conf does not get the default config based on splunk::params::server.
at which point you can use splunkforwarder_deploymentclient or splunkforwarder_ouput manually however you'd like.
hope it helps.
The Puppet code I'm working on and the desktop I'm writing this from are air-gapped. Please forgive any typos.
Affected Puppet, Ruby, OS and module versions/distributions
How to reproduce (e.g Puppet code you use)
First, note specifically that I'm not using the optional
server
parameter in my class resource.and I'm using
splunkforwarder_deploymentclient
:What are you seeing
I am not specifically configuring
output.conf
in any way, because I expect the Splunk deployment server to do that. However, this module insists on setting the following inoutput.conf
:It will ignore any other
[tcpout:*]
blocks, but it insists on maintaining[tcpout:splunk_9997]
and it overridesdefaultGroup
if any other value is given. So, if the Splunk deployment server (which I do not control) has identified a specific output destination, out of several, for a particular Splunk agent to forward its logs to, that destination will be overridden bypuppet/Splunk
.What behaviour did you expect instead
If the Type
splunk*_deploymentconf
is invoked, do not manipulate the content of any other file in${splunk_base}/etc/system/local/
, unless a resource entry is specifically made. Instead, assume the Splunk deployment server managing their content. Managing ownership and permissions should be fine, but managing content should be disabled in the absence of definedsplunk*_<file>
resource entries.One possible solution would be to add a parameter to
splunk::params
that specifies whether theserver
parameter in that class should be set inoutput.conf
ordeploymentclient.conf
. And, if the latter, stop managing the content of all other settings files.