Skip to content

Commit 72d0293

Browse files
committed
Quote key name if it contain spaces in ZabbixSender
1 parent 5a50b4e commit 72d0293

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/salus/renderer/zabbixsender.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ def render(data)
88
unless metric.timestamp.nil?
99
timestamp = metric.timestamp.to_i
1010
name = name.gsub(/\.\[/, '[')
11+
name = name.to_json if (name.match(/\s/))
1112
value = metric.value
1213
value = '""' if value.nil?
1314
value = value.to_json if (!value.nil? && metric.is_a?(Salus::Text))

lib/salus/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Salus
2-
VERSION = "0.1.2"
2+
VERSION = "0.1.3"
33
end

0 commit comments

Comments
 (0)