<?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 to build a dynamic dashboard for ad events? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422710#M27866</link>
    <description>&lt;P&gt;You might try swapping the 2 &lt;CODE&gt;BY user&lt;/CODE&gt; portions for &lt;CODE&gt;BY user host&lt;/CODE&gt;.  The general concept is sound and will work but may require some adjustment.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Jun 2019 17:25:32 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2019-06-17T17:25:32Z</dc:date>
    <item>
      <title>How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422706#M27862</link>
      <description>&lt;P&gt;Hi team!&lt;/P&gt;

&lt;P&gt;I need a dashboard that shows when a windows account is blocked. Eventcode = 4740 but at the same time I want it to disappear if after a time it  finds the Eventcode = 4767 (When the account has been unlocked)&lt;/P&gt;

&lt;P&gt;I only want to show blocked accounts&lt;/P&gt;

&lt;P&gt;It is possible to do something like that&lt;/P&gt;

&lt;P&gt;This is what I have. Any advice?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main (EventCode=4740 AND EventCode!=4767) | stats values(host), values(EventCodeDescription), values(Nombre_de_cuenta),values(Nombre_de_equipo_del_autor_de_la_llamada), values(action) by _time 
| rename values(host) as "DC Server", values(EventCodeDescription) as Description, values(Nombre_de_cuenta) as "Nombre de la cuenta",values(Nombre_de_equipo_del_autor_de_la_llamada) as "Equipo que ha bloqueado la cuenta de usuario", values(action) as Action, _time as Date
| convert timeformat="%m/%d/%Y %H:%M:%S" ctime(Date)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jun 2019 13:05:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422706#M27862</guid>
      <dc:creator>christianubeda</dc:creator>
      <dc:date>2019-06-14T13:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422707#M27863</link>
      <description>&lt;P&gt;@christianubeda,&lt;/P&gt;

&lt;P&gt;Does this work for you ?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main (EventCode=4740 OR EventCode=4767) 
|stats latest(Eventcode ) as Eventcode ... "other required fields here"  by Account_Field_Name
|where Eventcode=4740
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Jun 2019 14:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422707#M27863</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-06-14T14:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422708#M27864</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main (EventCode="4740" OR EventCode="4767")
| eventsats first(EventCode) AS MostRecentEventCode BY user
| where MostRecentEventCode!="4767"
| stats count first(_raw) AS _raw first(_time) AS _time BY user
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 Jun 2019 23:02:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422708#M27864</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-16T23:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422709#M27865</link>
      <description>&lt;P&gt;Thanks for your answer.&lt;/P&gt;

&lt;P&gt;I've tried but it's not working.&lt;/P&gt;

&lt;P&gt;I have the case in which he shows me a blocking event (4740) but after 20 minutes an unlocking event appears(4767) so he should not be showing me the previous events. But it do.&lt;/P&gt;

&lt;P&gt;Any ideas?&lt;/P&gt;

&lt;P&gt;index=main (EventCode="4740" OR EventCode="4767")&lt;BR /&gt;
 | eventstats first(EventCode) AS MostRecentEventCode BY Nombre_de_cuenta&lt;BR /&gt;
 | where MostRecentEventCode!="4767"&lt;BR /&gt;
| stats values(host), values(EventCodeDescription), values(Nombre_de_cuenta),values(Nombre_de_equipo_del_autor_de_la_llamada), values(action) by _time&lt;BR /&gt;
| rename values(host) as "DC Server", values(EventCodeDescription) as Description, values(Nombre_de_cuenta) as "Nombre de la cuenta",values(Nombre_de_equipo_del_autor_de_la_llamada) as "Equipo que ha bloqueado la cuenta de usuario", values(action) as Action, _time as Date&lt;BR /&gt;
| convert timeformat="%m/%d/%Y %H:%M:%S" ctime(Date)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:59:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422709#M27865</guid>
      <dc:creator>christianubeda</dc:creator>
      <dc:date>2020-09-30T00:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422710#M27866</link>
      <description>&lt;P&gt;You might try swapping the 2 &lt;CODE&gt;BY user&lt;/CODE&gt; portions for &lt;CODE&gt;BY user host&lt;/CODE&gt;.  The general concept is sound and will work but may require some adjustment.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Jun 2019 17:25:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422710#M27866</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-06-17T17:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422711#M27867</link>
      <description>&lt;P&gt;I have an idea!&lt;/P&gt;

&lt;P&gt;With this I have events with 2 EventCode&lt;/P&gt;

&lt;P&gt;index=main (EventCode="4740" OR EventCode="4767") | eventstats first(EventCode) AS MostRecentEventCode BY Nombre_de_cuenta &lt;BR /&gt;
| stats values(_time), values(EventCode) by Nombre_de_cuenta&lt;/P&gt;

&lt;P&gt;And if I merge the two eventcodes into a single field and get something like "47404767"&lt;/P&gt;

&lt;P&gt;So I can do | where MostRecentEventCode!="4767" or MostRecentEventCode!="47404767"&lt;/P&gt;

&lt;P&gt;Can I do it? How?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422711#M27867</guid>
      <dc:creator>christianubeda</dc:creator>
      <dc:date>2020-09-30T00:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to build a dynamic dashboard for ad events?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422712#M27868</link>
      <description>&lt;P&gt;I did that and works,&lt;/P&gt;

&lt;P&gt;index=main (EventCode=4740 OR EventCode=4767)&lt;BR /&gt;&lt;BR /&gt;
| stats  values(EventCode) as MostRecentEventCode, values(host) values(Nombre_de_equipo_del_autor_de_la_llamada), values(action), values(_time), values(name) by Nombre_de_cuenta | mvcombine delim="" MostRecentEventCode | nomv MostRecentEventCode&lt;BR /&gt;
| where MostRecentEventCode!="4767" AND MostRecentEventCode!="4740 4767" | rename values(host) as "DC Server", values(name) as Description, Nombre_de_cuenta as "Nombre de la cuenta",values(Nombre_de_equipo_del_autor_de_la_llamada) as "Equipo que ha bloqueado la cuenta de usuario", values(action) as Action, values(_time) as Date&lt;BR /&gt;
| convert timeformat="%m/%d/%Y %H:%M:%S" ctime(Date) &lt;BR /&gt;
| table "Nombre de la cuenta" "Equipo que ha bloqueado la cuenta de usuario" Description Action Date&lt;/P&gt;

&lt;P&gt;| mvcombine delim="" MostRecentEventCode | nomv MostRecentEventCode&lt;/P&gt;

&lt;P&gt;It works! Thank you&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-build-a-dynamic-dashboard-for-ad-events/m-p/422712#M27868</guid>
      <dc:creator>christianubeda</dc:creator>
      <dc:date>2020-09-30T00:57:19Z</dc:date>
    </item>
  </channel>
</rss>

