Skip to content

Commit cf13927

Browse files
author
Jarret Lavallee
committed
Disable pretty json printing for system metrics
Prior to this commit, the system metrics were pretty printed. This leads to additional consumed disk space. The json2timeseries STDIN expects that all data incoming is a single line. This commit changes the system metrics to log minified JSON.
1 parent 6ee4aa9 commit cf13927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files/system_metrics

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ module SystemMetrics
325325
hostkey = @hostname.gsub('.', '-')
326326
metrics_json = {'timestamp' => @time_stamp_obj.utc.iso8601, 'servers' => {}}
327327
metrics_json['servers'][hostkey] = {@metric_type => metrics_data}
328-
JSON.pretty_generate(metrics_json)
328+
JSON.generate(metrics_json)
329329
end
330330

331331
# Create the metric file and put the json data in it

0 commit comments

Comments
 (0)