Project

General

Profile

Feature #1428

List SMART attributes on detail page

Added by Luke Murphey over 8 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
08/20/2016
Due date:
% Done:

100%

History

#2 Updated by Luke Murphey over 8 years ago

This gets the attributes into a single field:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" 

#3 Updated by Luke Murphey over 8 years ago

Extracts the ID:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<id>([-0-9a-fA-F_]+))" 

Non-greedy version:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<id>([0-9]+))[ ]+" 

#4 Updated by Luke Murphey over 8 years ago

Gets attribute name:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<attribute_id>([0-9]+))[ ]+(?<attribute_name>([-0-9a-zA-Z_]+))" 

#5 Updated by Luke Murphey over 8 years ago

With worst values:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<attribute_id>([0-9]+))[ ]+(?<attribute_name>([-0-9a-zA-Z_]+))[ ]+(?<attribute_flag>([-0-9a-zA-Z_]+))[ ]+(?<attribute_value>([0-9]+))[ ]+(?<attribute_worst>([0-9]+))" 

#6 Updated by Luke Murphey over 8 years ago

  • Assignee set to Luke Murphey
  • Target version changed from 0.6 to 0.5

With all:

sourcetype=smartmon Serial_Number=7D4520004758 | head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<attribute_id>([0-9]+))[ ]+(?<attribute_name>([-0-9a-zA-Z_]+))[ ]+(?<attribute_flag>([-0-9a-zA-Z_]+))[ ]+(?<attribute_value>([0-9]+))[ ]+(?<attribute_worst>([0-9]+))[ ]+(?<attribute_threshold>([0-9]+))[ ]+(?<attribute_type>([-_a-zA-Z0-9]+))[ ]+(?<attribute_updated>([-_a-zA-Z0-9]+))[ ]+(?<attribute_when_failed>([-_a-zA-Z0-9]+))[ ]+(?<attribute_raw_value>([^\n]+))" 

#7 Updated by Luke Murphey over 8 years ago

Removing attribute prefix:

sourcetype=smartmon Serial_Number=$serial_number$| head 1 | rex "RAW_VALUE\n(?<attributes>([ ]*[0-9]+.*\n)+)" | rex max_match=100 field=attributes "\n[ ]*(?<id>([0-9]+))[ ]+(?<name>([-0-9a-zA-Z_]+))[ ]+(?<flag>([-0-9a-zA-Z_]+))[ ]+(?<value>([0-9]+))[ ]+(?<worst>([0-9]+))[ ]+(?<threshold>([0-9]+))[ ]+(?<type>([-_a-zA-Z0-9]+))[ ]+(?<updated>([-_a-zA-Z0-9]+))[ ]+(?<when_failed>([-_a-zA-Z0-9]+))[ ]+(?<raw_value>([^\n]+))" | table name id flag value worst threshold type updated when_failed raw_value

#8 Updated by Luke Murphey over 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF