Puppet Labs' Splunk module not purging ini_setting resources?

132 views
Skip to first unread message

Paul Krizak

unread,
Oct 27, 2014, 6:59:52 PM10/27/14
to puppet...@googlegroups.com
Hi, all.

I'm having a hell of a time trying to figure out why the Puppet Labs' Splunk module (https://forge.puppetlabs.com/puppetlabs/splunk) seemingly refuses to work with the ini_setting purge functionality.

Inside the module, it's got some code to purge content from the two managed INI files (inputs.conf and outputs.conf):

  # If the purge parameters have been set, remove all unmanaged entries from
  # the inputs.conf and outputs.conf files, respectively.
  if $purge_inputs  {
    resources { 'splunkforwarder_input':  purge => true; }
  }
  if $purge_outputs {
    resources { 'splunkforwarder_output': purge => true; }
  }

I have both $purge_inputs and $purge_outputs set to true.

When any of the splunkforwarder_output or splunkforwarder_input resouces change, the updated content gets written into the appropriate file, but the previous values stick around, which is bad:

# cat outputs.conf 

[default]
defaultGroup=splunk_9997

[tcpout:splunk_9997]
server=splunk:9997

[tcpout:splunk_9999]
server=splunk:9999

[tcpout:_]
server=:

Has anybody else experienced this?  It's behaving as if the purge isn't even active.  But I've verified that my inifile module is up to date and does indeed support purging.  I've also verified that the splunkforwarder_output and splunkforwarder_input providers implement the self.file_path method, which is a prerequisite to purging working.

I'm not even quite sure where to start troubleshooting this, as everything appears to be by-the-book correct -- it's just that the purging bits are being (apparently) ignored.

Felix Frank

unread,
Nov 8, 2014, 6:53:56 PM11/8/14
to puppet...@googlegroups.com
On 10/27/2014 11:59 PM, Paul Krizak wrote:
Has anybody else experienced this?  It's behaving as if the purge isn't even active.  But I've verified that my inifile module is up to date and does indeed support purging.  I've also verified that the splunkforwarder_output and splunkforwarder_input providers implement the self.file_path method, which is a prerequisite to purging working.

Hmm, indeed.

Have you tried enabling debug output? Any clues in there?

Josh Clausen

unread,
Jan 9, 2015, 4:01:29 PM1/9/15
to puppet...@googlegroups.com
I'm seeing the same problem.  "$purge_inputs = true" does not purge anything in the inputs.conf file.
Reply all
Reply to author
Forward
0 new messages