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!

Dashboards: Hiding charts while search is being executed and other uses for tokens

There are a couple of features of SimpleXML / Classic dashboards that can be used to enhance the user ...

Splunk Observability Cloud's AI Assistant in Action Series: Explaining Metrics and ...

This is the fourth post in the Splunk Observability Cloud’s AI Assistant in Action series that digs into how ...

Brains, Bytes, and Boston: Learn from the Best at .conf25

When you think of Boston, you might picture colonial charm, world-class universities, or even the crack of a ...