Logstash translate filter and converting integers to strings

I am on logstash 7.11. I need a translate from an integer code to real speed value.

	mutate {
		convert => { "ifspeed" => "string" }
	}
	translate {
		field => "[ifspeed]"
		destination => "[inf_speed]"
		dictionary => {
          "1" => 10000000
          "2" => 10000000
          "3" => 100000000
          "4" => 1000000000
          "5" => 45000000
          "6" => 155000000
          "7" => 10000000000
        }
		fallback => 0
	}

I'm converting the integer to string. The conversion ends up: ifspeed = 0.4e1. Am I going to have to change the translate dictionary to "0.4e1" or am I missing something on the convert statement?

I'm assuming the 0.4e1 is the expected conversion. Configuring this form works for now. Thanks

convert is just calling the ruby .to_s function, which often uses an exponent form.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.