<?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: Can I use icons dynamically without a lookup? Flow Map Viz in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496159#M61002</link>
    <description>&lt;P&gt;Hi @Bimord&lt;/P&gt;

&lt;P&gt;I can appreciate that this is quite confusing, but you need to output two different "types" of rows. The path rows and the node rows. So your query here is going to create "path rows" &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application"
| stats sum(eval(event_severity_code="SUCCESS")) as good
sum(eval(event_severity_code="ERROR")) as errors
sum(eval(event_severity_code="WARNING")) as warn by host
| eval to=host, from="BEL"
| table to from good warn error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you then need to add on the node rows. One way to do that, is a query like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval raw = "
node=BEL label=\"My Bel\" icon=users labely=30 height=40  ### 
node=host1 icon=tablet labely=30 height=40  ### 
node=host2 icon=database labely=30 height=40 "
| makemv delim="###" raw
| mvexpand raw 
| rename raw  as  _raw 
| extract
| table node label icon labely height 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and finally combine both queries together like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application"
| stats sum(eval(event_severity_code="SUCCESS")) as good
sum(eval(event_severity_code="ERROR")) as errors
sum(eval(event_severity_code="WARNING")) as warn by host
| eval to=host, from="BEL"
| append [| makeresults
| eval raw = "node=BEL label=\"My label\" icon=users labely=30 height=40  ### 
    node=host1 icon=tablet labely=30 height=40  ### 
    node=host2 icon=database labely=30 height=40 "
    | makemv delim="###" raw
    | mvexpand raw 
    | rename raw  as  _raw 
    | extract ]
| table to from good warn error node icon labely label height 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
    <pubDate>Mon, 16 Mar 2020 04:19:35 GMT</pubDate>
    <dc:creator>chrisyounger</dc:creator>
    <dc:date>2020-03-16T04:19:35Z</dc:date>
    <item>
      <title>Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496158#M61001</link>
      <description>&lt;P&gt;I am trying to use the Flow Viz Map app with dynamic values utilizing the icons but am having...&lt;/P&gt;

&lt;P&gt;This is what I have so far (only drawing one 'tablet' OR the 2 'database' elements but not both and no flow is visable):&lt;/P&gt;

&lt;P&gt;index=main sourcetype="*:application" &lt;BR /&gt;
| stats sum(eval(event_severity_code="SUCCESS")) as good &lt;BR /&gt;
    sum(eval(event_severity_code="ERROR")) as errors &lt;BR /&gt;
    sum(eval(event_severity_code="WARNING")) as warn by host &lt;BR /&gt;
| eval path=if(like(host,"business%"),"BEL---"+host,"")&lt;BR /&gt;
| eval node="BEL"     &lt;CODE&gt;how do I add more than one node?&lt;/CODE&gt;&lt;BR /&gt;
| eval icon=if(match(node,"BEL"),"tablet","database")&lt;BR /&gt;
| table path node good warn error icon&lt;/P&gt;

&lt;P&gt;This second query returns correct results but with no icons: &lt;/P&gt;

&lt;P&gt;index=main sourcetype="*:application" &lt;BR /&gt;
| stats sum(eval(event_severity_code="SUCCESS")) as good &lt;BR /&gt;
sum(eval(event_severity_code="ERROR")) as errors &lt;BR /&gt;
sum(eval(event_severity_code="WARNING")) as warn by host &lt;BR /&gt;
| eval to=host, from="BEL"&lt;BR /&gt;
| table to from good warn error&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/287605-capture.png" alt="no icons" /&gt;&lt;/P&gt;

&lt;P&gt;Any help would be appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Thank you @chrisyoungerjds for your help - I was able to achieve these results with your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/287607-capturegood.png" alt="with icons" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 04:38:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496158#M61001</guid>
      <dc:creator>bimord</dc:creator>
      <dc:date>2020-09-30T04:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496159#M61002</link>
      <description>&lt;P&gt;Hi @Bimord&lt;/P&gt;

&lt;P&gt;I can appreciate that this is quite confusing, but you need to output two different "types" of rows. The path rows and the node rows. So your query here is going to create "path rows" &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application"
| stats sum(eval(event_severity_code="SUCCESS")) as good
sum(eval(event_severity_code="ERROR")) as errors
sum(eval(event_severity_code="WARNING")) as warn by host
| eval to=host, from="BEL"
| table to from good warn error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So you then need to add on the node rows. One way to do that, is a query like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval raw = "
node=BEL label=\"My Bel\" icon=users labely=30 height=40  ### 
node=host1 icon=tablet labely=30 height=40  ### 
node=host2 icon=database labely=30 height=40 "
| makemv delim="###" raw
| mvexpand raw 
| rename raw  as  _raw 
| extract
| table node label icon labely height 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and finally combine both queries together like so:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application"
| stats sum(eval(event_severity_code="SUCCESS")) as good
sum(eval(event_severity_code="ERROR")) as errors
sum(eval(event_severity_code="WARNING")) as warn by host
| eval to=host, from="BEL"
| append [| makeresults
| eval raw = "node=BEL label=\"My label\" icon=users labely=30 height=40  ### 
    node=host1 icon=tablet labely=30 height=40  ### 
    node=host2 icon=database labely=30 height=40 "
    | makemv delim="###" raw
    | mvexpand raw 
    | rename raw  as  _raw 
    | extract ]
| table to from good warn error node icon labely label height 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps,&lt;BR /&gt;
Chris&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 04:19:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496159#M61002</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2020-03-16T04:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496160#M61003</link>
      <description>&lt;P&gt;Hi Chris -- Thanks for the speedy response &lt;/P&gt;

&lt;P&gt;The problem there is that the names of the hosts are often cycling so can't be hardcoded into a raw like that. Is it possible to do something like &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval raw = "node=BEL label=\"My label\" icon=users labely=30 height=40  ### 
 node=" + host + " icon=tablet labely=30 height=40 "
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 04:50:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496160#M61003</guid>
      <dc:creator>bimord</dc:creator>
      <dc:date>2020-03-16T04:50:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496161#M61004</link>
      <description>&lt;P&gt;Yep sorry I should have given you a better example. Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application"
 | stats sum(eval(event_severity_code="SUCCESS")) as good
 sum(eval(event_severity_code="ERROR")) as errors
 sum(eval(event_severity_code="WARNING")) as warn by host
 | eval to=host, from="BEL"
 | append [ search index=main sourcetype="*:application" | stats count by host | eval icon = "tablet" | rename host as node | table node icon ]
 | table to from good warn error node icon
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 05:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496161#M61004</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2020-03-16T05:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496162#M61005</link>
      <description>&lt;P&gt;Thankyou Chris -- this is perfect &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 05:21:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496162#M61005</guid>
      <dc:creator>bimord</dc:creator>
      <dc:date>2020-03-16T05:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496163#M61006</link>
      <description>&lt;P&gt;Good one. Glad it solved your problem.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 05:24:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496163#M61006</guid>
      <dc:creator>chrisyounger</dc:creator>
      <dc:date>2020-03-16T05:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can I use icons dynamically without a lookup? Flow Map Viz</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496164#M61007</link>
      <description>&lt;P&gt;I used both your solutions in the one to get the output i was hoping for &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=main sourcetype="*:application" 
      |  stats sum(eval(event_severity_code="SUCCESS")) as good sum(eval(event_severity_code="ERROR")) as errors sum(eval(event_severity_code="WARNING")) as warn by host 
            | eval from=host, to="BEL"
            | append 
              [| makeresults 
                | eval raw = "node=BEL label=\"BEL\" icon=cog" 
                | makemv delim="###" raw 
                | mvexpand raw 
                | rename raw as _raw 
                | extract ] 
            | append 
              [ search index=main sourcetype="*:application" 
                | stats count by host 
                | eval icon = "tablet" 
                | rename host as node 
                | table node icon ] 
            | table to from good warn error node icon label
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 05:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Can-I-use-icons-dynamically-without-a-lookup-Flow-Map-Viz/m-p/496164#M61007</guid>
      <dc:creator>bimord</dc:creator>
      <dc:date>2020-03-16T05:27:51Z</dc:date>
    </item>
  </channel>
</rss>

