1

I'm currently facing a little problem.

I'm a beginner with Splunk, and I need to print a temperature in a single value widget.

I want the temperature to have °C at the end.

When I'm doing this: | eval value = value +"°C"

The printed value is 80.00 °C.

I want 80°C to be printed.

I also tried to use the Major value and trend which is supposed to allow me to add a unit after a value but it prints it very tiny compared to the temperature value.

warren
  • 32,620
  • 21
  • 85
  • 124
OrnSkry
  • 13
  • 2

1 Answers1

1

Try the eval function round() first (presuming "value" is just a number):

| eval value=round(value)+"°C"

Alternatively ... use replace():

| eval value=replace(value,"\.[^°]+","")
warren
  • 32,620
  • 21
  • 85
  • 124