<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator” in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475754#M58482</link>
    <description>&lt;P&gt;just remove that print line and try with &lt;CODE&gt;timeout&lt;/CODE&gt; changes&lt;/P&gt;</description>
    <pubDate>Thu, 07 Nov 2019 14:40:15 GMT</pubDate>
    <dc:creator>gaurav_maniar</dc:creator>
    <dc:date>2019-11-07T14:40:15Z</dc:date>
    <item>
      <title>Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475751#M58479</link>
      <description>&lt;P&gt;Hi @gaurav_maniar @larmesto  (I am not sure your expect eye on python can help here, i hope it can)&lt;/P&gt;

&lt;P&gt;I have downloaded the app and I have it working for traces into Splunk. &lt;BR /&gt;
I can get standered JSON events into Splunk and all is good there, however when i have tired to change to Distributed tracing, i cant get the data to come into Splunk! I think it is due to the fact the timestamp is different in this new sourcetype. So i have tried to define a new sourcetype with new time, but getting errors.&lt;/P&gt;

&lt;P&gt;With the following configuration, however when I tried to get the Distributed tracing to work it is not.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[elasticsearch_json://jaeger-span2]
date_field_name = startTime
elasticsearch_indice = jaeger-span-*
elasticsearch_instance_url = &lt;A href="http://mx12405vm" target="test_blank"&gt;http://mx12405vm&lt;/A&gt;
greater_or_equal = 2019-01-01
index = mlc_test
interval = 10
lower_or_equal = now
port = 10212
use_ssl = False
verify_certs = False
user = 
secret = 
sourcetype = ta_elasticsearch
host = test123
disabled = 0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The errors i am gettign are the following.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Splunkd.log
11-05-2019 15:37:34.276 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py"     status_code, error_message, additional_info
11-05-2019 15:37:34.276 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py" RequestError: RequestError(400, u'search_phase_execution_exception', u'failed to create query: {\n  "bool" : {\n    "filter" : [\n      {\n        "range" : {\n          "startTime" : {\n            "from" : "2019-01-01",\n            "to" : "now",\n            "include_lower" : true,\n            "include_upper" : true,\n            "boost" : 1.0\n          }\n        }\n      }\n    ],\n    "disable_coord" : false,\n    "adjust_pure_negative" : true,\n    "boost" : 1.0\n  }\n}')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Elastic.log&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Elastic.log
2019-11-05 15:38:41,776 ERROR pid=20450 tid=MainThread file=base_modinput.py:log_error:307 | Get error when collecting events.
Traceback (most recent call last):
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/modinput_wrapper/base_modinput.py", line 127, in stream_events
    self.collect_events(ew)
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py", line 104, in collect_events
    input_module.collect_events(self, ew)
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/input_module_elasticsearch_json.py", line 83, in collect_events
    for doc in res:
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/helpers/actions.py", line 435, in scan
    body=query, scroll=scroll, size=size, request_timeout=request_timeout, **kwargs
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/client/utils.py", line 84, in _wrapped
    return func(*args, params=params, **kwargs)
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/client/__init__.py", line 819, in search
    "GET", _make_path(index, "_search"), params=params, body=body
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/transport.py", line 353, in perform_request
    timeout=timeout,
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/connection/http_urllib3.py", line 251, in perform_request
    self._raise_error(response.status, raw_data)
  File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/connection/base.py", line 178, in _raise_error
    status_code, error_message, additional_info
RequestError: RequestError(400, u'search_phase_execution_exception', u'failed to create query: {\n  "bool" : {\n    "filter" : [\n      {\n        "range" : {\n          "startTime" : {\n            "from" : "2019-01-01",\n            "to" : "now",\n            "include_lower" : true,\n            "include_upper" : true,\n            "boost" : 1.0\n          }\n        }\n      }\n    ],\n    "disable_coord" : false,\n    "adjust_pure_negative" : true,\n    "boost" : 1.0\n  }\n}')
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Example of the JSON i am trying to get out our elastic search. Starttime is the timestamp.&lt;BR /&gt;
I have chreated a new one myself from some sample date and that work manually... Any help would be great cheers :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{
"_index": "jaeger-span-2019-11-01",
"_type": "span",
"_id": "AW4mrE4iQJeZAcmXbCYF",
"_version": 1,
"_score": 1,
"_source": {
"traceID": "d1daf2fd2f90b222",
"spanID": "2f6463e05c0b932d",
"flags": 1,
"operationName": "emit-tuple",
"references": [
{
"refType": "CHILD_OF",
"traceID": "d1daf2fd2f90b222",
"spanID": "b7e7335a859c15b4"
}
],
"startTime": 1572606855896000,
"startTimeMillis": 1572606855896,
"duration": 1514,
"tags": [ ],
"logs": [ ],
"process": {
"serviceName": "positions-storm-supervisor-v1",
"tags": [
{
"key": "hostname",
"type": "string",
"value": "mx12405vm"
}
,
{
"key": "jaeger.version",
"type": "string",
"value": "Java-0.32.0"
}
,
{
"key": "ip",
"type": "string",
"value": "10.26.10.130"
}
]
}
}
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 05 Nov 2019 14:47:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475751#M58479</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2019-11-05T14:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475752#M58480</link>
      <description>&lt;P&gt;Nor sure if the following changes will work or not, just give it try.&lt;/P&gt;

&lt;P&gt;Open file - &lt;CODE&gt;/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/transport.py&lt;/CODE&gt;&lt;BR /&gt;
- goto line number 353 and change it from &lt;CODE&gt;timeout=timeout&lt;/CODE&gt; to &lt;CODE&gt;timeout=60s&lt;/CODE&gt;&lt;BR /&gt;
- add &lt;CODE&gt;print str(body)&lt;/CODE&gt; before line number 341 &lt;CODE&gt;try&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Let me know the new errors&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 13:50:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475752#M58480</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-07T13:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475753#M58481</link>
      <description>&lt;P&gt;I am not sure i have put this in correctly &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/212239"&gt;@gaurav_maniar&lt;/a&gt; &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;      for attempt in range(self.max_retries + 1):
            connection = self.get_connection()


            print str(body)             
            try:
                # add a delay before attempting the next retry
                # 0, 1, 3, 7, etc...
                delay = 2 ** attempt - 1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;11-07-2019 15:19:31.851 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py"   File "/hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/ta_elasticsearch_data_integrator_modular_input/elasticsearch/transport.py", line 342&lt;BR /&gt;
11-07-2019 15:19:31.851 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py"     print str(body)&lt;BR /&gt;
11-07-2019 15:19:31.851 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py"     ^&lt;BR /&gt;
11-07-2019 15:19:31.851 +0100 ERROR ExecProcessor - message from "/hp400srv2/apps/SPLUNK_8/splunk/bin/python2.7 /hp400srv2/apps/SPLUNK_8/splunk/etc/apps/TA-elasticsearch-data-integrator---modular-input/bin/elasticsearch_json.py" IndentationError: unexpected indent&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:50:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475753#M58481</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2020-09-30T02:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475754#M58482</link>
      <description>&lt;P&gt;just remove that print line and try with &lt;CODE&gt;timeout&lt;/CODE&gt; changes&lt;/P&gt;</description>
      <pubDate>Thu, 07 Nov 2019 14:40:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475754#M58482</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-07T14:40:15Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475755#M58483</link>
      <description>&lt;P&gt;it looks like the issue with epoc time format of Splunk &amp;amp; standard format in Elastic.&lt;BR /&gt;
I don't know much about Elastic, but will let you know if I find something on this.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 09:58:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475755#M58483</guid>
      <dc:creator>gaurav_maniar</dc:creator>
      <dc:date>2019-11-08T09:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Distributed tracing from elastic search into Splunk using the “Elasticsearch Data Integrator”</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475756#M58484</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I totally agree, so the question is how can i make Splunk look epoc in elastic&lt;/P&gt;

&lt;P&gt;Working (For other event in Elasticsearch )&lt;BR /&gt;
"timestamp": "2019-08-08T16:25:58.751Z"&lt;/P&gt;

&lt;P&gt;not working due &lt;BR /&gt;
startTime=1572876800520000,&lt;/P&gt;</description>
      <pubDate>Fri, 08 Nov 2019 10:10:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Distributed-tracing-from-elastic-search-into-Splunk-using-the/m-p/475756#M58484</guid>
      <dc:creator>robertlynch2020</dc:creator>
      <dc:date>2019-11-08T10:10:46Z</dc:date>
    </item>
  </channel>
</rss>

