Skip to content

Commit

Permalink
Quote key name if it contain spaces in ZabbixSender
Browse files Browse the repository at this point in the history
  • Loading branch information
divanikus committed Sep 8, 2018
1 parent 5a50b4e commit 72d0293
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/salus/renderer/zabbixsender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ def render(data)
unless metric.timestamp.nil?
timestamp = metric.timestamp.to_i
name = name.gsub(/\.\[/, '[')
name = name.to_json if (name.match(/\s/))
value = metric.value
value = '""' if value.nil?
value = value.to_json if (!value.nil? && metric.is_a?(Salus::Text))
Expand Down
2 changes: 1 addition & 1 deletion lib/salus/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Salus
VERSION = "0.1.2"
VERSION = "0.1.3"
end

0 comments on commit 72d0293

Please sign in to comment.