How can I externalize rate in spike arrest policy using kvm

ServicesDiagnosticsAPISpikeArrest {private.rate} I am trying to substitute "rate" prop from KVM inside 'spike arrest' policy. While saving I am getting error. Error: "Invalid spike arrest rate {private.rate}"

0 4 266
4 REPLIES 4

Hello,

What is this "ServicesDiagnosticsAPISpikeArrest {private.rate}"?

Please share your policy XML to understand the problem.

Ideally, you should be able to use the extracted KVM variable {private.rate} in Rate element with ref attribute like below -

<SpikeArrest name="Spike-Arrest-1">
<Rate ref="private.rate"/>
</SpikeArrest>

I will test and update.

Thanks this worked for me.

Just out of curiosity, why it wouldn't work if I wrap it as {private.rate} as value of <Rate></Rate> xml element?

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <SpikeArrest async="false" continueOnError="false" enabled="true" name="ServicesDiagnosticsAPISpikeArrest"> <DisplayName>ServicesDiagnosticsAPISpikeArrest</DisplayName> <Properties/> <Rate>{private.rate}</Rate> </SpikeArrest>