DEV Community

Cover image for Silencing an Alert from Grafana
Bala Audu Musa
Bala Audu Musa

Posted on

Silencing an Alert from Grafana

Silencing an Alert

After completing the project i was still receiving alert. Wanted to silence it.

To stop receiving these firing alerts from your Grafana/Prometheus setup, you have a few quick options depending on whether you want to silence it temporarily, adjust the memory threshold, or disable the alert rule entirely.

To stop receiving these firing alerts from your Grafana/Prometheus setup, you have a few quick options depending on whether you want to silence it temporarily, adjust the memory threshold, or disable the alert rule entirely.

Option 1: Silence the Alert Temporarily (Recommended for Testing)
If you are working in your pulse-dev environment and don't want to break the alert rule for production, create a silence in Grafana or Alertmanager:

Open Grafana and navigate to Alerting > Silences.

Click New Silence.

Add the matching labels from your alert notification:

alertname = High Memory Usage - CloudNative Pulse

container = api

Set the duration (e.g., 2 hours, 1 day, or 1 week) and save.

Option 2: Disable or Delete the Alert Rule in Grafana
If this rule was created directly inside Grafana:

Go to Grafana > Alerting > Alert rules.

Search for High Memory Usage - CloudNative Pulse.

Click on the rule to open it.

Toggle the status to Disabled or click the Trash icon to delete it.

Option 3: Adjust the Alert Threshold in Code/Prometheus (If Code-based)

Your alert value is sitting at 36.26 MB (or 36.26%), which is quite low if it's triggering a high memory alert.

If you deployed this alert using Helm or PrometheusRule CRD in Kubernetes:

Open your Prometheus rule manifest or Helm values file (e.g., in your cloudnative-pulse repository).

Locate the rule definition:

YAML
- alert: High Memory Usage - CloudNative Pulse
  expr: container_memory_working_set_bytes{container="api"} > ...
Enter fullscreen mode Exit fullscreen mode

Either:

Increase the threshold (e.g., increase the trigger limit from 30MB to 128MB or 80% usage).

Delete the alert block completely from the rule file.

Apply the updated manifest (kubectl apply -f ... or helm upgrade ...).

Try entering the localhost
This site can’t be reached
172.30.38.238 refused to connect.Try:
Checking the connection
Checking the proxy and the firewall
ERR_CONNECTION_REFUSED
Enter fullscreen mode Exit fullscreen mode

172.30.38.238 is a local IP address (typically assigned by WSL2 or a local virtual network interface in Linux/Ubuntu). An ERR_CONNECTION_REFUSED error means no web service or port forwarder is actively listening on port 80/443 (or the specified port) at that IP address.

Is Grafana really running?

sudo systemctl status grafana-server

Unit grafana-server.service could not be found. 
Enter fullscreen mode Exit fullscreen mode

That output (Unit grafana-server.service could not be found) confirms that Grafana is not installed as a systemd Linux service directly on your system.

Is grafana running in docker?

docker ps | grep -i grafana

Result

4f8ab88438f3   grafana/grafana:latest                "/run.sh"                2 weeks ago   Up 2 days              0.0.0.0:3000->3000/tcp, [::]:3000->3000/tcp                                                                                            grafana 
Enter fullscreen mode Exit fullscreen mode

Meaning Grafana is running.

The IP address 172.30.38.238 is an internal WSL IP that refused connection. Since we are running in a WSL2 environment, we need to access it through our host loopback interface or verify Windows port forwarding.

http://localhost:3000
or http://127.0.0.1:3000

Couldn't remember my password.

Check Docker environment variable (if custom password was passed when starting Docker container:

docker inspect grafana | grep -i GF_SECURITY_ADMIN_PASSWORD

Or Reset password:
docker exec -it grafana grafana-cli admin reset-admin-password admin123

Using the second threw up this error:

OCI runtime exec failed: exec failed: unable to start container process: exec: "grafana-cli": executable file not found in $PATH
Enter fullscreen mode Exit fullscreen mode

That error occurs because newer official Grafana Docker images (Grafana v10, v11, and v13+) removed the standalone grafana-cli binary and replaced it with the unified grafana CLI tool.

docker exec -it grafana grafana cli admin reset-admin-password admin123

Result:
Admin password changed successfully

Restart Grafana:
docker restart grafana

Result: grafana

After running this command:
Refresh http://127.0.0.1:3000 or http://127.0.0.1:3000 in your browser.
Log in with Username: admin and Password: admin123.
We are in.

πŸ”• Step-by-Step: Silence the Alert in Grafana

Navigate to Silences:
On the left-hand sidebar, click on Alerting (the bell icon πŸ””).
Select Silences.
Create a New Silence:
Click the blue + Create Silence button in the top right corner.
Set the Target Matcher:
Under Matching labels, set:
Label: alertname
Value: High Memory Usage - CloudNative Pulse
The label and value where from the the alert

Value: A=36.0078125, C=1
Labels:
- alertname = High Memory Usage - CloudNative Pulse
- container = api 
Enter fullscreen mode Exit fullscreen mode

Set Duration & Save:
Choose a duration (e.g., 7 days or 30 days).
Add a quick comment like "Dev environment testing".
Click Submit.

Top comments (0)