Open lmammino opened 6 years ago
Hi @lmammino, thanks for the detailed issue!
Can you please try using the doc_type (stype=default
) for the indexed document?
@brunotm, thanks for your quick reply.
I just tried it now and I have a very similar result:
External search command 'ess' returned error code 1. Script output = "error_message=TypeError at "/opt/splunk/etc/apps/elasticsplunk/bin/splunklib/searchcommands/internals.py", line 519 : 'NoneType' object is not iterable "
@lmammino,
This is because of the Elastic api client currently is on 5.x on elasticsplunk, and due to breaking changes on Elastic 6.x (mainly one doc_type per index).
I'll update the API client and adjust the elasticsplunk code in order to support both 5/6 versions and let you know here.
Thanks!
Thanks for having a better look. I don't expect any commitment being this an open source project, but do you think you will have bandwidth anytime soon to work on supporting elastic 6.x?
Yes :) Thanks!
@lmammino i just had the time to look at this, and it happens that the current client is still compatible and i overlooked you ess options.
Could you please change the action to action=search
with the correct stype as before (you can also omit it for this case.
The following example works fine with your example above:
|ess eaddr="http://localhost:9200" action=search query="foo:bar" fields=* include_es=true include_raw=true tsfield=ts stype=default
Remember to check if the following also works for you:
|ess eaddr="http://localhost:9200" action=indices-list
Change the localhost with your ES address.
Cheers.
How to reproduce:
1. spin up the environment
Use this docker compose setup:
This will spin up spin up splunk, elastic and kibana
1.2 install the plugin
in your local
./opt-splunk-etc/apps
run:then stop and restart the infrastructure:
2. add data to elastic
Use kibana on http://localhost:5601 and through the development tools run the following query:
3. query on splunk
Login in splunk at http://localhost:8000 (admin/somepass123456789) and tun the following query
The following error will be displayed on screen:
while my expectation was to see the following records: