metric: Fix negative number handling

closes #2324
This commit is contained in:
Cameron Sparr
2017-02-01 09:50:34 +00:00
parent 3e37dda7b0
commit 54cfbb5b87
4 changed files with 54 additions and 2 deletions

View File

@@ -305,7 +305,7 @@ func (m *metric) Fields() map[string]interface{} {
case '"':
// string field
fieldMap[unescape(string(m.fields[i:][0:i1]), "fieldkey")] = unescape(string(m.fields[i:][i2+1:i3-1]), "fieldval")
case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9':
// number field
switch m.fields[i:][i3-1] {
case 'i':