<?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: Make a Chart by 2 fields in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547859#M155362</link>
    <description>&lt;P&gt;Assuming you have access to the individual events and don't need to unpack the table, and also assuming you want the count of method events by ip not the sum of the connection times, try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| gentimes start=-1000
| eval ip="10.10.107.".tostring(random() % 5 + 10)
| eval method=mvindex(split("GET,HEAD,OPTIONS,PMFK,POST,PROPFIND",","),(random() % 6))
| eval connect_time=round(random() % 1000,0)
``` The above generates some dummy data ```

``` Count events by ip and method ```
| stats count by ip method
``` Organise data so method is x-axis, line for each ip and count is y-axis ```
| xyseries method ip count&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 14 Apr 2021 08:18:06 GMT</pubDate>
    <dc:creator>ITWhisperer</dc:creator>
    <dc:date>2021-04-14T08:18:06Z</dc:date>
    <item>
      <title>Make a Chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547815#M155344</link>
      <description>&lt;P&gt;Hi guys, I want make a chart with the value below. With IP is the separated line, and connections is the value, apache_method is the X-Axis&lt;/P&gt;&lt;P&gt;apache_method IP &amp;nbsp;Connect_time&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;GET&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;10.10.107.10&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;10.10.107.14&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;29&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;13222&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;HEAD&lt;/TD&gt;&lt;TD&gt;10.10.107.14&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;OPTIONS&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;10.10.107.14&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;::1&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;12&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;15&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PMFK&lt;/TD&gt;&lt;TD&gt;10.10.107.14&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;POST&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;10.10.107.12&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;10.10.107.14&lt;/DIV&gt;&lt;/TD&gt;&lt;TD&gt;&lt;DIV class="multivalue-subcell"&gt;5&lt;/DIV&gt;&lt;DIV class="multivalue-subcell"&gt;38636&lt;/DIV&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;PROPFIND&lt;/TD&gt;&lt;TD&gt;10.10.107.14&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Wed, 14 Apr 2021 02:18:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547815#M155344</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2021-04-14T02:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547817#M155345</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lnn2204_0-1618366744561.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13753i9CFF7A95973D5C00/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lnn2204_0-1618366744561.png" alt="lnn2204_0-1618366744561.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;lnn2204_0-1618366744561.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This my chart now, how to make the line is separated IP address&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 02:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547817#M155345</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2021-04-14T02:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547859#M155362</link>
      <description>&lt;P&gt;Assuming you have access to the individual events and don't need to unpack the table, and also assuming you want the count of method events by ip not the sum of the connection times, try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| gentimes start=-1000
| eval ip="10.10.107.".tostring(random() % 5 + 10)
| eval method=mvindex(split("GET,HEAD,OPTIONS,PMFK,POST,PROPFIND",","),(random() % 6))
| eval connect_time=round(random() % 1000,0)
``` The above generates some dummy data ```

``` Count events by ip and method ```
| stats count by ip method
``` Organise data so method is x-axis, line for each ip and count is y-axis ```
| xyseries method ip count&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 14 Apr 2021 08:18:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547859#M155362</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-04-14T08:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make a Chart by 2 fields</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547867#M155364</link>
      <description>&lt;P&gt;Thanks for your helping. But I just solved the problem, and I found that I can't use this search in real-time. I tried your solution, it's still not work too.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lnn2204_0-1618396651839.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/13760iE1A4ECC9D8FA5F75/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lnn2204_0-1618396651839.png" alt="lnn2204_0-1618396651839.png" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;lnn2204_0-1618396651839.png&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 10:37:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Make-a-Chart-by-2-fields/m-p/547867#M155364</guid>
      <dc:creator>lnn2204</dc:creator>
      <dc:date>2021-04-14T10:37:36Z</dc:date>
    </item>
  </channel>
</rss>

