<?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: Append static data to a field for charting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412063#M118817</link>
    <description>&lt;P&gt;This almost did what I need to.. the Count isn't showing up on the chart though. i.e. &lt;/P&gt;

&lt;P&gt;index=checkmarx&lt;BR /&gt;&lt;BR /&gt;
CxXMLResults.Query.Result.@state!=1&lt;BR /&gt;
CxXMLResults.Query.Result.@Severity!=Information&lt;BR /&gt;
| rename CxXMLResults.@ProjectName as ProjectName&lt;BR /&gt;
| rename CxXMLResults.@Team as Team&lt;BR /&gt;
| rename CxXMLResults.Query.Result.@Severity as Severity&lt;BR /&gt;
| rename CxXMLResults.Query.@name as VulnName&lt;BR /&gt;
| rename CxXMLResults.Query.Result.Path.@PathId as PathId&lt;BR /&gt;
| eval deduper=md5(Team.ProjectName.PathId)&lt;BR /&gt;
| dedup deduper&lt;BR /&gt;
| fillnull value=''&lt;BR /&gt;
| append [| makeresults | eval ProjectName="MyArbitraryProject", Severity="High", count=500] &lt;BR /&gt;
| chart count(Team) over ProjectName by Severity&lt;/P&gt;</description>
    <pubDate>Fri, 01 Mar 2019 16:06:11 GMT</pubDate>
    <dc:creator>zhatsispgx</dc:creator>
    <dc:date>2019-03-01T16:06:11Z</dc:date>
    <item>
      <title>Append static data to a field for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412061#M118815</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I am trying to append static data to a chart that splunk generates and i'm not sure how to do this with a lookup or anything. The end goal is to have additional x-axis entries (&lt;CODE&gt;ProjectNames&lt;/CODE&gt;) on my chart with arbitrary values for &lt;CODE&gt;Severity&lt;/CODE&gt;, alongside the actual real data found in our splunk index. Here is what it currently looks like:&lt;/P&gt;

&lt;P&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/6624i94E69CE467A90DD4/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;PRE&gt;&lt;CODE&gt;index=myindex
| rename CxXMLResults.@ProjectName as ProjectName
| rename CxXMLResults.@Team as Team
| rename CxXMLResults.Query.Result.@Severity as Severity
| rename CxXMLResults.Query.Result.Path.@PathId as PathId
| eval deduper=md5(Team.ProjectName.PathId)
| dedup deduper
| fillnull value=''
| append [eval ProjectName="MyArbitraryProject"] 
| chart count(Team) over ProjectName by Severity
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;in the &lt;CODE&gt;|append [eval ProjectName="MyArbitraryProject"]&lt;/CODE&gt; I Am trying to make a new project called "MyArbitraryProject" that will show up on the X axis, but obviously this doesn't work because I dont have &lt;CODE&gt;Severity&lt;/CODE&gt; values available for it. Please help! I'm stumped.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Feb 2019 23:51:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412061#M118815</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2019-02-28T23:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: Append static data to a field for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412062#M118816</link>
      <description>&lt;P&gt;Just want to add one row?&lt;/P&gt;

&lt;P&gt;| append [| makeresults |eval ProjectName="MyArbitraryProject",Severity="your Severity"] &lt;BR /&gt;
 | chart count(Team) over ProjectName by Severity&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 00:54:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412062#M118816</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2019-03-01T00:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: Append static data to a field for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412063#M118817</link>
      <description>&lt;P&gt;This almost did what I need to.. the Count isn't showing up on the chart though. i.e. &lt;/P&gt;

&lt;P&gt;index=checkmarx&lt;BR /&gt;&lt;BR /&gt;
CxXMLResults.Query.Result.@state!=1&lt;BR /&gt;
CxXMLResults.Query.Result.@Severity!=Information&lt;BR /&gt;
| rename CxXMLResults.@ProjectName as ProjectName&lt;BR /&gt;
| rename CxXMLResults.@Team as Team&lt;BR /&gt;
| rename CxXMLResults.Query.Result.@Severity as Severity&lt;BR /&gt;
| rename CxXMLResults.Query.@name as VulnName&lt;BR /&gt;
| rename CxXMLResults.Query.Result.Path.@PathId as PathId&lt;BR /&gt;
| eval deduper=md5(Team.ProjectName.PathId)&lt;BR /&gt;
| dedup deduper&lt;BR /&gt;
| fillnull value=''&lt;BR /&gt;
| append [| makeresults | eval ProjectName="MyArbitraryProject", Severity="High", count=500] &lt;BR /&gt;
| chart count(Team) over ProjectName by Severity&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2019 16:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412063#M118817</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2019-03-01T16:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: Append static data to a field for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412064#M118818</link>
      <description>&lt;P&gt;Give this a try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myindex
 | rename CxXMLResults.@ProjectName as ProjectName
 | rename CxXMLResults.@Team as Team
 | rename CxXMLResults.Query.Result.@Severity as Severity
 | rename CxXMLResults.Query.Result.Path.@PathId as PathId
 | eval deduper=md5(Team.ProjectName.PathId)
 | dedup deduper
 | fillnull value=''
 | chart count(Team) over ProjectName by Severity
 | fillnull value=0
 | append [| makeresults |eval ProjectName="MyArbitraryProject"]
 | fillnull value=500
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 19:35:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412064#M118818</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2019-03-01T19:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Append static data to a field for charting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412065#M118819</link>
      <description>&lt;P&gt;Close. Once I discovered &lt;CODE&gt;| makeresults&lt;/CODE&gt; thanks to @HiroshiSatoh I ended up with this that works&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...
| dedup deduper
| fillnull value=''
| append [| makeresults count=1000 | eval ProjectName="MyArbitraryProject" | eval Team="MyTeam" | eval Severity="UNKNOWN" ] 
| chart count(Team) over ProjectName by Severity
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 01 Mar 2019 21:02:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Append-static-data-to-a-field-for-charting/m-p/412065#M118819</guid>
      <dc:creator>zhatsispgx</dc:creator>
      <dc:date>2019-03-01T21:02:44Z</dc:date>
    </item>
  </channel>
</rss>

