<?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: Metrics in chart in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650462#M224872</link>
    <description>&lt;P&gt;Then it's a question about your data source. &amp;nbsp;Are you sure metric cpu_metric.Idle exists? &amp;nbsp;Do you know which index (indices) is(are) metrics index/indices? &amp;nbsp;Forget that remainder. &amp;nbsp;What does this give you?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as name where index=my_metrics_index&lt;/LI-CODE&gt;&lt;P&gt;If this also has no result, examine your data source deeper.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as name where index=my_metrics_index​
| foreach *
    [eval metrics = mvappend(metrics, "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;")]
| table metrics&lt;/LI-CODE&gt;&lt;P&gt;Do you have any metrics index at all? &amp;nbsp;In fact, why did you show an invalid mstats command in the original description? &amp;nbsp;I'm just trying to follow your original logic.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 22:35:33 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-07-13T22:35:33Z</dc:date>
    <item>
      <title>Metrics in chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650179#M224783</link>
      <description>&lt;P&gt;I am trying to use a radial gauge graph in order to show a % using avg(cpu_metric.Idle). However, I want the "reverse" value of the cpu_metric.Idle. So what I am attempting to do is&lt;/P&gt;&lt;P&gt;| mstats .................. hostname.......... | chart count(eval( 100 - avg(cpu_metric.Idle)) as name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I am trying to show " 100 - avg(cpu_metric.Idle)" on a gauge and the only way for me to get the new value is doing "&amp;nbsp; | chart avg(cpu_metric.Idle) as name | eval new = 100 - name "&amp;nbsp; but I cant put the eval value onto a chart.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 12:58:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650179#M224783</guid>
      <dc:creator>sizemorejm</dc:creator>
      <dc:date>2023-07-12T12:58:00Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics in chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650363#M224831</link>
      <description>&lt;P&gt;Now sure why you cannot&amp;nbsp;&lt;SPAN&gt;put the eval value onto a chart, but chart may not be necessary. &amp;nbsp;There are multiple ways to do this. &amp;nbsp;If you want to use chart command after mstats, do this&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as cpu_metric.Idle where .................. hostname..........
| chart values(eval( 100 - cpu_metric.Idle)) as name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Alternatively, and perhaps slightly more efficiently, you can do simple eval&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as name where .................. hostname..........
| eval name = 100 - name&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 13 Jul 2023 10:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650363#M224831</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-07-13T10:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics in chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650381#M224843</link>
      <description>&lt;P&gt;For both set, I get an error saying "No results found. Try expanding the time range.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 13:03:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650381#M224843</guid>
      <dc:creator>sizemorejm</dc:creator>
      <dc:date>2023-07-13T13:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Metrics in chart</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650462#M224872</link>
      <description>&lt;P&gt;Then it's a question about your data source. &amp;nbsp;Are you sure metric cpu_metric.Idle exists? &amp;nbsp;Do you know which index (indices) is(are) metrics index/indices? &amp;nbsp;Forget that remainder. &amp;nbsp;What does this give you?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as name where index=my_metrics_index&lt;/LI-CODE&gt;&lt;P&gt;If this also has no result, examine your data source deeper.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| mstats avg(cpu_metric.Idle) as name where index=my_metrics_index​
| foreach *
    [eval metrics = mvappend(metrics, "&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;")]
| table metrics&lt;/LI-CODE&gt;&lt;P&gt;Do you have any metrics index at all? &amp;nbsp;In fact, why did you show an invalid mstats command in the original description? &amp;nbsp;I'm just trying to follow your original logic.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 22:35:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metrics-in-chart/m-p/650462#M224872</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-07-13T22:35:33Z</dc:date>
    </item>
  </channel>
</rss>

