Netdata Community

Customize alarm_id

Hi,
I’m trying to define custom alarm_id. But i could not find a way.
Please share if there is a possibility to define or configure alarm_id in some configurations files?

Thanks,
Vasanth

1 Like

Have you read the documentation? I think this one is the section you need.

1 Like

Hi vlvkobal,

Thanks for sharing the reference section.

I referred to the section. But not, sure I can add/define following custom variable like below. Please suggest.

e.g.

alarm_id : 11111
component_id : 100
raisethreshold:85
fallthreshold:75
raisetext:CPU Usage Warning, CPU usage has been above ${raisethreshold}% for the last 5 minutes (currently ${value}%)
falltext: CPU Usage Warning, CPU usage has returned to normal (less than ${fallthreshold}%)

In addition to the following in /etc/netdata/health.d/cpu.conf

alarm : CPU_Usage_Warning
on : system.cpu
class : Utilization
type : System
component : CPU
os : linux
hosts : *
lookup : average -1m unaligned of user,system
units : %
every : 1m
warn : $this > (($status >= $WARNING) ? (75) : (80))
info : CPU Usage warning
to : sysadmin

Thanks,
Vasanth

I’m sorry, but I don’t understand what is the question. Do you want to have different text on raise/fall? Then it isn’t possible. The text is stated in info and you can’t alter it depending on the status change.

Hi Vlvkobal,

Thanks for the response and apologies for the delay in response

Yes. Currently, I’m using the info variable to send the alarm text. But, to pass the 2 different alarm texts (rise and clear), I’ve to define the alarm texts with some delimiter and parse the same in the custom sender function ( to send the alarm texts to the external backend ).

e.g.
info: CPU Usage Warning, CPU usage has been above 75% for the last 5 minutes (currently ${value}%)#CPU Usage Warning, CPU usage has returned to normal (less than 75 %)

‘#’ - delimiter

This looks like a workaround solution. So I thought to check if there are direct options, I can use it.

Please suggest.

Thanks,
Vasanth