<?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 Overlay/Heatmap Bar Chart in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388454#M6515</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a simple query as below.&lt;/P&gt;

&lt;P&gt;index=ABC&lt;BR /&gt;
| lookup ucmdb "Primary FQDN" as FQDN&lt;BR /&gt;
| search "Application Type"="Premium"&lt;BR /&gt;
| stats dc(FQDN) by os, vulnerability_id, FQDN, "Application Type", IP, Organization&lt;BR /&gt;
| lookup ABC.csv vulnerability_id&lt;BR /&gt;
| rangemap field=score None=0-0 Low=0.1-3.9 Medium=4.0-6.9 High=7.0-8.9 Critical=9.0-10.0&lt;BR /&gt;
| fields "Application Type" FQDN IP Organization os score vulnerability_id range&lt;/P&gt;

&lt;P&gt;Then I have below query referencing above report:&lt;/P&gt;

&lt;P&gt;| stats dc(vulnerability_id) by "Application Type"&lt;BR /&gt;
| sort by dc(vuln_id) Desc&lt;BR /&gt;
| rename "Business Element Display Label" AS "Premium Application", dc(vuln_id) AS "Vulnerabilities Count"&lt;BR /&gt;
| head 20&lt;/P&gt;

&lt;P&gt;Results are as expected. Now I want below.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/254571-heatmap.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I am trying to chart vulnerabilities count for several applications on column chart with overlay. I want each application to have something like attached that shows me the breakdown of different severities in colors stacked for each application. WHen I go to chart overlay settings, I see range and vulnerabilities choices but it is not producing what I need it to look like in Column chart.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 20:45:12 GMT</pubDate>
    <dc:creator>mbasharat</dc:creator>
    <dc:date>2020-09-29T20:45:12Z</dc:date>
    <item>
      <title>Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388454#M6515</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a simple query as below.&lt;/P&gt;

&lt;P&gt;index=ABC&lt;BR /&gt;
| lookup ucmdb "Primary FQDN" as FQDN&lt;BR /&gt;
| search "Application Type"="Premium"&lt;BR /&gt;
| stats dc(FQDN) by os, vulnerability_id, FQDN, "Application Type", IP, Organization&lt;BR /&gt;
| lookup ABC.csv vulnerability_id&lt;BR /&gt;
| rangemap field=score None=0-0 Low=0.1-3.9 Medium=4.0-6.9 High=7.0-8.9 Critical=9.0-10.0&lt;BR /&gt;
| fields "Application Type" FQDN IP Organization os score vulnerability_id range&lt;/P&gt;

&lt;P&gt;Then I have below query referencing above report:&lt;/P&gt;

&lt;P&gt;| stats dc(vulnerability_id) by "Application Type"&lt;BR /&gt;
| sort by dc(vuln_id) Desc&lt;BR /&gt;
| rename "Business Element Display Label" AS "Premium Application", dc(vuln_id) AS "Vulnerabilities Count"&lt;BR /&gt;
| head 20&lt;/P&gt;

&lt;P&gt;Results are as expected. Now I want below.&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/254571-heatmap.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;I am trying to chart vulnerabilities count for several applications on column chart with overlay. I want each application to have something like attached that shows me the breakdown of different severities in colors stacked for each application. WHen I go to chart overlay settings, I see range and vulnerabilities choices but it is not producing what I need it to look like in Column chart.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:45:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388454#M6515</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-29T20:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388455#M6516</link>
      <description>&lt;P&gt;@mbasharat, your &lt;CODE&gt;range&lt;/CODE&gt; field seem to have information to apply colors based on range to table cell. However, as per your query seems like range field is not present in the final table.&lt;/P&gt;

&lt;P&gt;If stats &lt;CODE&gt;by "Application Type"&lt;/CODE&gt; does not give you unique rows, how are you planning to apply range? There may be Applications belonging to different group fall into same range. I am not sure if the following solves your need, but you can perform count of vulnerabilities by range or by range and "Application Type"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;yourBaseSearch&amp;gt;
| stats dc(vulnerability_id) by range
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please provide a sample of your current tabular output and expected output.&lt;/P&gt;

&lt;P&gt;Several Table Coloring options are available in Splunk Enterprise version 6.5 or higher. Refer to documentation: &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Viz/TableFormatsFormatting#Column_color"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Viz/TableFormatsFormatting#Column_color&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can use Simple XML JS and CSS Extension as well to apply any color formatting as per your needs for example Table Row Color based on field/fields values. You can get &lt;A href="https://splunkbase.splunk.com/app/1603/"&gt;Splunk Dashboard Examples&lt;/A&gt; app for such examples or check out several examples already present on Splunk Answers.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 03:31:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388455#M6516</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-07-31T03:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388456#M6517</link>
      <description>&lt;P&gt;Hi Nikitniley,&lt;/P&gt;

&lt;P&gt;I actually know the formatting in table BUT I actually want this in column chart in 100% Stacked form just like in the attached image. &lt;/P&gt;

&lt;P&gt;When I tried "by range" instead of application type, it does show multiple columns in column chart showing different ranges and the count BUT I want it simply, Application ABC showing in column chart on x-axis, where one column is in stacked settings for each application showing different levels of severity in colors vertically n y-axis. using "by range" as above or "by Application" work as they should be but not like the way I require. &lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 12:50:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388456#M6517</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2018-07-31T12:50:16Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388457#M6518</link>
      <description>&lt;P&gt;@mbasharat Sorry I am unable to follow. What is the output you currently have and what is it that you need? Can you add mock up for both?&lt;/P&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:34:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388457#M6518</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-07-31T17:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388458#M6519</link>
      <description>&lt;P&gt;So, here is my query:&lt;/P&gt;

&lt;P&gt;index=ABC&lt;BR /&gt;
| lookup ucmdb "Primary FQDN" as FQDN&lt;BR /&gt;
| search "Application Type"="Premium"&lt;BR /&gt;
| stats dc(FQDN) by os, vulnerability_id, FQDN, "Application Type", IP, Organization&lt;BR /&gt;
| lookup ABC.csv vulnerability_id&lt;BR /&gt;
| rangemap field=score None=0-0 Low=0.1-3.9 Medium=4.0-6.9 High=7.0-8.9 Critical=9.0-10.0&lt;BR /&gt;
| fields "Application Type" FQDN IP Organization os score vulnerability_id range&lt;BR /&gt;
| stats dc(vulnerability_id) by "Application Type"&lt;BR /&gt;
| sort by dc(vuln_id) Desc&lt;BR /&gt;
| rename "Business Element Display Label" AS "Premium Application", dc(vuln_id) AS "Vulnerabilities Count"&lt;BR /&gt;
| head 20&lt;/P&gt;

&lt;P&gt;When column chart populates, it gives me Bars for each application showing Total of vulnerabilities for each application. What I additionally want is that I want to see each application's bar with kind of heatmap showing me breakdown of vulnerabilities count by severity in colors as requested in attached screenshots. I hope I explained it right.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:45:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388458#M6519</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-29T20:45:56Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388459#M6520</link>
      <description>&lt;P&gt;If  &lt;CODE&gt;| stats dc(vulnerability_id) by "Application Type"&lt;/CODE&gt; is working fine&lt;BR /&gt;
Can you try following chart instead of stats and confirm?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| chart dc(vulnerability_id) by "Application Type" score 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is a run anywhere search based on Splunk's _internal index which uses date_seconds instead of vulnerability_id, component instead of "Application Type" and log_level instead of score.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal sourcetype=splunkd component!="Metrics" AND component!="PeriodicHealthReporter" AND component!="ExecProcessor"
| chart dc(date_second) by component log_level
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:46:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388459#M6520</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-29T20:46:05Z</dc:date>
    </item>
    <item>
      <title>Re: Overlay/Heatmap Bar Chart</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388460#M6521</link>
      <description>&lt;P&gt;When I do &lt;STRONG&gt;| chart dc(vulnerability_id) by "Application Type" score&lt;/STRONG&gt; I am getting error that "error in chart command, the output field "score" cannot have the same name as group by field""&lt;/P&gt;

&lt;P&gt;But, when I do by range &lt;STRONG&gt;| chart dc(vulnerability_id) by "Application Type" range&lt;/STRONG&gt;, I am getting the column charts for each application with the count for each severity and thats good. And then I have done it with 100% stacked mode and that makes it exactly what I was looking for!!&lt;/P&gt;

&lt;P&gt;SO the last piece is left here for top 20 ones. When I do below, I am not getting the top 20 values with the highest count ones first.&lt;/P&gt;

&lt;P&gt;| chart dc(vulnerability_id) by "Application Type" range&lt;BR /&gt;
| sort by dc(vuln_id) Desc&lt;BR /&gt;
| rename "Business Element Display Label" AS "Premium Application", dc(vuln_id) AS "Vulnerabilities Count"&lt;BR /&gt;
| head 20&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/Overlay-Heatmap-Bar-Chart/m-p/388460#M6521</guid>
      <dc:creator>mbasharat</dc:creator>
      <dc:date>2020-09-29T20:46:20Z</dc:date>
    </item>
  </channel>
</rss>

