<?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 How to implement a logic to build dashboard using the token as a common input field for all the panels? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-implement-a-logic-to-build-dashboard-using-the-token-as-a/m-p/429253#M28277</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;
 Currently, I have been requested to build a dashboard to pull the IP address information from various sources of an index.&lt;BR /&gt;
 Based on the requirement, I had created a two common input field (Text input and Time picker input) using the token to sync the value to all the panels.&lt;/P&gt;

&lt;P&gt;Dashboard Panel output Details:&lt;BR /&gt;
1) Host Name (DNS resolved lookup) &lt;BR /&gt;
2) DNS queries for this IP address&lt;BR /&gt;
3) DHCP history for this IP address&lt;BR /&gt;
4) Firewall log for this IP address &lt;BR /&gt;
5) Proxy log for this IP address &lt;BR /&gt;
6) Citrix connection for this IP address&lt;/P&gt;

&lt;P&gt;All the above dashboard panels share different index details but they have these one field common "src".&lt;/P&gt;

&lt;P&gt;Challenge: using the common field "src" I have passed the token value but I am finding it difficult to get the output for all the six dashboard panels.&lt;/P&gt;

&lt;P&gt;EXample:&lt;/P&gt;

&lt;P&gt;Suppose if the IP address is 10.140.20.22, when this applied in the input token and filter with time picker, I am getting the output to some of the dashboard panels, for other dashboards it shows no result found.&lt;/P&gt;

&lt;P&gt;Query Details:&lt;BR /&gt;
Dashboard 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network sourcetype=infoblox:network:dhcp src="$IP$" | dedup src | lookup dnslookup clientip as src OUTPUT clienthost as Hostname | table  Hostname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Dashboard 5:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=application sourcetype=citrix:netscaler:syslog  | rex field=src "(?(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}))" | search src="$IP$" | rename src as Source |table Source Destination NatIP Vserver dvc 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this panel, I am getting no result found. &lt;/P&gt;

&lt;P&gt;Exact requirement: &lt;/P&gt;

&lt;P&gt;Need to know whether the logic is correct by taking the common field as "SRC" and passing the input value to this field. &lt;/P&gt;

&lt;P&gt;Kindly guide me on this.&lt;/P&gt;</description>
    <pubDate>Tue, 29 May 2018 05:59:28 GMT</pubDate>
    <dc:creator>Hemnaath</dc:creator>
    <dc:date>2018-05-29T05:59:28Z</dc:date>
    <item>
      <title>How to implement a logic to build dashboard using the token as a common input field for all the panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-implement-a-logic-to-build-dashboard-using-the-token-as-a/m-p/429253#M28277</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;
 Currently, I have been requested to build a dashboard to pull the IP address information from various sources of an index.&lt;BR /&gt;
 Based on the requirement, I had created a two common input field (Text input and Time picker input) using the token to sync the value to all the panels.&lt;/P&gt;

&lt;P&gt;Dashboard Panel output Details:&lt;BR /&gt;
1) Host Name (DNS resolved lookup) &lt;BR /&gt;
2) DNS queries for this IP address&lt;BR /&gt;
3) DHCP history for this IP address&lt;BR /&gt;
4) Firewall log for this IP address &lt;BR /&gt;
5) Proxy log for this IP address &lt;BR /&gt;
6) Citrix connection for this IP address&lt;/P&gt;

&lt;P&gt;All the above dashboard panels share different index details but they have these one field common "src".&lt;/P&gt;

&lt;P&gt;Challenge: using the common field "src" I have passed the token value but I am finding it difficult to get the output for all the six dashboard panels.&lt;/P&gt;

&lt;P&gt;EXample:&lt;/P&gt;

&lt;P&gt;Suppose if the IP address is 10.140.20.22, when this applied in the input token and filter with time picker, I am getting the output to some of the dashboard panels, for other dashboards it shows no result found.&lt;/P&gt;

&lt;P&gt;Query Details:&lt;BR /&gt;
Dashboard 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=network sourcetype=infoblox:network:dhcp src="$IP$" | dedup src | lookup dnslookup clientip as src OUTPUT clienthost as Hostname | table  Hostname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Dashboard 5:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=application sourcetype=citrix:netscaler:syslog  | rex field=src "(?(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}))" | search src="$IP$" | rename src as Source |table Source Destination NatIP Vserver dvc 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;In this panel, I am getting no result found. &lt;/P&gt;

&lt;P&gt;Exact requirement: &lt;/P&gt;

&lt;P&gt;Need to know whether the logic is correct by taking the common field as "SRC" and passing the input value to this field. &lt;/P&gt;

&lt;P&gt;Kindly guide me on this.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 05:59:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-implement-a-logic-to-build-dashboard-using-the-token-as-a/m-p/429253#M28277</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-05-29T05:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to implement a logic to build dashboard using the token as a common input field for all the panels?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-implement-a-logic-to-build-dashboard-using-the-token-as-a/m-p/429254#M28278</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;your regex/rex is broken.&lt;/P&gt;

&lt;P&gt;You use &lt;CODE&gt;rex field=src "(?(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3})).&lt;/CODE&gt;&lt;BR /&gt;
When you put that regex into regex101.com, &lt;A href="https://regex101.com/r/940sMz/1"&gt;you'll see it's not valid&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;So, let's start by fixing the regex - use &lt;CODE&gt;rex "(?&amp;lt;src&amp;gt;(\d{1,3}).(\d{1,3}).(\d{1,3}).(\d{1,3}))&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;I also removed the &lt;CODE&gt;src=field&lt;/CODE&gt;, because that does tell &lt;CODE&gt;rex&lt;/CODE&gt; in which field to search, not to which field to extract to.&lt;BR /&gt;
You most likely want to use in the complete event (which would be &lt;CODE&gt;field=_raw&lt;/CODE&gt;, which is also the default for &lt;CODE&gt;rex&lt;/CODE&gt;).&lt;/P&gt;

&lt;P&gt;So, the line above should properly extract the IP address to the src field, and you should be able to search for it with your token.&lt;/P&gt;

&lt;P&gt;Hope that helps - if it does I'd be happy if you would upvote/accept this answer, so others could profit from it. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 07:03:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-implement-a-logic-to-build-dashboard-using-the-token-as-a/m-p/429254#M28278</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-29T07:03:00Z</dc:date>
    </item>
  </channel>
</rss>

