<?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 count message types by facility in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144671#M40280</link>
    <description>&lt;P&gt;I need to know when a particular facility isn't passing a message type(s). In Powershell it would be as easy as, foreach($facility in $facilities) find message_types...however, sense Splunk doesn't have a foreach command, I'm not sure how to do this. The index contains a field called facility and a field called message_type. Let me know if you need more info.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:50:50 GMT</pubDate>
    <dc:creator>technoe</dc:creator>
    <dc:date>2020-09-28T15:50:50Z</dc:date>
    <item>
      <title>count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144671#M40280</link>
      <description>&lt;P&gt;I need to know when a particular facility isn't passing a message type(s). In Powershell it would be as easy as, foreach($facility in $facilities) find message_types...however, sense Splunk doesn't have a foreach command, I'm not sure how to do this. The index contains a field called facility and a field called message_type. Let me know if you need more info.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:50:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144671#M40280</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2020-09-28T15:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144672#M40281</link>
      <description>&lt;P&gt;Check splunk's map search command which provides foreach loop. Also, provide sample data/expected output.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:43:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144672#M40281</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-10T18:43:46Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144673#M40282</link>
      <description>&lt;P&gt;Output should be a list of message_types per facility, including 0 count message_types ie:&lt;BR /&gt;
    message_type               facilities               count&lt;BR /&gt;
    type1                      facility1                 1&lt;BR /&gt;
    type2                                                3&lt;BR /&gt;
    type3                                                0&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;type1                      facility2                 2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;etc....&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:50:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144673#M40282</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2020-09-28T15:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144674#M40283</link>
      <description>&lt;P&gt;Please try this |stats count by message_type,facilities&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144674#M40283</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-02-10T18:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144675#M40284</link>
      <description>&lt;P&gt;That doesn't show me 0 values though. I need to compare the index to a list of known message types.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:53:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144675#M40284</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2014-02-10T18:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144676#M40285</link>
      <description>&lt;P&gt;Let me say this another way. I have a list of known message types and I need to know that each facility is processing each message type over a period of time, if the message type count is 0 I need to know that.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 18:57:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144676#M40285</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2014-02-10T18:57:12Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144677#M40286</link>
      <description>&lt;P&gt;Is there any information in the data which says a particular messsage_type isn't working in a facility? If not, then you might have to use some other methods like Lookup table where you use your existing list with splunk returned results and then compare the values to get the final result.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:01:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144677#M40286</guid>
      <dc:creator>theouhuios</dc:creator>
      <dc:date>2014-02-10T19:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144678#M40287</link>
      <description>&lt;P&gt;I have a lookup file containing every file type but I don't know how to compare that to the results of the search.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144678#M40287</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2014-02-10T19:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144679#M40288</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;your search providing list of message types (field coming here is message_type)&amp;gt; | join type=left max=0 message_type [search &amp;lt;your base search&amp;gt; | stats count by message_type, facilities] | fillnull count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;HR /&gt;

&lt;P&gt;Query updated to include max=0. try this one. Sample with considering you're using lookup table file.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | lookup messagetypes.csv | fields message_type | join type=left max=0 message_type [search &amp;lt;your base search&amp;gt; | stats count by message_type, facilities] | fillnull count
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:04:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144679#M40288</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-10T19:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144680#M40289</link>
      <description>&lt;P&gt;That's really close. Unfortunately, it's only returning about 22 results. There should be hundreds.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144680#M40289</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2014-02-10T19:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144681#M40290</link>
      <description>&lt;P&gt;try the updated query.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:19:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144681#M40290</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-02-10T19:19:05Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144682#M40291</link>
      <description>&lt;P&gt;That is it exactly! Thanks a ton. I've been working on this for a week straight.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:35:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144682#M40291</guid>
      <dc:creator>technoe</dc:creator>
      <dc:date>2014-02-10T19:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: count message types by facility</title>
      <link>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144683#M40292</link>
      <description>&lt;P&gt;Splunk has a foreach command&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Foreach"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Foreach&lt;/A&gt; &lt;/P&gt;</description>
      <pubDate>Fri, 07 Mar 2014 21:41:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/count-message-types-by-facility/m-p/144683#M40292</guid>
      <dc:creator>uuppuluri_splun</dc:creator>
      <dc:date>2014-03-07T21:41:07Z</dc:date>
    </item>
  </channel>
</rss>

