Archive
Highlighted

Metric : mcollect command error

Contributor

Hello,

I've been using this command on other metric indexes and i can't get this one to work.

index=iiotindex Tag="simpletag" AND metricname="simplemetric" Quality=good
| eval Value=CASE(
Value="TRUE", 1,
Value="FALSE", 0,
Value="ACTIVE", 1,
Value="INPROGRESS", 1,
Value="ARMED", 1,
Value="TRIGGERED", 0,
Value="ON", 1,
Value="OFF", 0,
1=1, Value)
| rex field=asset
name "(?.).(?.)"
| eval value=Value
| where isnum(
value)
| table asset metricname Value _time
| mcollect index=iiot
indexmetric asset,metricname,Value

The error i get is this:

Error in 'mcollect' command: Must specify a valid metric index.

I do get data from the first index above, and this index in the last line is a metrics index.

Thanks

0 Karma
Highlighted

Re: Metric : mcollect command error

Contributor

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).

View solution in original post

0 Karma