<?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: How can I add empty time buckets to my table? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262630#M9979</link>
    <description>&lt;P&gt;I just figured out the solution. Somesoni2's response gave me hint. Since msg_severity is always the same for each message, I combined the fields, then ran it through the timechart command. Then untable and wa-lah!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex msg_severity=* | eval message_severity = message + "|" + msg_severity | timechart span=1m count by message_severity | untable _time message_severity count | eval temp = split(message_severity,"|") | eval message = mvindex(temp,0) | eval msg_severity = mvindex(temp,1) | table _time message msg_severity count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Mar 2016 18:27:51 GMT</pubDate>
    <dc:creator>jedatt01</dc:creator>
    <dc:date>2016-03-29T18:27:51Z</dc:date>
    <item>
      <title>How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262625#M9974</link>
      <description>&lt;P&gt;I have a dataset which I cannot use timechart because i'm splitting by two fields. Not all of the values of message have events in all time buckets. Is there a way to add 0 time buckets for each of value of message? &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex msg_severity=* | bucket span=1m _time | stats count by message msg_severity _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2016 15:31:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262625#M9974</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2016-03-28T15:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262626#M9975</link>
      <description>&lt;P&gt;You need the &lt;CODE&gt;fillnull&lt;/CODE&gt; command:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/fillnull"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/fillnull&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Use it like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex msg_severity=* | fillnull value=NULL message msg_severity | bucket span=1m _time | stats count by message msg_severity _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2016 21:32:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262626#M9975</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-03-28T21:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262627#M9976</link>
      <description>&lt;P&gt;Not quite there yet. Let me try to explain a little better. Not all of the values of message have entries every minute, so they won't show up in all time buckets. In my resulting table the entries for those time buckets are just missing, example below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time message    msg_severity count
9:00   message1  error               10
9:01   message1  error               6
9:00   message2  warning          3
9:01   message2  warning          4
9:01   message3  notice              6
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The 9:00 entry for message3 is missing. I want the table to look like&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time message    msg_severity count
9:00   message1  error               10
9:01   message1  error               6
9:00   message2  warning          3
9:01   message2  warning          4
9:00   message3  notice              0
9:01   message3  notice              6
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Mar 2016 13:12:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262627#M9976</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2016-03-29T13:12:54Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262628#M9977</link>
      <description>&lt;P&gt;What's max time range (considering 1m time bucket) and what's the total number of message-msg_severity combination? If either of them is smaller, we can try something with chart command.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:46:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262628#M9977</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-29T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262629#M9978</link>
      <description>&lt;P&gt;time range is only 2 minutes. Total message - msg_severity combinations is one. It's always unique. Hope that helps.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 18:10:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262629#M9978</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2016-03-29T18:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262630#M9979</link>
      <description>&lt;P&gt;I just figured out the solution. Somesoni2's response gave me hint. Since msg_severity is always the same for each message, I combined the fields, then ran it through the timechart command. Then untable and wa-lah!&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex msg_severity=* | eval message_severity = message + "|" + msg_severity | timechart span=1m count by message_severity | untable _time message_severity count | eval temp = split(message_severity,"|") | eval message = mvindex(temp,0) | eval msg_severity = mvindex(temp,1) | table _time message msg_severity count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Mar 2016 18:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262630#M9979</guid>
      <dc:creator>jedatt01</dc:creator>
      <dc:date>2016-03-29T18:27:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I add empty time buckets to my table?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262631#M9980</link>
      <description>&lt;P&gt;If there could be more 10 messages possible, then you can include &lt;CODE&gt;limit=0&lt;/CODE&gt; in you timechart to ensure you get every message-severity listed for you.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 18:50:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-can-I-add-empty-time-buckets-to-my-table/m-p/262631#M9980</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-03-29T18:50:59Z</dc:date>
    </item>
  </channel>
</rss>

