Splunk AppDynamics

Getter Chain, Cast from Bool to Int?

Henrik_Juul
New Member

I have created an Information Point which basically works so now I also want to create a metric based on the return value.- Only thing is that the return value is a Boolean so how do I cast it to an Integer (with a Getter Chain I suppose)?

Labels (3)
0 Karma
1 Solution

Morelz
Motivator

Hi Hendrik, you can use normal toInt() or toString() for text values

Example

getBody().toInt()

or

getBody().toInteger()

Can't remember 100% if it's toInt()or toInteger()

View solution in original post

Morelz
Motivator

Hi Hendrik, you can use normal toInt() or toString() for text values

Example

getBody().toInt()

or

getBody().toInteger()

Can't remember 100% if it's toInt()or toInteger()

Henrik_Juul
New Member

Thank you.

I got this to work based on a .Net application:
ReturnValue.Success().Convert.ToInt32()

0 Karma
Get Updates on the Splunk Community!

ATTENTION!! We’re MOVING (not really)

Hey, all! In an effort to keep this Slack workspace secure and also to make our new members' experience easy, ...

Splunk Admins: Build a Smarter Stack with These Must-See .conf25 Sessions

  Whether you're running a complex Splunk deployment or just getting your bearings as a new admin, .conf25 ...

AppDynamics Summer Webinars

This summer, our mighty AppDynamics team is cooking up some delicious content on YouTube Live to satiate your ...