#1 Splunk sub(Commands) [top, rare, fields, table, rename, sort]
TOP: Will show you top results with respect to your field.
RARE: Will help you to find out least common values of a field, i.e. it is similar to TOP but works in opposite direction.
FIELDS: Will help you to limit your columns, lets say you want to remove count from above table, fields can help you to achieve that. Though there are other usage of fields as well but you will learn slowly and gradually when you start building some complex queries.
TABLE: Same thing can be achieved via table as well.
- Example: index=_internal | top limit=5 component
RARE: Will help you to find out least common values of a field, i.e. it is similar to TOP but works in opposite direction.
- Example: index=_internal | rare limit=5 component
FIELDS: Will help you to limit your columns, lets say you want to remove count from above table, fields can help you to achieve that. Though there are other usage of fields as well but you will learn slowly and gradually when you start building some complex queries.
TABLE: Same thing can be achieved via table as well.
RENAME: Lets say you want to rename a column, for that you can use rename command.
- Example: index=_internal | top limit=5 component | rename percent AS percentage | table component, percentage
SORT: Helps you to sort the values with respect to a field, you can sort in both the directions ascending and descending order.
- Example: index=_internal | top limit=5 component | table component, percent | sort component
Comments
Post a Comment