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

Fix config file location for splunkforwarder_deploymentclient, deployment client, and alert_actions. #144

Merged
merged 2 commits into from
Sep 26, 2017

Conversation

treydock
Copy link
Contributor

This should fix new types/providers to work with this commit: 54ece81

@TraGicCode
Copy link
Contributor

Hey @treydock . Is the impact of this currently just now allowing the new types from working correctly?

@treydock
Copy link
Contributor Author

Without this changes the new types will write their configs to the wrong place. I only ran in noop mode before downgrading to my fork, but looked like all the new types thought they had to be applied when they already existed. So the new types are essentially broken without this change.

@bastelfreak
Copy link
Member

Can we add any type of unit/acceptance test for this?

@TraGicCode
Copy link
Contributor

TraGicCode commented Sep 26, 2017

@bastelfreak I added the unit tests for the types. I tested locally they do indeed fail then made my changes to verify the bug is fixed. Before merging this i want to ask @treydock if when i rebased his changes if i did one thing correctly. It looks like the splunkforwarder_deploymentclient and deploymentclient types are identical to each other. Is a mistake or intentional? I'm sure there is a reason i just want to understand :).

@treydock
Copy link
Contributor Author

@TraGicCode The duplication was intentional. The reason is to be able to have one go to a Splunk server and one go to a forwarder, which is dictated by the tag. The other reason is that the filesystem path for the forwarder's config is different. The file_path for the forwarder types differs from non-forwarder types.

class profile::splunk::deployment_client inherits profile::params {

  $deployment_servers = query_nodes("Class[Profile::Splunk::Deployment_server] and puppet_environment=${::puppet_environment}", 'fqdn')
  $deployment_server  = $deployment_servers[0]

  $deploymentclient_configs = {
    'deployment-client/disabled' => 'false',
    'target-broker:deploymentServer/targetUri' => "${deployment_server}:8089",
  }

  $deploymentclient_configs.each |$name, $value| {
    @splunkforwarder_deploymentclient { $name: value => $value, tag => 'splunk_forwarder' }
    @splunk_deploymentclient { $name: value => $value, tag => 'splunk_server' }
  }

}

@TraGicCode
Copy link
Contributor

TraGicCode commented Sep 26, 2017

Thanks for clearing this up! @bastelfreak you can finish up your review from my added unit tests.

@bastelfreak
Copy link
Member

thanks for the contribution!

@bastelfreak bastelfreak merged commit 9ef52d9 into voxpupuli:master Sep 26, 2017
@TraGicCode TraGicCode changed the title Fix file_name for several providers Fix config file location for splunkforwarder_deploymentclient, deployment client, and alert_actions. Sep 26, 2017
@TraGicCode TraGicCode added the bug Something isn't working label Sep 26, 2017
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

Successfully merging this pull request may close these issues.

3 participants