我对Splunk和Python还很陌生。
我正在使用Splunklib.client连接Splunk API。我的代码如下:
import splunklib.client as client
import splunklib.results as result
HOST = 'Localhost'
PORT = '8000
USERNAME = "username"
PASSWORD = "password"
service = client.connect(
host=HOST,
port=PORT,
use