1.) Python for Scientific Computing App
2.) Splunk ML Toolkit >=1.0
import splunk.Intersplunk | |
import exec_anaconda | |
try: | |
exec_anaconda.exec_anaconda() | |
except Exception as e: | |
import cexc | |
cexc.abort(e) | |
sys.exit(1) | |
import sys |
import exec_anaconda | |
try: | |
exec_anaconda.exec_anaconda() | |
except Exception as e: | |
import cexc | |
cexc.abort(e) | |
sys.exit(1) | |
# Import this to get our "chunked" handler | |
from cexc import BaseChunkHandler |
demo@ip-10-0-0-200:/opt/splunk/bin$ ./splunk btool inputs list http --debug | |
/opt/splunk/etc/apps/splunk_httpinput/local/inputs.conf [http] | |
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf dedicatedIoThreads = 2 | |
/opt/splunk/etc/apps/splunk_httpinput/local/inputs.conf disabled = 0 | |
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf enableSSL = 1 | |
host = splunk00 | |
index = default | |
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf maxSockets = 0 | |
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf maxThreads = 0 | |
/opt/splunk/etc/apps/splunk_httpinput/default/inputs.conf port = 8088 |
#!/usr/bin/env python | |
import sys | |
from sklearn.feature_extraction.text import CountVectorizer | |
from sklearn.decomposition import LatentDirichletAllocation | |
import pandas as pd | |
import numpy as np |
This approach is taken directly from Chen, Sain, Guo (2012), and the data provided on the UCI Machine Learning Repository.
United Kingdom
, positive Quantity
, positive UnitPrice
, and a valid CustomerID
| search Country="United Kingdom" Quantity>0 UnitPrice>0 CustomerID=*
monetary
field by multiplying Quantity
and UnitPrice