alarms: a comprehension problem

Sorry, somehow I have a comprehension problem.
I have some hosts that I monitor in the netdata cloud.
Now I want to create an alarm for a chart.
Concretely it is about an alarm when a hard disk has bad sectors. (wear; reallocated sector counts).
When I look at the description, it says to edit the appropriate entry with edit-config in health.d on the host.
Unfortunately there are no files in this folder, the folder is empty.
I would exspect a lot of available alarms already there…
Where is my thinking error?
would you please point me in the right direction?

Hi @Bernd !

So, the way this works, is that in /etc/netdata/health.d/, this directory contains your custom alerts.

A custom alert can be one that you write from scratch, or based on a stock alert that we ship which you want to modify.

Our stock alerts are in /usr/lib/netdata/conf.d/health.d/.

When you go to /etc/netdata/ and run ./edit-config health.d/something.conf, then the script will search our stock alerts path to find a file named something.conf, copy it to /etc/netdata/health.d/ and start an editor.

With this process, your customized alert will be loaded instead of the stock one.

Have a look at our stock alerts. If you find one that can use to base your own, then use that (disks.conf might be a candidate).

You can of course also create a new file under /etc/netdata/health.d/, and write an alert from scratch.

I hope this clears up how it works, try it and we’re here to help!

1 Like

Here is the link to the Configure alerts doc.

Yes I got this already, which was the reason for my question.
:smile:
I hope I can walk alone, let’s see

Hello dear netdata gurus.
I have made my first alarm. It works, but is not yet properly configured.
I do not want to wire the values absolutely, but want to achieve that an increase of the sectors triggers the alarm.
Something like this: If the number of reallocated sectors has increased by 1 in a day, then generate an alert. If the number of reallocated sectors has increased by more than 5 in a day, then generate a critical alarm.
How do I implement this?
My conf is here:

alarm: smart_wear.conf
    on: smartd_log.reallocated_sectors_count
lookup: average -1m sectors
 units: 1
 every: 10m
  warn: $this > 10
  crit: $this > 20
  info: Anstieg der reallocated sectors

thanx in advance

Just an update, I improved it by myself.

alarm: smart_wear.conf
on: smartd_log.reallocated_sectors_count
lookup: average -1d smartd_log.reallocated_sectors_count
units: 1
every: 10m
info: Anstieg der reallocated sectors
crit: $this > 5
warn: $this > 0
1 Like