Try the following:
json_time_key = "meta_info_last_updated_timestamp"
If you omit the json_time_key
and json_time_format
config options and run Telegraf, the output will have the additional field in the output. That is how I figured out the correct name.
My config:
[[inputs.file]]
files = ["data.json"]
data_format = "json"
name_override = "nsxt"
tag_keys = ["usage_type", "display_name"]
tagexclude = ["url", "host"]
fielddrop = ["landMark"]
json_time_key = "meta_info_last_updated_timestamp"
json_time_format = "unix_ms"
json_string_fields = [
"current_usage_count",
"max_supported_count",
"min_threshold_percentage",
"max_threshold_percentage",
"current_usage_percentage",
"last_updated_timestamp"
]
[[outputs.file]]
Using your above JSON doc (thank you for including that), produces this output:
nsxt capacity_usage_0_max_supported_count=10000,capacity_usage_1_min_threshold_percentage=70,meta_info_min_global_threshold_percentage=70,capacity_usage_0_current_usage_percentage=0,capacity_usage_1_current_usage_count=0,capacity_usage_1_max_supported_count=10000,capacity_usage_1_current_usage_percentage=0,meta_info_max_global_threshold_percentage=100,capacity_usage_0_min_threshold_percentage=30,capacity_usage_0_max_threshold_percentage=50,capacity_usage_1_max_threshold_percentage=100,capacity_usage_0_current_usage_count=0 1589228468000000000
nsxt capacity_usage_0_max_supported_count=10000,capacity_usage_1_max_supported_count=10000,meta_info_min_global_threshold_percentage=70,capacity_usage_0_current_usage_percentage=0,capacity_usage_0_max_threshold_percentage=50,capacity_usage_1_max_threshold_percentage=100,capacity_usage_1_current_usage_percentage=0,capacity_usage_0_min_threshold_percentage=30,capacity_usage_0_current_usage_count=0,capacity_usage_1_current_usage_count=0,meta_info_max_global_threshold_percentage=100,capacity_usage_1_min_threshold_percentage=70 1589228468000000000