<?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 do stats by eventtype? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-do-stats-by-eventtype/m-p/383271#M111927</link>
    <description>&lt;P&gt;Hey, you can either reduce your result like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats by eventtype
| where eventtype=insecure_telnet OR eventtype=insecure_snmp OR eventtype=insecure_rdp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also create a new eval'd field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval insecure_protocol=case(app=telnet OR dest_port=23, "telnet", app=snmp OR dest_port=1234, "snmp", app=rdp OR dest_port=4321, "rdp")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both is possible &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 06 May 2018 18:48:18 GMT</pubDate>
    <dc:creator>xpac</dc:creator>
    <dc:date>2018-05-06T18:48:18Z</dc:date>
    <item>
      <title>How can I do stats by eventtype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-do-stats-by-eventtype/m-p/383270#M111926</link>
      <description>&lt;P&gt;All, &lt;/P&gt;

&lt;P&gt;I have three eventtypes &lt;/P&gt;

&lt;P&gt;[insecure_telnet]&lt;BR /&gt;
app=telnet OR dest_port=23 &lt;/P&gt;

&lt;P&gt;[insecure_snmp]&lt;BR /&gt;
app=snmp OR dest_port=1234&lt;/P&gt;

&lt;P&gt;[insecure_rdp]&lt;BR /&gt;
app=rdp OR dest_port=4321&lt;/P&gt;

&lt;P&gt;I'd like the email alert I get to have the protocol I don't trust in the email header. &lt;BR /&gt;
e.g. &lt;BR /&gt;
ALert - insecure Service TELNET detected on HOST &lt;/P&gt;

&lt;P&gt;Rather than write an alert for each insecure protocol I don't trust I was hoping just to bind all these together like&lt;/P&gt;

&lt;P&gt;index=os eventtype=insecure_telnet OR eventtype=insecure_snmp &lt;/P&gt;

&lt;P&gt;I figured I can stats by eventtype, but that doesnt' quite cut it since it includes other eventtypes. Is there maybe a way to use eventstats or a eval to create a field which states the insecure protocol? &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:25:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-do-stats-by-eventtype/m-p/383270#M111926</guid>
      <dc:creator>daniel333</dc:creator>
      <dc:date>2020-09-29T19:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I do stats by eventtype?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-do-stats-by-eventtype/m-p/383271#M111927</link>
      <description>&lt;P&gt;Hey, you can either reduce your result like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats by eventtype
| where eventtype=insecure_telnet OR eventtype=insecure_snmp OR eventtype=insecure_rdp
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You could also create a new eval'd field like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval insecure_protocol=case(app=telnet OR dest_port=23, "telnet", app=snmp OR dest_port=1234, "snmp", app=rdp OR dest_port=4321, "rdp")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Both is possible &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 May 2018 18:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-do-stats-by-eventtype/m-p/383271#M111927</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-06T18:48:18Z</dc:date>
    </item>
  </channel>
</rss>

