Comments (10)
I presume this only happens when you declare both classes
from puppet-splunk.
This seems to be the same issue raised in #48 - FYI
from puppet-splunk.
I don't think this is related to #48
indeed, this issue only happens if I declare both classes. This is due to this part of the code in forwarder.pp:
case $::kernel {
'Linux': {
class { '::splunk::platform::posix':
splunkd_port => $splunkd_port,
splunk_user => $splunk_user,
}
}
A workaround might be to use ensure_resource or ensure_resources from https://github.com/puppetlabs/puppetlabs-stdlib
The real fix should be to define 2 different ports in the param class: one for the forwarder and an other for the splunk server and to use an include instead of a class call (see init.pp for instance).
Happy to create a PR if everybody agrees on that.
from puppet-splunk.
Btw, I've been able to make it works on my setup using this dirty workaround:
Class['::splunk::forwarder'] -> Class['::splunk']
The class ::splunk::platform::posix in forwarder.pp is then called before the include of the same class in init.pp, but this is definitely not a proper fix
from puppet-splunk.
I don't think ensure_resource works on classes (clarification?)
I've been looking at a longer term fix to considerably rewrite a lot of that structure, including getting rid of the swathe of virtual resources, tagging, collectors...etc, it's overkill. But that won't be a quick fix - if you want to submit a PR in the mean time if you can solve the issue without too much engineering then we can release that as a patch release until a more permanent rewrite of those classes.
from puppet-splunk.
ensure_resource
does not work with classes. Declaring classes is much different from resources, despite the unified syntax.
Also please note that replacing a class { <name>: ... }
declaration with include <name>
is not a safe way of resolving multiple declaration issues, except if we can make sure that only the include
syntax is being used.
The basic problem is that there is no good way to pass class parameters from multiple places in the manifest. I have not looked at the module's structure in detail, but generally, a safe workaround is to eliminate public classes outside the main class from init.pp
, and provide parameters to allow including (only) the desired other classes from the main.
from puppet-splunk.
There was another issue related to the 'splunk enable boot-start' command line so I've asked a question on the splunk forum about that. From the answer, it's not recommended to use both splunk-forwarder and splunk-server on the same server (as apparently splunk-server can provide the splunk-forwarder capabilities)
See https://answers.splunk.com/answers/469814/how-can-i-enable-both-splunk-server-and-splunk-uni.html
Might be better to generate an error message if someone tries to use both class on the same node (instead of the warning about different ports) and also update the doc about this possibility.
Thoughts about that?
from puppet-splunk.
Hi, sorry for the delay.
Well, "not recommended" is one thing, but outright forbidding it in the module feels a bit harsh. Some users will know what they're doing and that will cause problems for them.
I still believe that refactoring the module interface is the way to go forward, if possible.
from puppet-splunk.
Hi,
No pb. When I first tried to install Splunk, I didnt know splunk server can act as a forwarder too and that mislead me. I wanted to install both the splunk-forwarder and the splunk-server.
Now my setup is using only splunk-server on the master and splunk-agent on all the slave and that works perfectly.
There is a lot of issues if you try to install both of them on the same server (partially due to this module but mainly because splunk has not been build to be configured this way).
I think an error message or at least a warning might lead the user in the good direction.
If you think of a particular case when both of them are required, we shoud avoid the warning but I cannot think of any real case on my side.
Regards,
Vincent
from puppet-splunk.
Oh that's good info. I'm thinking we could
- fail the manifest if the classes are combined
- make the error message indicate an override parameter
- explain in the docs of that parameter what you said above
from puppet-splunk.
Related Issues (20)
- Solaris installs point to an old package, and have a dependency on net-tools
- Hard coded dependency net-tools
- /opt/splunk/etc/passwd wrong permissions
- Facter splunk version HOT 2
- pass4SymmKey not read properly HOT 1
- puppet will create outputs.conf and delete it immediately which causes splunk to restart every puppet run
- child class splunk::forwarder::password::seed has a typo in the fact HOT 1
- net-tools 'installed' over and over, but is really installing splunkforwarder HOT 4
- Forwarder service won't start due to incorrect permissions HOT 2
- Corrupt MSI installer HOT 3
- Unable to disable archive creation in splunk::forwarder.
- default location of splunk.secret is wrong? HOT 2
- seed_password seems to ignore the enforced order, causing installation to fail. HOT 1
- Can you promote a new version to puppet forge? HOT 2
- splunk::enterprise - "has no parameter" manage_net_tools HOT 2
- Support for Splunk 8.x and RHEL 8 HOT 2
- Warning: Secrets file NOT found HOT 1
- `purge_inputs => true` leaves artifacts in `inputs.conf` HOT 3
- SPLUNK_OS_USER is being sets a splunk regardless of $splunk_user value HOT 1
- Splunk 9.0.5+ Package Not Found on RedHat x86_64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-splunk.