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

create_hec_token is not triggered if "splunk_hec_token" does not already exist #815

Open
jackskj opened this issue Apr 16, 2024 · 1 comment
Assignees

Comments

@jackskj
Copy link

jackskj commented Apr 16, 2024

Background:
i was updating splunk HEC (splunk docker image) from 9.1.1 to 9.2.1.
in 9.1.1, SPLUNK_HEC_TOKEN envar is set and ansible is using it to create splunk_hec_token in create_hec_token step.

what was expected:
when updating to splunk 9.2.1, SPLUNK_HEC_TOKEN envar in create_hec_token is used to create the token just like in 9.1.1

what actually happened:
in 9.2.1, create_hec_token is never triggered.

Reason:
i have noticed that "Get existing HEC token" step fetches "splunk_hec_token". However, this process fails as this token does not exist.
in 9.1.1, create_hec_token was triggered anyway, however, in this commit , a hec_token is defined and hec_token.status == 200 statement is added which prevents splunk_hec_token from being created, which to me is a "catch 22"

to fix this issue, i am adding "http://splunk_hec_token" via custom configs

splunk:
  conf:
    - key: inputs
      value:
        directory: /opt/splunk/etc/system/local
        content:
          "http://splunk_hec_token":
             token: dummytoken

with this added, "Get existing HEC token" successes, create_hec_token is triggered, and "dummytoken" is updated with correct token

@jackskj jackskj changed the title create_hec_token is not triggered is not added if "splunk_hec_token" does not already exist create_hec_token is not triggered if "splunk_hec_token" does not already exist Apr 16, 2024
@jmeixensperger jmeixensperger self-assigned this Apr 19, 2024
@aukevanleeuwen
Copy link

For our use case it would be reasonably difficult to get custom configuration going (over what we have now, just running it with environment variables). So if this could get fixed, that would be awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants