<?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: Metric : mcollect command error in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Metric-mcollect-command-error/m-p/457677#M170457</link>
    <description>&lt;P&gt;I figured in out. we are in a distributed environment and this index needed to be on the search head as well as indexers (of course).&lt;/P&gt;</description>
    <pubDate>Mon, 08 Jul 2019 21:28:19 GMT</pubDate>
    <dc:creator>brdr</dc:creator>
    <dc:date>2019-07-08T21:28:19Z</dc:date>
    <item>
      <title>Metric : mcollect command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metric-mcollect-command-error/m-p/457676#M170456</link>
      <description>&lt;P&gt;Hello, &lt;/P&gt;

&lt;P&gt;I've been using this command on other metric indexes and i can't get this one to work. &lt;/P&gt;

&lt;P&gt;index=iiot_index Tag="simple_tag" AND metric_name="simple_metric" Quality=good &lt;BR /&gt;
| eval Value=CASE(&lt;BR /&gt;
    Value="TRUE", 1,&lt;BR /&gt;
    Value="FALSE", 0,&lt;BR /&gt;
    Value="ACTIVE", 1,&lt;BR /&gt;
    Value="IN_PROGRESS", 1,&lt;BR /&gt;
    Value="ARMED", 1,&lt;BR /&gt;
    Value="TRIGGERED", 0,&lt;BR /&gt;
    Value="ON", 1,&lt;BR /&gt;
    Value="OFF", 0,&lt;BR /&gt;
    1=1, Value) &lt;BR /&gt;
| rex field=asset_name "(?.&lt;EM&gt;).(?.&lt;/EM&gt;)" &lt;BR /&gt;
| eval _value=Value &lt;BR /&gt;
| where isnum(_value)&lt;BR /&gt;
| table asset metric_name Value _time &lt;BR /&gt;
| mcollect index=iiot_index_metric asset,metric_name,Value&lt;/P&gt;

&lt;P&gt;The error i get is this:&lt;/P&gt;

&lt;P&gt;Error in 'mcollect' command: Must specify a valid metric index.&lt;/P&gt;

&lt;P&gt;I do get data from the first index above, and this index in the last line is a metrics index.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:11:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metric-mcollect-command-error/m-p/457676#M170456</guid>
      <dc:creator>brdr</dc:creator>
      <dc:date>2020-09-30T01:11:53Z</dc:date>
    </item>
    <item>
      <title>Re: Metric : mcollect command error</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Metric-mcollect-command-error/m-p/457677#M170457</link>
      <description>&lt;P&gt;I figured in out. we are in a distributed environment and this index needed to be on the search head as well as indexers (of course).&lt;/P&gt;</description>
      <pubDate>Mon, 08 Jul 2019 21:28:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Metric-mcollect-command-error/m-p/457677#M170457</guid>
      <dc:creator>brdr</dc:creator>
      <dc:date>2019-07-08T21:28:19Z</dc:date>
    </item>
  </channel>
</rss>

