Hey there! Even though the Python SDK does not support listing indexes for datatype=all by default you can pass any keyword argument that you want which will then be used to form the request. For your case passing `datatype='all'` to the list method for the indexes collection appears to do the trick, I just tested this on my machine and metrics indexes are being returned along with logs:
from splunklib.client import connect
service = connect(
host='localhost',
port=8089,
username='admin',
password='changed!')
for index in service.indexes.list(datatype='all'):
print(index.name)
It works fine. This is exactly what I needed.
Thanks a lot
Hey there! Even though the Python SDK does not support listing indexes for datatype=all by default you can pass any keyword argument that you want which will then be used to form the request. For your case passing `datatype='all'` to the list method for the indexes collection appears to do the trick, I just tested this on my machine and metrics indexes are being returned along with logs:
from splunklib.client import connect
service = connect(
host='localhost',
port=8089,
username='admin',
password='changed!')
for index in service.indexes.list(datatype='all'):
print(index.name)