<?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: add column on a dashboard in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310246#M39697</link>
    <description>&lt;P&gt;it"s almost perfect!&lt;BR /&gt;
for Sheduled tasks operational and scheduled tasks sysmon, i want a name, toto for the first, titi for the second&lt;BR /&gt;
and i want just erreur Critique for the 4 sourcetype&lt;BR /&gt;
i try but i dont reach....&lt;BR /&gt;
thanks&lt;/P&gt;</description>
    <pubDate>Tue, 03 Apr 2018 10:56:26 GMT</pubDate>
    <dc:creator>jip31jip31</dc:creator>
    <dc:date>2018-04-03T10:56:26Z</dc:date>
    <item>
      <title>add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310237#M39688</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;i use this code on a count report&lt;/P&gt;

&lt;P&gt;index="wineventlog" (sourcetype="wineventlog:application" SourceName=&lt;EM&gt;endpoint&lt;/EM&gt; SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode=* Type=Avertissement) OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber) |  stats count by Type&lt;/P&gt;

&lt;P&gt;and i would like to add a column on the report for the 3 sourcename&lt;BR /&gt;
for example, for index="wineventlog" (sourcetype="wineventlog:application" SourceName=&lt;EM&gt;endpoint&lt;/EM&gt; SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur")  i would like to have a Dashboard like this :&lt;/P&gt;

&lt;P&gt;SourceName                            Type                       Count&lt;BR /&gt;
McAfee EndPoint Security      Avertissement      225&lt;BR /&gt;
Thanks for your help&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 13:11:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310237#M39688</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-04-02T13:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310238#M39689</link>
      <description>&lt;P&gt;you can number of dashboard by using the below query&lt;/P&gt;

&lt;P&gt;Please try to use the below query&lt;/P&gt;

&lt;P&gt;1) index="wineventlog" sourcetype="wineventlog:application" SourceName=endpoint EventCode=* Type="Erreur*"  | stats count by type&lt;/P&gt;

&lt;P&gt;2)index="wineventlog" sourcetype="wineventlog:application" SourceName="endpoint" OR SourceName="McAfee Endpoint Security" EventCode=* Type="Erreur*"  | stats count by SourceName type&lt;/P&gt;

&lt;P&gt;3)index="wineventlog" sourcetype="wineventlog:application" EventCode=* Type="Erreur*"  | stats count by SourceName &lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 14:21:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310238#M39689</guid>
      <dc:creator>logloganathan</dc:creator>
      <dc:date>2018-04-02T14:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310239#M39690</link>
      <description>&lt;P&gt;thanks &lt;BR /&gt;
BUT&lt;BR /&gt;
what i need is static field &lt;BR /&gt;
this my entire request :&lt;BR /&gt;
index="wineventlog" (sourcetype="wineventlog:application" SourceName=&lt;EM&gt;endpoint&lt;/EM&gt; SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode=* Type=Avertissement) OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode=* Type=&lt;EM&gt;) OR (sourcetype="wineventlog:&lt;/EM&gt;" "Type=Critique" RecordNumber) | stats count by Type SourceName&lt;/P&gt;

&lt;P&gt;for the first part of the request i want "McAfee" instead "McAfee Endpoint" for the second i want "Task Scheduler Operational" for the third "Task Scheduler Sysmon" and for the last "WinEvents"&lt;BR /&gt;
so the idea is to rename sourcename or sourcetype or to add a new column with static fields &lt;BR /&gt;
but i dont know how to do&lt;BR /&gt;
could you help me please???&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 15:08:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310239#M39690</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-04-02T15:08:27Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310240#M39691</link>
      <description>&lt;P&gt;@jip31 please re-post the SPL in your question/comment with &lt;CODE&gt;code button&lt;/CODE&gt; (it is one with icon &lt;CODE&gt;101010&lt;/CODE&gt;) in the comment text area. You can also &lt;CODE&gt;type an enter and four spaces&lt;/CODE&gt; before your SPL or use keyboard shortcut &lt;CODE&gt;Ctrl+K&lt;/CODE&gt; once you have selected the code are. This will prevent special characters in your SPL/Code from being escaped.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 17:02:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310240#M39691</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-02T17:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310241#M39692</link>
      <description>&lt;P&gt;@jip31 while you would need to re-post your query using code button &lt;CODE&gt;101010&lt;/CODE&gt; for us to assist you better, based on information seems like you are looking for the following query bases on Splunk &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/ConditionalFunctions#case.28X.2C.22Y.22.2C....29"&gt;case()&lt;/A&gt; evaluation function.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| stats count by Type SourceName
| eval SourceName=case(match(SourceName,"^McAfee"),"McAfee", 
      (Type=="Avertissement" AND match(sourcetype,"WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Operational", 
      (match(sourcetype,"^WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Sysmon",
      (match(sourcetype,"^WinEventLog\:") AND Type=="Critique"), "Winevents",
      true(),"OTHERS")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: &lt;CODE&gt;match()&lt;/CODE&gt; will perform case-sensitive regular expression based pattern match by default. Same event can not match against multiple category i.e. &lt;CODE&gt;Task Schedular Sysmon&lt;/CODE&gt; will belong to Type other than &lt;CODE&gt;Avertissement&lt;/CODE&gt;&lt;BR /&gt;
The true condition in the &lt;CODE&gt;case()&lt;/CODE&gt; statement works as the default scenario where all unmatched events will be given SourceName as &lt;CODE&gt;OTHERS&lt;/CODE&gt;. This will also allow you to test whether all case conditions are working as expected or not.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Apr 2018 18:02:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310241#M39692</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-04-02T18:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310242#M39693</link>
      <description>&lt;P&gt;hi&lt;/P&gt;

&lt;P&gt;it doesnt works&lt;BR /&gt;
this is my final code below and the error message :&lt;/P&gt;

&lt;P&gt;index="wineventlog" (sourcetype="wineventlog:application" SourceName=&lt;EM&gt;endpoint&lt;/EM&gt; SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber SourceName="Microsoft-Windows-TaskScheduler" EventCode=* Type=Avertissement) OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber) OR (sourcetype="WinEventLog:Windows PowerShell" EventCode = 400 OR EventCode = 600  RecordNumber) | stats count by Type SourceName eval SourceName=case(match(SourceName,"^McAfee"),"McAfee", (Type=="Avertissement" AND match(sourcetype,"WinEventLog:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Operational", (match(sourcetype,"^WinEventLog:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Sysmon", (match(sourcetype,"^WinEventLog:") AND Type=="Critique"), "Winevents", true(),"OTHERS")&lt;/P&gt;

&lt;P&gt;Error:&lt;BR /&gt;
Error in 'stats' command: The argument 'SourceName=case(match(SourceName,^McAfee),McAfee, (Type==Avertissement AND match(sourcetype,WinEventLog:Microsoft-Windows-TaskScheduler\/Operational)),Task Scheduler Operational, (match(sourcetype,^WinEventLog:Microsoft-Windows-TaskScheduler\/Operational)),Task Scheduler Sysmon, (match(sourcetype,^WinEventLog:) AND Type==Critique), Winevents, true(),OTHERS)' is invalid&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 06:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310242#M39693</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-04-03T06:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310243#M39694</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index="wineventlog" (sourcetype="wineventlog:application" SourceName=*endpoint* SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber SourceName="Microsoft-Windows-TaskScheduler" EventCode=* Type=Avertissement) OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber) OR (sourcetype="WinEventLog:Windows PowerShell" EventCode = 400 OR EventCode = 600  RecordNumber) | stats count by Type SourceName eval SourceName=case(match(SourceName,"^McAfee"),"McAfee", (Type=="Avertissement" AND match(sourcetype,"WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Operational", (match(sourcetype,"^WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Sysmon", (match(sourcetype,"^WinEventLog\:") AND Type=="Critique"), "Winevents", true(),"OTHERS")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2018 06:24:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310243#M39694</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2018-04-03T06:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310244#M39695</link>
      <description>&lt;P&gt;yes you can use rename&lt;/P&gt;

&lt;P&gt;Please try the below query&lt;/P&gt;

&lt;P&gt;index="wineventlog" (sourcetype="wineventlog:application"  SourceName="McAfee Endpoint Security" EventCode= Type="Erreur RecordNumber" OR "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber EventCode= Type=Avertissement | rename sourcetype as SourceName  )  OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber | rename sourcetype as SourceName ) | stats count by Type SourceName&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 08:47:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310244#M39695</guid>
      <dc:creator>logloganathan</dc:creator>
      <dc:date>2018-04-03T08:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310245#M39696</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;You must add a pipe "|" between stats ans eval try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   index="wineventlog" (sourcetype="wineventlog:application" SourceName=*endpoint* SourceName="McAfee Endpoint Security" EventCode=* Type=Erreur RecordNumber "Type=Erreur") OR (sourcetype="WinEventLog:Microsoft-Windows-TaskScheduler/Operational" RecordNumber SourceName="Microsoft-Windows-TaskScheduler" EventCode=* Type=Avertissement) OR (sourcetype="wineventlog:*" "Type=Critique" RecordNumber) OR (sourcetype="WinEventLog:Windows PowerShell" EventCode = 400 OR EventCode = 600  RecordNumber) 
|  stats count by Type SourceName 
| eval SourceName=case(match(SourceName,"^McAfee"),"McAfee", (Type=="Avertissement" AND match(sourcetype,"WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Operational", (match(sourcetype,"^WinEventLog\:Microsoft-Windows-TaskScheduler\/Operational")),"Task Scheduler Sysmon", (match(sourcetype,"^WinEventLog\:") AND Type=="Critique"), "Winevents", true(),"OTHERS")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 Apr 2018 09:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310245#M39696</guid>
      <dc:creator>TISKAR</dc:creator>
      <dc:date>2018-04-03T09:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: add column on a dashboard</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310246#M39697</link>
      <description>&lt;P&gt;it"s almost perfect!&lt;BR /&gt;
for Sheduled tasks operational and scheduled tasks sysmon, i want a name, toto for the first, titi for the second&lt;BR /&gt;
and i want just erreur Critique for the 4 sourcetype&lt;BR /&gt;
i try but i dont reach....&lt;BR /&gt;
thanks&lt;/P&gt;</description>
      <pubDate>Tue, 03 Apr 2018 10:56:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/add-column-on-a-dashboard/m-p/310246#M39697</guid>
      <dc:creator>jip31jip31</dc:creator>
      <dc:date>2018-04-03T10:56:26Z</dc:date>
    </item>
  </channel>
</rss>

