!Work In progress!
Python code that can be run standalone, as a lambda, or Splunk App to collect and forward metrics. Currently CLI is being developed.
./splunk_metrics.py
index.size.bytes 1704182400 649 index=main host=localhost
index.size.bytes 1704182400 18750994 index=test host=localhost
Local development was done leveraging the Splunk Docker Image.
docker run -d -p 8089:8089 -p 8000:8000 -e "SPLUNK_START_ARGS=--accept-license" -e "SPLUNK_PASSWORD=password" --name splunk splunk/splunk:latest
python3 -m venv env
source env/bin/activate
pip3 install splunk-sdk
# Install Splunk Python SDKpip3 install pytest
# Install pytest for testspip3 install wavefront-sdk-python
# Install Wavefront Python SDK. Does not install/compile
Previously known as Wavefront, https://tanzu.vmware.com/observability-trial This requiers signing up for a VMWare Cloud account and a free 30 day trial.