<?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: Requesting Assistance Writing a Search Request in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497070#M194754</link>
    <description>&lt;P&gt;Good 2 know&lt;/P&gt;</description>
    <pubDate>Thu, 05 Dec 2019 14:40:07 GMT</pubDate>
    <dc:creator>dharveynswccd</dc:creator>
    <dc:date>2019-12-05T14:40:07Z</dc:date>
    <item>
      <title>Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497059#M194743</link>
      <description>&lt;P&gt;I am writing a search which I intend to use to create an alert from. I keep getting "No Results" from this search unless I remove the third line (where Percent.........). Something is wrong with that filter but I can't seem to figure out what it is. &lt;/P&gt;

&lt;P&gt;Here is the search:&lt;/P&gt;

&lt;P&gt;index=oswinperf sourcetype="Perfmon:CPU" counter="% Processor Time" OR counter="% Processor Time" OR counter="% C2 Time"&lt;BR /&gt;
| eval level=if(PercentUsedSpace&amp;gt;=90,"CRITICAL",if(PercentUsedSpace&amp;gt;=80,"WARNING",""))&lt;BR /&gt;
| where PercentUsedSpace &amp;gt;=80&lt;BR /&gt;
| table level _time host Value&lt;BR /&gt;
| sort - PercentUsedSpace&lt;BR /&gt;
| dedup host&lt;BR /&gt;
| rename level as severity&lt;/P&gt;

&lt;P&gt;My intended result is something like this:&lt;BR /&gt;
Severity      Time      Host    Value&lt;/P&gt;

&lt;P&gt;I would like to convert the results in the  field to actual percentages.&lt;/P&gt;

&lt;P&gt;Any help is appreciated. Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 20:23:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497059#M194743</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-04T20:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497060#M194744</link>
      <description>&lt;P&gt;Edit: The second to last line here should read:&lt;/P&gt;

&lt;P&gt;I would like to convert the results in the "Value" field to actual percentages&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 20:25:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497060#M194744</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-04T20:25:48Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497061#M194745</link>
      <description>&lt;P&gt;Hello @dharveynswccd,&lt;/P&gt;

&lt;P&gt;Try this : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=oswinperf sourcetype="Perfmon:CPU" counter="% Processor Time" OR counter="% Processor Time" OR counter="% C2 Time" PercentUsedSpace&amp;gt;=80
| stats values(Value) as Value by PercentUsedSpace, host , _time
| eval level=if(PercentUsedSpace&amp;gt;=90,"CRITICAL",if(PercentUsedSpace&amp;gt;=80,"WARNING",""))
| rename level as severity
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Cheers,&lt;BR /&gt;
David&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 21:35:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497061#M194745</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-12-04T21:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497062#M194746</link>
      <description>&lt;P&gt;@DavidHourani,&lt;BR /&gt;
Thanks for the response to my question. Unfortunately I received the "no results" even after changing the Warning and Critical values to much lower numbers.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 12:58:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497062#M194746</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-05T12:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497063#M194747</link>
      <description>&lt;P&gt;umm..weird..&lt;/P&gt;

&lt;P&gt;Does the first line alone give you anything ? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=oswinperf sourcetype="Perfmon:CPU" counter="% Processor Time" OR counter="% Processor Time" OR counter="% C2 Time" PercentUsedSpace&amp;gt;=80
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:17:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497063#M194747</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-12-05T13:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497064#M194748</link>
      <description>&lt;P&gt;Wait now that I read it again, why are you filtering on used space when all your counters are linked to CPU ? The field PercentUsedSpace is not even part of your events is it ? &lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:19:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497064#M194748</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-12-05T13:19:00Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497065#M194749</link>
      <description>&lt;P&gt;You are indeed correct. Earlier when I was writing the search I followed the auto-complete in the search bar which led me to that. I just changed that to windows_cpu_load_percent and I am now seeing results, even writing the search 2 different ways. I still need to dumb it down a little but the 2 below seem to work:&lt;/P&gt;

&lt;P&gt;index=oswinperf sourcetype="Perfmon:CPU" &lt;BR /&gt;
| bucket _time span=30m &lt;BR /&gt;
| eval Load=if(windows_cpu_load_percent&amp;gt;=90,"CRITICAL",if(windows_cpu_load_percent&amp;gt;=80,"WARNING",""))&lt;BR /&gt;
| table Load _time host windows_cpu_load_percent&lt;BR /&gt;&lt;BR /&gt;
| sort - count windows_cpu_load_percent&lt;BR /&gt;
| dedup host&lt;BR /&gt;
| rename Load as severity&lt;/P&gt;

&lt;P&gt;I'm still trying to determine how to convert a decimal to a whole number in the percentage column. Any thoughts on this?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:15:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497065#M194749</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2020-09-30T03:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497066#M194750</link>
      <description>&lt;P&gt;Ah that's great, glad you found the error there...  really weird when the autocorrect happens. &lt;/P&gt;

&lt;P&gt;You can use the &lt;CODE&gt;round&lt;/CODE&gt; function. something like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval windows_cpu_load_percent=round(windows_cpu_load_percent,0)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 05 Dec 2019 13:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497066#M194750</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-12-05T13:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497067#M194751</link>
      <description>&lt;P&gt;Worked! Thanks for the assists!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 14:11:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497067#M194751</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-05T14:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497068#M194752</link>
      <description>&lt;P&gt;David I awarded you 2 points. Hope that's a good reward. Not sure what the norm is.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 14:13:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497068#M194752</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-05T14:13:25Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497069#M194753</link>
      <description>&lt;P&gt;Thank you ! &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Usually if you up-vote any comment/question/answer that gives 15 karma the person who posted it. If you Accept an answer that is 25 karma. So if you're into gathering karma point, just upvote and accept and keep your points ^^ &lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 14:18:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497069#M194753</guid>
      <dc:creator>DavidHourani</dc:creator>
      <dc:date>2019-12-05T14:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Requesting Assistance Writing a Search Request</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497070#M194754</link>
      <description>&lt;P&gt;Good 2 know&lt;/P&gt;</description>
      <pubDate>Thu, 05 Dec 2019 14:40:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Requesting-Assistance-Writing-a-Search-Request/m-p/497070#M194754</guid>
      <dc:creator>dharveynswccd</dc:creator>
      <dc:date>2019-12-05T14:40:07Z</dc:date>
    </item>
  </channel>
</rss>

