<?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: search by Http code 500 is not working in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711249#M240127</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;Yes. I'm using the same user with both Web UI and Rest API access.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Feb 2025 10:13:18 GMT</pubDate>
    <dc:creator>BalajiRaju</dc:creator>
    <dc:date>2025-02-11T10:13:18Z</dc:date>
    <item>
      <title>search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711077#M240098</link>
      <description>&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;when we search by http code 500 internal server error in the Splunk is working fine. the same query which we use it in python script. we dont get any results. could you please help me on this. Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 06:39:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711077#M240098</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-10T06:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711091#M240102</link>
      <description>&lt;P&gt;hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274169"&gt;@BalajiRaju&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you provide the base search you're using in Splunk and the Python code for us to see?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 08:12:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711091#M240102</guid>
      <dc:creator>dataisbeautiful</dc:creator>
      <dc:date>2025-02-10T08:12:05Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711100#M240105</link>
      <description>&lt;DIV&gt;import splunklib.client as client&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import splunklib.results as results&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;service = client.connect(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; host="ipaddress",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; port=portnumber,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; username="username",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; password="password",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; scheme = "https"&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; kwargs_blockingsearch = {"exec_mode": "normal",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "earliest_time": "-15m",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "latest_time": "now",&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "enable_lookups": "true"}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; searchquery_blocking = '''search index=sample source="*sample*" AND host="v*lu*" OR host="s*mple*" | search httpcode=500 '''&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; job = service.jobs.create(searchquery_blocking, **kwargs_blockingsearch)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; while True:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while not job.is_ready():&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pass&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if job["isDone"] =="1":&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; break&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;results = job.results(**{"output_mode": "json"})&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print(results)&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 10 Feb 2025 09:17:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711100#M240105</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-10T09:17:45Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711103#M240106</link>
      <description>&lt;P&gt;If you remove&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| search httpcode=500&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;from the python, does it return all the data as expected from the parent index?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 09:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711103#M240106</guid>
      <dc:creator>dataisbeautiful</dc:creator>
      <dc:date>2025-02-10T09:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711104#M240107</link>
      <description>&lt;P&gt;yes. correct. if i remove | search httpcode = 500, i can get the results&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 09:34:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711104#M240107</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-10T09:34:23Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711151#M240113</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261832"&gt;@dataisbeautiful&lt;/a&gt;&amp;nbsp; do you have any solution for this issue?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 12:38:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711151#M240113</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-10T12:38:40Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711156#M240114</link>
      <description>&lt;P&gt;If the search without the filter returns all the data, then the filter is removing too much.&lt;/P&gt;&lt;P&gt;When running in the Python are the data types being changed? In Splunk the httpcode might be an integer but Python sees it as a string?&lt;/P&gt;&lt;P&gt;Can you validate the data from the Python to confirm the value of httpcode is what you're expecting?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2025 13:34:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711156#M240114</guid>
      <dc:creator>dataisbeautiful</dc:creator>
      <dc:date>2025-02-10T13:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711229#M240121</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261832"&gt;@dataisbeautiful&lt;/a&gt;&amp;nbsp;Tried to use the below query also but no luck.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;searchquery_blocking = '''search index=sample source="*sample*" AND host="v*lu*" OR host="s*mple*" | search httpcode="500" '''&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;still not getting any results. Its strange. I have been stuck on this for three days.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 05:49:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711229#M240121</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-11T05:49:38Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711239#M240123</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274169"&gt;@BalajiRaju&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When wrapping your query in quotes, do you escape the ones contained inside?&lt;/P&gt;&lt;P&gt;For example&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;query=" index=\"name\" "&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 09:05:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711239#M240123</guid>
      <dc:creator>dataisbeautiful</dc:creator>
      <dc:date>2025-02-11T09:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711243#M240124</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261832"&gt;@dataisbeautiful&lt;/a&gt;This is not needed. The string is defined with triple single quotes as long string and therefore double quotes do not need to be escaped.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/274169"&gt;@BalajiRaju&lt;/a&gt;&amp;nbsp; If your base search returns values and your filtering part causes it to not return any events at all, that would mean that you're filtering it wrong. There can be several reasons, most obvious would be that the httpcode field isn't properly extracted from the events (or simply your data doesn't have any 500 results).&lt;/P&gt;&lt;P&gt;Do you have any webui access or is REST the only way you're accessing your Splunk installation?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 09:32:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711243#M240124</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-02-11T09:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711246#M240125</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;Yes. I have web UI access also. When I search the query in Web splunk,&amp;nbsp; I get the results. the same query when i execute it in splunk rest api via python script, not getting any results. I dont know why.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 09:52:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711246#M240125</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-11T09:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711247#M240126</link>
      <description>&lt;P&gt;That is interesting. Are you using the same user to search from WebUI as you're using for API access?&lt;/P&gt;&lt;P&gt;If not, that could mean some differences in permissions to knowledge objects - in your case - field extractions.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 09:55:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711247#M240126</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-02-11T09:55:52Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711249#M240127</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;Yes. I'm using the same user with both Web UI and Rest API access.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 10:13:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711249#M240127</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-11T10:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711258#M240131</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/231884"&gt;@PickleRick&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/261832"&gt;@dataisbeautiful&lt;/a&gt;&amp;nbsp; Finally find the reason. unable to use the fields from splunk rest api. thats why we couldnt get the results. I will use the _raw data to find out the 500 http code and get the results. Thanks for your reply.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 12:33:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711258#M240131</guid>
      <dc:creator>BalajiRaju</dc:creator>
      <dc:date>2025-02-11T12:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711260#M240132</link>
      <description>&lt;P&gt;Yeah but the question is why you don't see the fields when spawning the search from the REST api. That's unexpected. If you're using the same user, which should obviously have the same permissions for knowledge objects, you should be getting the same behaviour.&lt;/P&gt;&lt;P&gt;Just to be on the safe side - your WebUI SH is the same you're spawning your REST API search against?&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 12:41:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711260#M240132</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2025-02-11T12:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: search by Http code 500 is not working</title>
      <link>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711289#M240135</link>
      <description>&lt;P&gt;Not seeing the fields will stop your filter from working, but why is the question.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2025 15:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/search-by-Http-code-500-is-not-working/m-p/711289#M240135</guid>
      <dc:creator>dataisbeautiful</dc:creator>
      <dc:date>2025-02-11T15:43:38Z</dc:date>
    </item>
  </channel>
</rss>

