This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nano /etc/systemd/system/alertmanager.service |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemctl daemon-reload | |
systemctl start alertmanager | |
systemctl enable alertmanager | |
systemctl status alertmanager |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grafana-cli plugins install camptocamp-prometheus-alertmanager-datasource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
service grafana-server restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rule_files: | |
- alert.rules.yml | |
alerting: | |
alertmanagers: | |
- static_configs: | |
- targets: | |
- 'localhost:9093' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global: | |
scrape_interval: 10s | |
rule_files: | |
- alert.rules.yml | |
alerting: | |
alertmanagers: | |
- static_configs: | |
- targets: | |
- 'localhost:9093' | |
scrape_configs: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
groups: | |
- name: alert.rules | |
rules: | |
- alert: InstanceDown | |
expr: up == 0 | |
for: 1m | |
labels: | |
severity: "critical" | |
annotations: | |
summary: "Endpoint {{ $labels.instance }} down" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
promtool check rules alert.rules.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Host Bastion | |
Hostname x.x.x.x | |
User Ubuntu | |
Host Instance | |
Hostname x.x.x.x | |
User Ubuntu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start the SSH-Agent: | |
ssh-agent -s | |
# Add your private key that allows you to access your infrastructure | |
ssh-add -k ~/.ssh/cloud-infra-key.pem | |
# list the ssh-keys currently available in the ssh-agent | |
ssh-add -l | |
# additionally, you can remove a key from the ssh-agent using the following command | |
ssh-add -d ~/.ssh/cloud-infra-key.pem |