Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Purging of inputs and outputs don't work on forwarder #157

Closed
TraGicCode opened this issue Oct 20, 2017 · 5 comments
Closed

Purging of inputs and outputs don't work on forwarder #157

TraGicCode opened this issue Oct 20, 2017 · 5 comments
Labels
bug Something isn't working

Comments

@TraGicCode
Copy link
Contributor

Setting purge_inputs and purge_outputs to true is not actually purging unmanaged settings in those files. I have reproduced this on our forwarder on windows. We still need to investigate if this is O/S specific and also what all purging is actually broken and fix it.

@TraGicCode TraGicCode added the bug Something isn't working label Oct 20, 2017
@vandelin586
Copy link

I'm trying to purge outputs.conf on linux and it is not working. Perhaps my understanding is incorrect but i would like my /etc/system/local/outputs.conf to be blank as this is controlled from our splunk admin server and the having two settings is causing the service to continuously restart

@chiriaev
Copy link

Guys, Hi. I am observing the same with "purge_inputs". Found some old traces on the subject @ https://tickets.puppetlabs.com/browse/MODULES-3520. Has this been progressed and fixed since?

Thanks in advance.

Regards, Andrei

@TraGicCode
Copy link
Contributor Author

@chiriaev Thanks for finding that ticket.

@dzeleski
Copy link

dzeleski commented Apr 5, 2018

@vandelin586 this is old but in case you needed a work around you can do this:

  $hash = {
    'nothing' => {
      section => '',
      setting => '#PuppetManaged',
      value   => 'nothing',
      tag     => 'splunk_forwarder',
    }
  }

  class { '::splunk::forwarder':
    package_ensure   => '7.0.0',
    package_source   => 'http://<REMOVED>/artifactory/splunk/splunkforwarder-7.0.0.rpm',
    purge_outputs    => true,
    purge_inputs     => true,
    forwarder_output => $hash,
    forwarder_input  => $hash,
  }

Once thats added you will need to manually purge the files since purge does not currently work:
rm -f /opt/splunkforwarder/etc/system/local/outputs.conf; rm -f /opt/splunkforwarder/etc/system/local/inputs.conf

Run puppet, and the end result looks like this:

[root@<REMOVED>]# cat /opt/splunkforwarder/etc/system/local/outputs.conf
#PuppetManaged=nothing
[root@<REMOVED>]# cat /opt/splunkforwarder/etc/system/local/inputs.conf
#PuppetManaged=nothing
[root@<REMOVED>]#

@alexjfisher
Copy link
Member

Caused by #87

alexjfisher added a commit to alexjfisher/puppet-splunk that referenced this issue Apr 6, 2019
alexjfisher added a commit to alexjfisher/puppet-splunk that referenced this issue Apr 9, 2019
alexjfisher added a commit to alexjfisher/puppet-splunk that referenced this issue Apr 9, 2019
alexjfisher added a commit to alexjfisher/puppet-splunk that referenced this issue Apr 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants