<?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: Graph displays incorrectly with timechart function in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326766#M3035</link>
    <description>&lt;P&gt;@Hegemon76 can you post code using &lt;CODE&gt;code button&lt;/CODE&gt; i.e. button with &lt;CODE&gt;101010&lt;/CODE&gt; on it (shortcut is &lt;CODE&gt;CTRL+K&lt;/CODE&gt;). Also if possible can you upload screen mock up of what you have and what is the issue? You can upload to any image sharing site and then post the image link using &lt;CODE&gt;Image&lt;/CODE&gt; button (Shortcut &lt;CODE&gt;Ctrl+G&lt;/CODE&gt;).&lt;/P&gt;</description>
    <pubDate>Wed, 11 Apr 2018 05:55:13 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2018-04-11T05:55:13Z</dc:date>
    <item>
      <title>Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326765#M3034</link>
      <description>&lt;P&gt;Here is my search string:&lt;/P&gt;

&lt;P&gt;product=Windows EventCode=645 OR EventCode=4741 | timechart span=1w count | eval Severe=if(count&amp;gt;25,count,0) | eval High=if(count&amp;lt;=25 AND count&amp;gt;20,count, 0)| eval Moderate = if(count&amp;lt;=20 AND count&amp;gt;15,count,0) | eval Low = if(count&amp;lt;=15 AND count&amp;gt;7,count, 0) | eval Very Low = if(count&amp;lt;=7 AND count&amp;gt;0,count, 0)| rename _time as Date, count as Count |convert timeformat="%Y-%m-%d" ctime(Date)&lt;/P&gt;

&lt;P&gt;I have the corresponding XML but it isn't letting me post it. It works....all the colors work.&lt;/P&gt;

&lt;P&gt;These two are correct in terms of what I'm going for however when the visualization displays there is a count "bar" that corresponds directly to the other bars come out to. All I wanted to do was have a chart with different colors than blue to distinguish data by week but it seems like this is impossible based on everything I've read. You have to use timechart and timechart seems to only display data with a count field that makes the whole thing look like trash.&lt;/P&gt;

&lt;P&gt;Any help would be great!&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Tue, 10 Apr 2018 23:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326765#M3034</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-10T23:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326766#M3035</link>
      <description>&lt;P&gt;@Hegemon76 can you post code using &lt;CODE&gt;code button&lt;/CODE&gt; i.e. button with &lt;CODE&gt;101010&lt;/CODE&gt; on it (shortcut is &lt;CODE&gt;CTRL+K&lt;/CODE&gt;). Also if possible can you upload screen mock up of what you have and what is the issue? You can upload to any image sharing site and then post the image link using &lt;CODE&gt;Image&lt;/CODE&gt; button (Shortcut &lt;CODE&gt;Ctrl+G&lt;/CODE&gt;).&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 05:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326766#M3035</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-11T05:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326767#M3036</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/31557"&gt;@Hegemon76&lt;/a&gt;, please try out the following run anywhere search example based on Splunk's _internal index. You can change &lt;CODE&gt;| bin _time span=1w&lt;/CODE&gt; and &lt;CODE&gt;| eval _time=strptime(strftime(_time,"%Y/%m/%d"),"%Y/%m/%d")&lt;/CODE&gt; as per your need.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd log_level!=INFO 
| bin _time span=1h 
| stats count by _time 
| eval Status=case(count&amp;gt;25,"Severe",
    count&amp;lt;=25 AND count&amp;gt;20,"High",
    count&amp;lt;=20 AND count&amp;gt;15,"Moderate",
    count&amp;lt;=15 AND count&amp;gt;7,"Low",
    count&amp;lt;=7 AND count&amp;gt;0,"Very Low",
    true(), 0) 
| timechart span="1h" sum(count) as Count by Status 
| eval _time=strptime(strftime(_time,"%Y/%m/%d %H"),"%Y/%m/%d %H")
| fillnull value=0
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:58:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326767#M3036</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T18:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326768#M3037</link>
      <description>&lt;P&gt;product=Windows EventCode=645 OR EventCode=4741 | timechart span=1w count| eval Severe=if(count&amp;gt;25,count,0) | eval High=if(count&amp;lt;=25 AND count&amp;gt;20,count, 0)| eval Moderate = if(count&amp;lt;=20 AND count&amp;gt;15,count,0) | eval Low = if(count&amp;lt;=15 AND count&amp;gt;7,count, 0) | eval Very Low = if(count&amp;lt;=7 AND count&amp;gt;0,count, 0)| rename _time as Date |convert timeformat="%Y-%m-%d" ctime(Date)&lt;/P&gt;

&lt;P&gt;{"Severe":0xFF0000,"High":0xff8000,"Moderate":0xFFFF00,"Low":0x00FF00,"Very Low":0x0000ff}&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 16:28:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326768#M3037</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-11T16:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326769#M3038</link>
      <description>&lt;P&gt;I need more karma points to post images.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 16:31:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326769#M3038</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-11T16:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326770#M3039</link>
      <description>&lt;P&gt;So it works! This is great! Thanks niketnilay&lt;/P&gt;

&lt;P&gt;However.....&lt;/P&gt;

&lt;P&gt;How can I increase the size of the horizontal bar chart lines (or vertical the type of chart doesn't matter) ? Keep in mind I changed your script to this:&lt;/P&gt;

&lt;P&gt;product=Windows EventCode=645 OR EventCode=4741&lt;BR /&gt;
 | bin _time span=1w &lt;BR /&gt;
 | stats count by _time &lt;BR /&gt;
 | eval Status=case(count&amp;gt;25,"Severe",&lt;BR /&gt;
     count&amp;lt;=25 AND count&amp;gt;20,"High",&lt;BR /&gt;
     count&amp;lt;=20 AND count&amp;gt;15,"Moderate",&lt;BR /&gt;
     count&amp;lt;=15 AND count&amp;gt;7,"Low",&lt;BR /&gt;
     count&amp;lt;=7 AND count&amp;gt;0,"Very Low",&lt;BR /&gt;
     true(), 0) &lt;BR /&gt;
 | timechart span="1h" sum(count) as Count by Status &lt;BR /&gt;
 | eval _time=strptime(strftime(_time,"%Y/%m/%d"),"%Y/%m/%d")&lt;BR /&gt;
 | fillnull value=0&lt;/P&gt;

&lt;P&gt;The lines are incredibly small now (graphically) and clicking "format virtualization" to stacked or non stack doesn't do anything anymore. One issue begets another is seems.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:58:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326770#M3039</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2020-09-29T18:58:43Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326771#M3040</link>
      <description>&lt;P&gt;That is because you missed out changing &lt;CODE&gt;span="1w"&lt;/CODE&gt; inside timechart command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| timechart span="1w" sum(count) as Count by Status 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Just FYI, for posting Image, you can upload the same to any image sharing site and then use the link using &lt;CODE&gt;Image Button Ctrl+G&lt;/CODE&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 17:01:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326771#M3040</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-11T17:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326772#M3041</link>
      <description>&lt;P&gt;Ya I tried that and it just says I don't have enough karma.&lt;/P&gt;

&lt;P&gt;Simple fix made the chart work. This is great thanks! I'm curious what removed the "count" part though?&lt;/P&gt;

&lt;P&gt;Was is the "|fillnull value=0" or the entirety of what you did. That was driving me nuts for around 2 days trying to figure this out.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 17:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326772#M3041</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-11T17:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326773#M3042</link>
      <description>&lt;P&gt;The timechart command with split by Status field generates the count of Status and names the fields as the Status Name ie Low, Moderate etc. So there is not Count field.&lt;/P&gt;

&lt;P&gt;fillnull just fills 0 instead of null to represent numeric data in graph.&lt;/P&gt;

&lt;P&gt;Glad you found your solution. Do up vote the comments that helped &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I am surprise that Link can not be attached. Are you sure you are not trying to use the Attachment button Ctrl+U which looks like a Paper Clip, as that is restricted by Karma points. In any case you can also directly paste the link of image sharing site where the image is uploaded just in case.&lt;/P&gt;

&lt;P&gt;Have a great day ahead!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 17:13:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326773#M3042</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-11T17:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326774#M3043</link>
      <description>&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 17:22:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326774#M3043</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-11T17:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Graph displays incorrectly with timechart function</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326775#M3044</link>
      <description>&lt;P&gt;I probably need to open a new question but that doesn't work for stats count or chart count.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Apr 2018 21:27:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Graph-displays-incorrectly-with-timechart-function/m-p/326775#M3044</guid>
      <dc:creator>Hegemon76</dc:creator>
      <dc:date>2018-04-11T21:27:18Z</dc:date>
    </item>
  </channel>
</rss>

