splunkhecwriter
Library for sending log events to Splunk
Example Code block 1
from splunkhecwriter import SplunkHECWriter
hec_token = '<HEC-TOKEN-HERE>'
splunk_server = '127.0.0.1'
hec_writer = SplunkHECWriter(splunk_host=splunk_server, splunk_hec_token=hec_token)
msg = { 'foo': 'bar' }
hec_writer.send_msg(msg=msg)
Example Code block 2
from splunkhecwriter import SplunkHECWriter
hec_token = '<HEC-TOKEN-HERE>'
splunk_server = '127.0.0.1'
hec_writer = SplunkHECWriter(splunk_host=splunk_server, splunk_hec_token=hec_token)
msgs = []
msgs.append({ 'foo': 'bar' })
msgs.append({ 'bar': 'foo'})
hec_writer.send_msgs(msgs=msgs)
Example Code block 3
from splunkhecwriter import SplunkHECWriter
hec_token = '<HEC-TOKEN-HERE>'
splunk_server = '127.0.0.1'
sourcetype= 'foobar:json'
source = 'hec'
host = 'foobar'
hec_writer = SplunkHECWriter(
splunk_host=splunk_server,
splunk_hec_token=hec_token,
sourcetype=sourcetype,
source=source,
host=host)
msg = { 'foo': 'bar' }
hec_writer.send_msg(msg=msg)
License
This project is licensed under the Apache License - see the LICENSE.md file for details
Disclaimer
This custom component is neither affiliated with nor endorsed by Splunk.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
splunkhecwriter-0.4.tar.gz
(3.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file splunkhecwriter-0.4.tar.gz.
File metadata
- Download URL: splunkhecwriter-0.4.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14ae17db493f085924ba92c604cc8a4cb996374c8e731675a7cca0c0ad0f76d6
|
|
| MD5 |
fce01109e03727f6dd62d04fc1e6b0d9
|
|
| BLAKE2b-256 |
fc07df5159a135d5f4c0ede3193fa3cff90bcfbe1641541457858cba86cd0189
|
File details
Details for the file splunkhecwriter-0.4-py3-none-any.whl.
File metadata
- Download URL: splunkhecwriter-0.4-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40abd7efc23c40e96e89eab4f12971b10c3940b0d3ab00546b448ad3d89917c2
|
|
| MD5 |
54bea461ca7defd179be46d2277ca6a1
|
|
| BLAKE2b-256 |
6438d151c2936bc7d558bbcdfc7456d0ffe3c4a735eeaefac421e86e0e4610ba
|