Refine your search:

If I use the metadata command it only gives me keys for the main index, can I call it for other indexes? For example

index=* | metadata type=sources | search totalCount

asked 16 Aug '11, 04:40

Marinus's gravatar image

Marinus
72912
accept rate: 45%


One Answer:

Yes and no. You can specify which index metadata is to operate on, but not by specifying index=<index> before metadata (it needs to the first command of a search). Rather you need to specify the index as a parameter to metadata:

| metadata index=<index> type=sources

More information on the metadata command is available here: http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Metadata

link

answered 16 Aug '11, 06:06

Ayn's gravatar image

Ayn
9.6k1315
accept rate: 38%

Thanks Ayn RTFM!

| metadata index=* type=sources | search totalCount

(18 Aug '11, 02:09) Marinus
Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×72

Asked: 16 Aug '11, 04:40

Seen: 416 times

Last updated: 18 Aug '11, 02:09

Copyright © 2005-2012 Splunk, Inc. All rights reserved.