<?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: Format Chart for Network Performance in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505311#M33504</link>
    <description>&lt;P&gt;I see. your query doesn't make &lt;STRONG&gt;table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;so, &lt;STRONG&gt;fields&amp;nbsp;&lt;/STRONG&gt;works wrong, I guess.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats latest(linkSpeedInKbps) as "Speed (in Kbps)"
, latest(macAddress) as "MAC"
, latest("stats.network.received_pkts") as "Rx Pkts"
, latest("stats.network.transmitted_pkts") as "Tx Pkts"
, latest("stats.network.dropped_received_pkts") as "Dropped Rx Pkts"
, latest("stats.network.dropped_transmitted_pkts") as "Dropped Tx Pkts"
, latest("stats.network.error_received_pkts") as "Rx Pkt Errors"
, latest("stats.network.error_transmitted_pkts") as "Tx Pkt Errors" by name&lt;/LI-CODE&gt;&lt;P&gt;that's enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jun 2020 04:48:18 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-06-20T04:48:18Z</dc:date>
    <item>
      <title>Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505206#M33490</link>
      <description>&lt;P&gt;Here is a sample of my log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
   NIC: {
     eth2: {
       linkSpeedInKbps: 10000000
       macAddress: XX:XX:XX:XX:XX:XX
       name: eth2
       stats: {
         network.dropped_received_pkts: 0
         network.dropped_transmitted_pkts: 0
         network.error_received_pkts: 0
         network.error_transmitted_pkts: 0
         network.received_pkts: 760176
         network.received_rate_kBps: 19842
         network.transmitted_pkts: 3140672
         network.transmitted_rate_kBps: 143753
       }
     }
     eth3: {
       linkSpeedInKbps: 10000000
       macAddress: XX:XX:XX:XX:XX:XX
       name: eth3
       stats: {
         network.dropped_received_pkts: 0
         network.dropped_transmitted_pkts: 0
         network.error_received_pkts: 0
         network.error_transmitted_pkts: 0
         network.received_pkts: 1068
         network.received_rate_kBps: 2
         network.transmitted_pkts: 2
         network.transmitted_rate_kBps: 0
       }
     }
   }
nodeName: MyServer01
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am capturing basic network information on the servers in my environment. I would like to format a dashboard to look something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="trb48_0-1592577849481.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9257iA72EC3A25E1F7B78/image-size/medium?v=v2&amp;amp;px=400" role="button" title="trb48_0-1592577849481.png" alt="trb48_0-1592577849481.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can't figure out how to get the chart to format correctly. I have tried the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mylogs sourcetype=serverstats nodeName=MyServer01

| chart  latest("NIC.*.name") as "*",latest("NIC.*.linkSpeedInKbps") as "* Speed", latest("NIC.*.macAddress") as "* MAC Address" by "NIC.*.name"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I don't get any results.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am capturing the information and logging it. I can change the format of the log if I need to. Does anyone have any ideas on how I can get this to work?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 15:29:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505206#M33490</guid>
      <dc:creator>trb48</dc:creator>
      <dc:date>2020-06-19T15:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505287#M33498</link>
      <description>&lt;P&gt;I kind of got something working...not ideal, though:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mylogs sourcetype=serverstats nodeName=MyServer01 

| stats latest("NIC.eth2.name") as "Host NIC", latest("NIC.eth2.linkSpeedInKbps") as "Speed (in Kbps)", latest("NIC.eth2.macAddress") as "MAC", latest("NIC.eth2.stats.network.received_pkts") as "Rx Pkts", latest("NIC.eth2.stats.network.transmitted_pkts") as "Tx Pkts", latest("NIC.eth2.stats.network.dropped_received_pkts") as "Dropped Rx Pkts", latest("NIC.eth2.stats.network.dropped_transmitted_pkts") as "Dropped Tx Pkts", latest("NIC.eth2.stats.network.error_received_pkts") as "Rx Pkt Errors", latest("NIC.eth2.stats.network.error_transmitted_pkts") as "Tx Pkt Errors"
| append [
		search index=mylogs sourcetype=serverstats nodeName=MyServer01 

		| stats latest("NIC.eth3.name") as "Host NIC", latest("NIC.eth3.linkSpeedInKbps") as "Speed (in Kbps)", latest("NIC.eth3.macAddress") as "MAC", latest("NIC.eth3.stats.network.received_pkts") as "Rx Pkts", latest("NIC.eth3.stats.network.transmitted_pkts") as "Tx Pkts", latest("NIC.eth3.stats.network.dropped_received_pkts") as "Dropped Rx Pkts", latest("NIC.eth3.stats.network.dropped_transmitted_pkts") as "Dropped Tx Pkts", latest("NIC.eth3.stats.network.error_received_pkts") as "Rx Pkt Errors", latest("NIC.eth3.stats.network.error_transmitted_pkts") as "Tx Pkt Errors"
		]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I use a port other than "eth2" or "eth3" I am out of luck. Is there a better way to do this?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 21:46:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505287#M33498</guid>
      <dc:creator>trb48</dc:creator>
      <dc:date>2020-06-19T21:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505288#M33499</link>
      <description>&lt;P&gt;sample:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="{\"NIC\":{\"eth2\":{\"linkSpeedInKbps\":10000000,\"macAddress\":\"XX:XX:XX:XX:XX:XX\",\"name\":\"eth2\",\"stats\":{\"network.dropped_received_pkts\":0,\"network.dropped_transmitted_pkts\":0,\"network.error_received_pkts\":0,\"network.error_transmitted_pkts\":0,\"network.received_pkts\":760176,\"network.received_rate_kBps\":19842,\"network.transmitted_pkts\":3140672,\"network.transmitted_rate_kBps\":143753}},\"eth3\":{\"linkSpeedInKbps\":10000000,\"macAddress\":\"XX:XX:XX:XX:XX:XX\",\"name\":\"eth3\",\"stats\":{\"network.dropped_received_pkts\":0,\"network.dropped_transmitted_pkts\":0,\"network.error_received_pkts\":0,\"network.error_transmitted_pkts\":0,\"network.received_pkts\":1068,\"network.received_rate_kBps\":2,\"network.transmitted_pkts\":2,\"network.transmitted_rate_kBps\":0}}},\"nodeName\":\"MyServer01\"}" 
| spath nodeName 
| spath NIC output=nic 
| rex field=nic mode=sed "s/,(\"eth\d\":)/#\1/g" 
| makemv delim="#" nic 
| rex field=nic mode=sed "s/.?\"eth\d\":(.*)}/\1/" 
| mvexpand nic 
| spath input=nic 
| fields - _raw nic&lt;/LI-CODE&gt;&lt;P&gt;recommend:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=mylogs sourcetype=serverstats nodeName=MyServer01
| spath nodeName 
| spath NIC output=nic 
| rex field=nic mode=sed "s/,(\"eth\d\":)/#\1/g" 
| makemv delim="#" nic 
| rex field=nic mode=sed "s/.?\"eth\d\":(.*)}/\1/" 
| mvexpand nic 
| spath input=nic 
| fields - _raw nic&lt;/LI-CODE&gt;&lt;P&gt;please modify field names using &lt;STRONG&gt;rename&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 22:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505288#M33499</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-19T22:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505296#M33500</link>
      <description>&lt;P&gt;When I use your top section (where you create the JSON log in Splunk using the "| makeresults" command) everything works as expected. When I use the second solution I get this instead of a table:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="trb48_0-1592610146393.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/9263i6933A6E31858C02F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="trb48_0-1592610146393.png" alt="trb48_0-1592610146393.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There is more in the log than what I initially posted. I kept the rest of it out (so we could focus on the project at hand). What am I missing?&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 23:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505296#M33500</guid>
      <dc:creator>trb48</dc:creator>
      <dc:date>2020-06-19T23:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505298#M33502</link>
      <description>&lt;P&gt;please try line by line.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 19 Jun 2020 23:55:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505298#M33502</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-19T23:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505303#M33503</link>
      <description>&lt;P&gt;I carefully compared your example with the results against logs in my environment. Everything is the same up until the last line:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| fields - _raw nic&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your example you create a variable named "_raw" where you create the contents of the log. In my environment the log is already there (it does't need to be created). There must be a different field that needs to be removed. Do you know what it is?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 01:30:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505303#M33503</guid>
      <dc:creator>trb48</dc:creator>
      <dc:date>2020-06-20T01:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505311#M33504</link>
      <description>&lt;P&gt;I see. your query doesn't make &lt;STRONG&gt;table&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;so, &lt;STRONG&gt;fields&amp;nbsp;&lt;/STRONG&gt;works wrong, I guess.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats latest(linkSpeedInKbps) as "Speed (in Kbps)"
, latest(macAddress) as "MAC"
, latest("stats.network.received_pkts") as "Rx Pkts"
, latest("stats.network.transmitted_pkts") as "Tx Pkts"
, latest("stats.network.dropped_received_pkts") as "Dropped Rx Pkts"
, latest("stats.network.dropped_transmitted_pkts") as "Dropped Tx Pkts"
, latest("stats.network.error_received_pkts") as "Rx Pkt Errors"
, latest("stats.network.error_transmitted_pkts") as "Tx Pkt Errors" by name&lt;/LI-CODE&gt;&lt;P&gt;that's enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jun 2020 04:48:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505311#M33504</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-06-20T04:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Format Chart for Network Performance</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505516#M33524</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thank you so much! This is exactly what I was looking for. Here is what I used in my actual dashboard:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=myindex sourcetype=mynodestats
	nodeName=$node_name$  

| spath nodeName 
| spath NIC output=nic 
| rex field=nic mode=sed "s/,(\"eth\d\":)/#\1/g" 
| makemv delim="#" nic 
| rex field=nic mode=sed "s/.?\"eth\d\":(.*)}/\1/" 
| mvexpand nic 
| spath input=nic 
| fields - _raw nic

| stats latest(linkSpeedInKbps) as "Speed (in Kbps)"
, latest(macAddress) as "MAC"
, latest("stats.network.received_pkts") as "Rx Pkts"
, latest("stats.network.transmitted_pkts") as "Tx Pkts"
, latest("stats.network.dropped_received_pkts") as "Dropped Rx Pkts"
, latest("stats.network.dropped_transmitted_pkts") as "Dropped Tx Pkts"
, latest("stats.network.error_received_pkts") as "Rx Pkt Errors"
, latest("stats.network.error_transmitted_pkts") as "Tx Pkt Errors" by name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Worked like a charm!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jun 2020 14:43:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Format-Chart-for-Network-Performance/m-p/505516#M33524</guid>
      <dc:creator>trb48</dc:creator>
      <dc:date>2020-06-22T14:43:36Z</dc:date>
    </item>
  </channel>
</rss>

