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

Splunk Message creation using in Splunk Cloud failes #574

Closed
seiimonn opened this issue May 1, 2024 · 1 comment
Closed

Splunk Message creation using in Splunk Cloud failes #574

seiimonn opened this issue May 1, 2024 · 1 comment

Comments

@seiimonn
Copy link

seiimonn commented May 1, 2024

Describe the bug
Creating messages in Splunk Cloud throws a key error. Tested with 9.1.2312.102.
The message is created nevertheless. With Enterprise everything works as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Message using the SDK and the create method.
service.messages.create(
            name=name,
            value=value,
            severity=severity,
            role=existing_roles,
        )

Expected behavior
The created message should be returned.

Logs or Screenshots

Traceback (most recent call last):
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/client.py", line 1376, in __getitem__
    response = self.get(key)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/client.py", line 1804, in get
    return super(Collection, self).get(name, owner, app, sharing, **query)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/client.py", line 864, in get
    **query)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/binding.py", line 292, in wrapper
    return request_fun(self, *args, **kwargs)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/binding.py", line 73, in new_f
    val = f(*args, **kwargs)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/binding.py", line 699, in get
    response = self.http.get(path, all_headers, **query)
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/binding.py", line 1232, in get
    return self.request(url, { 'method': "GET", 'headers': headers })
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/binding.py", line 1304, in request
    raise HTTPError(response)
splunklib.binding.HTTPError: HTTP 404 Not Found -- Could not find object id=redacted

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/splunk/etc/apps/-/bin/redacted.py", line 113, in stream_events
    severity="error",
  File "/opt/splunk/etc/apps/-/bin/../lib/redacted.py", line 202, in send_message
    role=existing_roles,
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/client.py", line 1705, in create
    return self[name]
  File "/opt/splunk/etc/apps/-/bin/../lib/splunklib/client.py", line 1386, in __getitem__
    raise KeyError(key)
KeyError: UrlEncoded('redacted')

Splunk (please complete the following information):

  • Cloud 9.1.2312.102 / Victoria

SDK (please complete the following information):

  • 1.7.3

Additional context
Add any other context about the problem here.

@seiimonn
Copy link
Author

seiimonn commented May 2, 2024

Identified issue with help of support, works as expected.

@seiimonn seiimonn closed this as completed May 2, 2024
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

1 participant