<?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: Is it possible to customize Wazuh -&amp;gt; Overview -&amp;gt; Security Events Dashboard? in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432667#M53100</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Yes, you can customize or remove charts if you need to. To do that you will have to modify the Wazuh App js/html code but it's quite simple I will explain you how to do it:&lt;/P&gt;

&lt;P&gt;-That specific dashboard you mentioned, Wazuh -&amp;gt; Overview -&amp;gt; Security Events Dashboard,  can be found here: &lt;CODE&gt;{{SPLUNK_DIR}}/etc/apps/SplunkAppForWazuh/appserver/static/js/controllers/overview/general/&lt;/CODE&gt; in my case is &lt;CODE&gt;/opt/splunk/etc/apps/SplunkAppForWazuh/appserver/static/js/controllers/overview/general/&lt;/CODE&gt;&lt;BR /&gt;
In that folder you will find 2 files:&lt;BR /&gt;
&lt;CODE&gt;overviewGeneralCtrl.js&lt;/CODE&gt; -&amp;gt; Here you will find all chart queries used to request data to splunk&lt;BR /&gt;
&lt;CODE&gt;overview-general.html&lt;/CODE&gt; -&amp;gt; Here you will find the HTML code that creates the view.&lt;/P&gt;

&lt;P&gt;-If you want to remove a chart you can do that by simply removing it from the &lt;CODE&gt;overview-general.html&lt;/CODE&gt;.&lt;BR /&gt;
For example if we want to remove "Top 5 rule groups" chart,&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7223i3F31A86C92D4C1FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
We can easily find that chart doing a search by its name &lt;CODE&gt;Top 5 rule groups&lt;/CODE&gt; and we will find this following &lt;CODE&gt;&amp;lt;md-card &amp;gt;...&amp;lt;/md-card&amp;gt;&lt;/CODE&gt; in the &lt;CODE&gt;.html&lt;/CODE&gt; file:&lt;BR /&gt;
 ```&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[3]}"&amp;gt;
    &amp;lt;md-card-content class="wazuh-column"&amp;gt;
      &amp;lt;span class="wz-headline-title"&amp;gt;Top 5 rule groups
        &amp;lt;span class="wz-text-link" style="float:right;" ng-click="expand(3,'top5ruleGroups')"&amp;gt;
          &amp;lt;wz-svg icon="expand"&amp;gt;&amp;lt;/wz-svg&amp;gt;
        &amp;lt;/span&amp;gt;
      &amp;lt;/span&amp;gt;
      &amp;lt;md-divider class="wz-margin-top-10"&amp;gt;&amp;lt;/md-divider&amp;gt;
      &amp;lt;div id='top5ruleGroups'&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/md-card-content&amp;gt;
  &amp;lt;/md-card&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;``&lt;CODE&gt;&lt;BR /&gt;
So all we have to do is to remove that&lt;/CODE&gt;&lt;MD-CARD&gt;...&lt;/MD-CARD&gt;` block and the chart will be removed.&lt;BR /&gt;
Once you removed that block of code you should restart splunk (/opt/splunk/bin/splunk restart)&lt;BR /&gt;
If  after following these steps, the chart is still being shown in the dashboard, try clearing your browser cookies and cache.&lt;/P&gt;

&lt;P&gt;-What if we want to customize a specific chart and do a different search in it?&lt;BR /&gt;
In your &lt;CODE&gt;file.html&lt;/CODE&gt;:&lt;BR /&gt;
1-Change the chart title, in my case I replaced "Top 5 rule groups" with "This is an example".&lt;BR /&gt;
2-We will need the id of the chart in this example &lt;CODE&gt;id="top5ruleGroups"&lt;/CODE&gt; in order to modify the query of that search.&lt;/P&gt;

&lt;P&gt;Now in your file &lt;CODE&gt;.js&lt;/CODE&gt; (in this example, overviewGeneralCtrl.js), you will find the following block code containing the previous id = &lt;CODE&gt;'top5ruleGroups'&lt;/CODE&gt;:&lt;BR /&gt;
```&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    new PieChart(
      'top5ruleGroups',
      `${this.filters} sourcetype=wazuh | top rule.groups{} limit=5`,
      'top5ruleGroups',
      this.scope
    ),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
As you can see,  we can know this query belongs to that chart because it has the same id `top5ruleGroups`.&lt;BR /&gt;
The search query is  `${this.filters} sourcetype=wazuh | top rule.groups{} limit=5`, so all we have to do is to replace that query after the single vertical bar (|), for example, I will change it for a dummy search by`rule.level` &lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    new PieChart(
      'top5ruleGroups',
      `${this.filters} sourcetype=wazuh | top rule.level limit=5`,
      'top5ruleGroups',
      this.scope
    ),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;``&lt;CODE&gt;&lt;BR /&gt;
Also note that&lt;/CODE&gt;${this.filters}` should not be modified as it applies some implicit filters to make the search over our wazuh index.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7224i868E11D6BA515D0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;As you can see our old "Top 5 rule groups" chart has been replaced with our "This is an example" chart and the chart is showing the top 5 rule levels.&lt;/P&gt;

&lt;P&gt;I hope this helps, it may be a little bit messy but if you need anything else I will be happy to help.&lt;BR /&gt;
 I also encourage you to ask or make any suggestion in our github repository (&lt;A href="https://github.com/wazuh/wazuh-splunk"&gt;https://github.com/wazuh/wazuh-splunk&lt;/A&gt;) if you have any question we will be glad to help.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jun 2019 14:01:17 GMT</pubDate>
    <dc:creator>wazuh</dc:creator>
    <dc:date>2019-06-18T14:01:17Z</dc:date>
    <item>
      <title>Is it possible to customize Wazuh -&gt; Overview -&gt; Security Events Dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432666#M53099</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;

&lt;P&gt;Is it possible to customize Wazuh -&amp;gt; Overview -&amp;gt; Security Events Dashboard? and remove several charts?&lt;/P&gt;

&lt;P&gt;Do I need to modify js code?&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 09:00:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432666#M53099</guid>
      <dc:creator>rus7ambts</dc:creator>
      <dc:date>2019-06-18T09:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to customize Wazuh -&gt; Overview -&gt; Security Events Dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432667#M53100</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Yes, you can customize or remove charts if you need to. To do that you will have to modify the Wazuh App js/html code but it's quite simple I will explain you how to do it:&lt;/P&gt;

&lt;P&gt;-That specific dashboard you mentioned, Wazuh -&amp;gt; Overview -&amp;gt; Security Events Dashboard,  can be found here: &lt;CODE&gt;{{SPLUNK_DIR}}/etc/apps/SplunkAppForWazuh/appserver/static/js/controllers/overview/general/&lt;/CODE&gt; in my case is &lt;CODE&gt;/opt/splunk/etc/apps/SplunkAppForWazuh/appserver/static/js/controllers/overview/general/&lt;/CODE&gt;&lt;BR /&gt;
In that folder you will find 2 files:&lt;BR /&gt;
&lt;CODE&gt;overviewGeneralCtrl.js&lt;/CODE&gt; -&amp;gt; Here you will find all chart queries used to request data to splunk&lt;BR /&gt;
&lt;CODE&gt;overview-general.html&lt;/CODE&gt; -&amp;gt; Here you will find the HTML code that creates the view.&lt;/P&gt;

&lt;P&gt;-If you want to remove a chart you can do that by simply removing it from the &lt;CODE&gt;overview-general.html&lt;/CODE&gt;.&lt;BR /&gt;
For example if we want to remove "Top 5 rule groups" chart,&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7223i3F31A86C92D4C1FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;BR /&gt;
We can easily find that chart doing a search by its name &lt;CODE&gt;Top 5 rule groups&lt;/CODE&gt; and we will find this following &lt;CODE&gt;&amp;lt;md-card &amp;gt;...&amp;lt;/md-card&amp;gt;&lt;/CODE&gt; in the &lt;CODE&gt;.html&lt;/CODE&gt; file:&lt;BR /&gt;
 ```&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;  &amp;lt;md-card flex="33" class="wz-md-card" ng-class="{'fullscreen': expandArray[3]}"&amp;gt;
    &amp;lt;md-card-content class="wazuh-column"&amp;gt;
      &amp;lt;span class="wz-headline-title"&amp;gt;Top 5 rule groups
        &amp;lt;span class="wz-text-link" style="float:right;" ng-click="expand(3,'top5ruleGroups')"&amp;gt;
          &amp;lt;wz-svg icon="expand"&amp;gt;&amp;lt;/wz-svg&amp;gt;
        &amp;lt;/span&amp;gt;
      &amp;lt;/span&amp;gt;
      &amp;lt;md-divider class="wz-margin-top-10"&amp;gt;&amp;lt;/md-divider&amp;gt;
      &amp;lt;div id='top5ruleGroups'&amp;gt;&amp;lt;/div&amp;gt;
    &amp;lt;/md-card-content&amp;gt;
  &amp;lt;/md-card&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;``&lt;CODE&gt;&lt;BR /&gt;
So all we have to do is to remove that&lt;/CODE&gt;&lt;MD-CARD&gt;...&lt;/MD-CARD&gt;` block and the chart will be removed.&lt;BR /&gt;
Once you removed that block of code you should restart splunk (/opt/splunk/bin/splunk restart)&lt;BR /&gt;
If  after following these steps, the chart is still being shown in the dashboard, try clearing your browser cookies and cache.&lt;/P&gt;

&lt;P&gt;-What if we want to customize a specific chart and do a different search in it?&lt;BR /&gt;
In your &lt;CODE&gt;file.html&lt;/CODE&gt;:&lt;BR /&gt;
1-Change the chart title, in my case I replaced "Top 5 rule groups" with "This is an example".&lt;BR /&gt;
2-We will need the id of the chart in this example &lt;CODE&gt;id="top5ruleGroups"&lt;/CODE&gt; in order to modify the query of that search.&lt;/P&gt;

&lt;P&gt;Now in your file &lt;CODE&gt;.js&lt;/CODE&gt; (in this example, overviewGeneralCtrl.js), you will find the following block code containing the previous id = &lt;CODE&gt;'top5ruleGroups'&lt;/CODE&gt;:&lt;BR /&gt;
```&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    new PieChart(
      'top5ruleGroups',
      `${this.filters} sourcetype=wazuh | top rule.groups{} limit=5`,
      'top5ruleGroups',
      this.scope
    ),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;CODE&gt;&lt;BR /&gt;
As you can see,  we can know this query belongs to that chart because it has the same id `top5ruleGroups`.&lt;BR /&gt;
The search query is  `${this.filters} sourcetype=wazuh | top rule.groups{} limit=5`, so all we have to do is to replace that query after the single vertical bar (|), for example, I will change it for a dummy search by`rule.level` &lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    new PieChart(
      'top5ruleGroups',
      `${this.filters} sourcetype=wazuh | top rule.level limit=5`,
      'top5ruleGroups',
      this.scope
    ),
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;``&lt;CODE&gt;&lt;BR /&gt;
Also note that&lt;/CODE&gt;${this.filters}` should not be modified as it applies some implicit filters to make the search over our wazuh index.&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/7224i868E11D6BA515D0C/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;As you can see our old "Top 5 rule groups" chart has been replaced with our "This is an example" chart and the chart is showing the top 5 rule levels.&lt;/P&gt;

&lt;P&gt;I hope this helps, it may be a little bit messy but if you need anything else I will be happy to help.&lt;BR /&gt;
 I also encourage you to ask or make any suggestion in our github repository (&lt;A href="https://github.com/wazuh/wazuh-splunk"&gt;https://github.com/wazuh/wazuh-splunk&lt;/A&gt;) if you have any question we will be glad to help.&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 14:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432667#M53100</guid>
      <dc:creator>wazuh</dc:creator>
      <dc:date>2019-06-18T14:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to customize Wazuh -&gt; Overview -&gt; Security Events Dashboard?</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432668#M53101</link>
      <description>&lt;P&gt;Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 04:41:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Is-it-possible-to-customize-Wazuh-gt-Overview-gt-Security-Events/m-p/432668#M53101</guid>
      <dc:creator>rus7ambts</dc:creator>
      <dc:date>2019-06-19T04:41:44Z</dc:date>
    </item>
  </channel>
</rss>

