Ask Your Question
0

Trouble understanding how to use example42/splunk

asked 2014-11-26 13:53:41 -0500

Red Cricket gravatar image

updated 2014-11-26 16:58:11 -0500

Hi,

I want to use https://forge.puppetlabs.com/example4... to setup splunk on some of my systems. So on my puppet master I did the # puppet module install example42-splunk. I use the PE console so I added the class splunk and associated splunk with a group that has one of my nodes, my-mongo-1. I logon to my-mongo-1 and execute ...

    [root@my-mongo-1 ~]# puppet agent -t
    ...
    Info: Caching catalog for my-mongo-1
    Info: Applying configuration version '1417030622'
    Notice: /Stage[main]/Splunk/Package[splunk]/ensure: created
    Notice: /Stage[main]/Splunk/Exec[splunk_create_service]/returns: executed successfully
    Notice: /Stage[main]/Splunk/File[splunk_change_admin_password]/ensure: created
    Info: /Stage[main]/Splunk/File[splunk_change_admin_password]: Scheduling refresh of Exec[splunk_change_admin_password]
    Notice: /Stage[main]/Splunk/Service[splunk]/ensure: ensure changed 'stopped' to 'running'
    Info: /Stage[main]/Splunk/Service[splunk]: Unscheduling refresh on Service[splunk]
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns: Could not look up HOME variable.  Auth tokens cannot be cached.
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns:
    Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns:  In handler 'users': The password cannot be set to the default password.
    Error: /Stage[main]/Splunk/Exec[splunk_change_admin_password]: Failed to call refresh: /opt/splunkforwarder/bin/puppet_change_admin_password returned 22 instead of one of [0]
    Error: /Stage[main]/Splunk/Exec[splunk_change_admin_password]: /opt/splunkforwarder/bin/puppet_change_admin_password returned 22 instead of one of [0]
    Notice: Finished catalog run in 11.03 seconds

... so what am I doing wrong here? Why do I get the Could not look up HOME variable. Auth tokens cannot be cached. error?

Update:

Thanks Jon for the info. I tried to update like so ...

# puppet module upgrade example42-splunk

... that didn't seem to work :/

Notice: Preparing to upgrade 'example42-splunk' ...
Notice: Found 'example42-splunk' (v2.0.9) in /etc/puppetlabs/puppet/modules ...
Notice: Downloading from https://forgeapi.puppetlabs.com ...
Notice: Found at least one version of puppetlabs-stdlib compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Notice: Found at least one version of puppetlabs-concat compatible with PE (3.2.3);
Notice: Skipping versions which don't express PE compatibility. To install
the most recent version of the module regardless of compatibility
with PE, use the '--ignore-requirements' flag.
Error: Could not upgrade module 'example42-splunk' (v2.0.9 -> latest)
  There are 2 newer versions
    No combination of dependency upgrades would satisfy all dependencies
    Dependencies will not be automatically upgraded across major versions
    Upgrading one or more of these modules may permit the upgrade to succeed:
    - puppetlabs-stdlib
    - example42-puppi
    - puppetlabs-concat
    Use `puppet module upgrade --force` to upgrade only this module
edit retag flag offensive close merge delete

Comments

You can try some of the suggestions in the output if you're happy to try and sort out the dependencies manually. The upgrade should only be necessary to fix the warning about HOME though. You should hopefully be able to fix the failed admin password change problem with the current version.

jonn gravatar imagejonn ( 2014-11-27 01:43:41 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-11-26 14:43:15 -0500

jonn gravatar image
Notice: /Stage[main]/Splunk/Exec[splunk_change_admin_password]/returns:  In handler 'users': The password cannot be set to the default password.

It looks like the module uses a default admin password of 'changeme', and Splunk would like you to change it to something different (I think that 'changeme' is the default admin password for Splunk). Do you have any more luck if you set a different one by providing the admin_password parameter to the spunk class?

The error about auth tokens looks like it should be fixed in the latest version of example42-puppet:

https://github.com/example42/puppet-splunk/blob/v2.0.12/templates/changeadminpassword.erb

If you're not running v2.0.12 of the module, then could you try upgrading and see if that helps?

edit flag offensive delete link more

Comments

Using 2.0.12 solved my problem. thanks

Red Cricket gravatar imageRed Cricket ( 2014-11-29 14:50:37 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-11-26 13:53:41 -0500

Seen: 371 times

Last updated: Nov 26 '14