Skip to content

Commit 10b5119

Browse files
committed
1. add motoring section to digital ocean guide
2. show default user and password of grafana
1 parent 7712a90 commit 10b5119

File tree

2 files changed

+65
-2
lines changed

2 files changed

+65
-2
lines changed

src/content/docs/en/sdk/guides/aws-deployment.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ Some services do not support this without additional configurations (for example
810810
### Monitoring
811811
You can monitor the cluster's running status through Grafana.
812812
Additionally, you can send alerts via email and Slack using Alertmanager.
813-
If you have configured a domain for Grafana in the previous steps, you can access it by opening http://grafana.yourdomain.xyz, where you will see two sets of dashboards.
813+
If you have configured a domain for Grafana in the previous steps, you can access it by opening http://grafana.yourdomain, where you will see two sets of dashboards. The defalt password of user `admin` is `scroll-sdk`.
814814
<ClickToZoom src={GrafanaDashboard} alt="Copy Webhook URL" />
815815

816816
#### send alert to slack

src/content/docs/en/sdk/guides/digital-ocean-alt-gas-token.mdx

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ import DOKubernetesConnect from "./_images/do-cluster-connection.png"
2525
import DOConnectionPools from "./_images/do-connection-pools.png"
2626
import DOConnectionInfo from "./_images/do-connection-info.png"
2727
import DOVPCNetwork from "./_images/do-vpc-network.png"
28+
import CreateSlackApp from "./_images/CreateSlackApp.png"
29+
import AddNewWebhookToWorkspace from "./_images/AddNewWebhookToWorkspace.png"
30+
import CopyWebhookURL from "./_images/CopyWebhookURL.png"
31+
import GrafanaDashboard from "./_images/grafana.png"
2832

2933
This guide documents getting a Scroll SDK deployment working on Digital Ocean's Kubernetes and managed databases, using Cloudflare for DNS.
3034

@@ -536,4 +540,63 @@ To quickly get started with Grafana, run the following command:
536540

537541
Now, visit the localhost URL in [your browser](http://localhost:3000/). The default password for the `admin` user is `prom-operator`.
538542

539-
Adding an ingress URL, changing the default password or adding LDAP login are all suggested if you use this stack in production. */}
543+
Adding an ingress URL, changing the default password or adding LDAP login are all suggested if you use this stack in production. */}
544+
545+
546+
### Monitoring
547+
You can monitor the cluster's running status through Grafana.
548+
Additionally, you can send alerts via email and Slack using Alertmanager.
549+
If you have configured a domain for Grafana in the previous steps, you can access it by opening http://grafana.yourdomain, where you will see two sets of dashboards. The defalt password of user `admin` is `scroll-sdk`.
550+
<ClickToZoom src={GrafanaDashboard} alt="Copy Webhook URL" />
551+
552+
#### send alert to slack
553+
1. **Create a Slack App**
554+
555+
Open [https://api.slack.com/apps](https://api.slack.com/apps) and click **`Create New App`** if you don't have one already. Select **`From scratch`**, enter a name, and select the workspace.
556+
557+
2. **Activate Incoming Webhooks**
558+
559+
Click the **`Incoming Webhooks`** label on the right side of the page, then turn on **`Activate Incoming Webhooks`**.
560+
<ClickToZoom src={CreateSlackApp} alt="Create Slack App" />
561+
562+
Click the **`Add New Webhook to Workspace`** button.
563+
<ClickToZoom src={AddNewWebhookToWorkspace} alt="Add New Webhook to Workspace" />
564+
565+
Select the channel you want to send alerts to, then copy the Webhook URL.
566+
<ClickToZoom src={CopyWebhookURL} alt="Copy Webhook URL" />
567+
568+
569+
3. **Edit the Config File**
570+
571+
Edit `./values/alert-manager.yaml` to replace it with your webhook URL and your Slack channel name.
572+
```
573+
kube-prometheus-stack:
574+
alertmanager:
575+
config:
576+
global:
577+
resolve_timeout: 5m
578+
slack_api_url: 'https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx' # your webhook url
579+
receivers:
580+
- name: 'slack-alerts'
581+
slack_configs:
582+
- channel: '#scroll-webhook' #your channel name
583+
send_resolved: true
584+
text: '{{ .CommonAnnotations.description }}'
585+
title: '{{ .CommonAnnotations.summary }}'
586+
route:
587+
group_by: ['alertname']
588+
receiver: 'slack-alerts'
589+
routes:
590+
- matchers: []
591+
receiver: 'slack-alerts'
592+
```
593+
This configuration file will send all alerts to your Slack channel. If you need more complex rules, refer to the [Prometheus Alerting Configuration Documentation](https://prometheus.io/docs/alerting/latest/configuration/).
594+
595+
4. **Update to alertmanager**
596+
597+
Use the following command to update Alertmanager:
598+
```
599+
helm upgrade -i scroll-monitor oci://ghcr.io/scroll-tech/scroll-sdk/helm/scroll-monitor -n $(NAMESPACE) \
600+
--version=0.0.4 \
601+
--values ./values/alert-manager.yaml
602+
```

0 commit comments

Comments
 (0)