# Scheduling

**URL:** <https://community.netdata.cloud/t/scheduling/3729>\
**Category:** Help\
**Created:** [January 10, 2023, 10:42am UTC](https://community.netdata.cloud/t/scheduling/3729 "2023-01-10T10:42:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxz](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@maxz](https://community.netdata.cloud/u/maxz)\
**Post date:** [January 10, 2023, 10:42am UTC](https://community.netdata.cloud/t/scheduling/3729/1 "2023-01-10T10:42:12Z")

</div>

Hello.  
I have two servers, at a certain time there is a backup of these servers. Netdata sends problem reports to Telegram, httpcheck is used because the site being monitored goes down. How to reconfigure Netdata so that messages are not sent during the backup, and at the end of each backup, the state of Netdata is restored.  
Thanks.

---

<div class="post-metadata">

**Author:** ![andrewm4894](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/andrewm4894/32/125_2.png) [@andrewm4894](https://community.netdata.cloud/u/andrewm4894)\
**Post date:** [January 10, 2023, 10:44am UTC](https://community.netdata.cloud/t/scheduling/3729/2 "2023-01-10T10:44:25Z")

</div>

Hi @maxz - Welcome!

I believe you can use the health management api to turn off alarms before the backup and then just turn them back on after the backup.

> **[Health API Calls | Learn Netdata](https://learn.netdata.cloud/docs/agent/web/api/health#health-management-api)**
>
> Health Read API

So maybe you could schedule it as part of the backup process perhaps.

---

<div class="post-metadata">

**Author:** ![maxz](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@maxz](https://community.netdata.cloud/u/maxz)\
**Post date:** [January 12, 2023, 8:35am UTC](https://community.netdata.cloud/t/scheduling/3729/3 "2023-01-12T08:35:30Z")

</div>

Thank you very much, andrewm4894.

I applied this, but messages continue to come to Telegram:

“#!/bin/bash  
TIMESTAMP=`date +%Y-%m-%d_%H-%M-%S`  
echo $TIMESTAMP  
curl “[http://127.0.0.1:19999/api/v1/manage/health?cmd=DISABLE&context=KAT](http://127.0.0.1:19999/api/v1/manage/health?cmd=DISABLE&context=KAT)” -H “X-Auth-Token:MyToken””

This is the message in the log file :

"2023-01-11\_21-58-01  
% Total % Received % Xferd Average Speed Time Time Time Current  
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0  
100 78 100 78 0 0 15600 0 --:–:-- --:–:-- --:–:-- 15600  
Health checks disabled for alarms matching the selectors  
Alarm selector added "

What could be the problem?

---

<div class="post-metadata">

**Author:** ![maxz](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@maxz](https://community.netdata.cloud/u/maxz)\
**Post date:** [January 12, 2023, 11:39am UTC](https://community.netdata.cloud/t/scheduling/3729/4 "2023-01-12T11:39:06Z")

</div>

root@1-0-3-0:/opt/netdata/etc/netdata# curl “[http://127.0.0.1:19999/api/v1/manage/health?cmd=LIST](http://127.0.0.1:19999/api/v1/manage/health?cmd=LIST)” -H “X-Auth-Token: MyToken”  
{  
“all”: false,  
“type”: “DISABLE”,  
“silencers”: [  
{  
“context”: “KAT”  
}  
]  
}

---

<div class="post-metadata">

**Author:** ![hugo](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/hugo/32/3714_2.png) [@hugo](https://community.netdata.cloud/u/hugo)\
**Post date:** [January 12, 2023, 12:32pm UTC](https://community.netdata.cloud/t/scheduling/3729/5 "2023-01-12T12:32:57Z")

</div>

Hi @maxz ,

Is there a reason why your providing `context=KAT`? You want to disable all alarms, right?

If this is try the command should without providing any context, since the context is in case you want to disable alarms for charts linked to that context

> - `context` : Chart context, as shown on the dashboard. These will match the `on` entry of a configured `template`.

When you disable all your `LIST` command should show

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/2X/e/ef0e0083e98e41bd1cf472dceb69d3fd80289e7d.png)

Regards,  
Hugo

---

<div class="post-metadata">

**Author:** ![maxz](https://avatars.discourse-cdn.com/v4/letter/m/c67d28/32.png) [@maxz](https://community.netdata.cloud/u/maxz)\
**Post date:** [January 12, 2023, 1:04pm UTC](https://community.netdata.cloud/t/scheduling/3729/6 "2023-01-12T13:04:03Z")

</div>

Hi,Hugo. Big thanks.  
The httpcheck.conf file describes two servers that are backed up at different times. Have to turn off alarms at different times and only alarms for a specific server.

---

<div class="post-metadata">

**Author:** ![hugo](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/hugo/32/3714_2.png) [@hugo](https://community.netdata.cloud/u/hugo)\
**Post date:** [January 12, 2023, 1:38pm UTC](https://community.netdata.cloud/t/scheduling/3729/7 "2023-01-12T13:38:52Z")

</div>

Got it, thanks for the clarification.

The context won’t allow that because that is our internal Netdata names, for example for httpcheck the context is something like `httpcheck.response_time` or `httpcheck.response_length`. Please check the screenshot below:

 ![image](https://canada1.discourse-cdn.com/flex029/uploads/netdata2/original/2X/9/901b8375bf92c27e6ea725fda41bfa3ff0beb402.png)

There are other options you have are to define silencers for :

- `chart`: Chart ids/names, as shown on the dashboard. These will match the `on` entry of a configured `alarm`.
- `hosts` : The hostnames that will need to match.

Checking the httpcheck config we don’t have a host attribute anywhere, so probably this is for other collectors, but you could try there.

~~My best guess would the `chart` since you can use the chart name as it appears on the dashboard, e.g. from the screenshoot above `httpcheck_Bangalore_Demo_Site__CloudFlare_.request_status` you can confirm yours on the dashboard or with a request to`https://127.0.0.1:/api/v1/charts`.~~

Correction: Was looking to the definition of an alert on `httpcheck.conf` and we have something like:

```auto
template: httpcheck_web_service_timeouts
 families: *
       on: httpcheck.status
    class: Latency
     type: Web Server
component: HTTP endpoint
   lookup: average -5m unaligned percentage of timeout
    every: 10s
    units: %
     warn: $this >= 10 AND $this < 40
     crit: $this >= 40
    delay: down 5m multiplier 1.5 max 1h
     info: percentage of timed-out HTTP requests to ${label:url} in the last 5 minutes
       to: webmaster

```

So as `chart` is the name that matches on the `on` of the configuration, so this doesn’t have the server specific part on the name…

I think we’ll need some help from someone on the Agent team, maybe @Manolis_Vasilakis you could help here?

Cheers,  
Hugo

---

<div class="post-metadata">

**Author:** ![TradeLabelSoftware](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/tradelabelsoftware/32/2571_2.png) [@TradeLabelSoftware](https://community.netdata.cloud/u/TradeLabelSoftware)\
**Post date:** [January 25, 2023, 9:15am UTC](https://community.netdata.cloud/t/scheduling/3729/8 "2023-01-25T09:15:01Z")

</div>

I tried to solve this problem but I can’t so please can anyone share the solution.

---

<div class="post-metadata">

**Author:** ![Manolis\_Vasilakis](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.netdata.cloud/manolis_vasilakis/32/820_2.png) [@Manolis\_Vasilakis](https://community.netdata.cloud/u/Manolis_Vasilakis)\
**Post date:** [January 30, 2023, 3:47pm UTC](https://community.netdata.cloud/t/scheduling/3729/9 "2023-01-30T15:47:40Z")

</div>

Hi! So, assuming you have 2 httpcheck web sites to monitor:

Check the alerts that are running on netdata by checking `http://127.0.0.1:19999/api/v1/alarms?all`

The http check alerts should be listed there (there are a few, e.g. timeouts, status, etc for each site you’re monitoring).

You can disable all the alert that are active on a specific chart using:

`curl 'http://127.0.0.1:19999/api/v1/manage/health?cmd=DISABLE&chart=httpcheck_cool_website.request_status' -H 'X-Auth-Token: MyToken'`

You can get the `chart` value from the api call above. Does this work in your case @maxz ?

@TradeLabelSoftware Is it something similar you’re trying to do?
