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
| {{ define "Cluster_Down_Detection" }} | |
| {{ if gt (len .Alerts.Firing) 0 }} | |
| Alerts : {{ len .Alerts.Firing }} 🔔 | |
| {{ range .Alerts.Firing }} {{ if gt (len .Annotations) 0 }} | |
| Alert Name : | |
| {{ .Annotations.summary }} ⚠️ | |
| Description: | |
| 🔵 {{ .Annotations.description }} | |
| 🟢 Available : {{ .Values.A }} |
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
| {{ define "Notificationg" }} | |
| {{ if gt (len .Alerts.Firing) 0 }} | |
| Alerts : {{ len .Alerts.Firing }} 🔔 | |
| {{ range .Alerts.Firing }} {{ if gt (len .Annotations) 0 }} | |
| ⚠️ {{ .Annotations.summary }} | |
| {{ .Annotations.description }} | |
| Timestamp: |
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
| ## Menemukan instances pengguna CPU/Memory tertinggi ( --sort=-%cpu / --sort=-%mem) | |
| [tripleo-admin@Openstack-Compute-2 ~]$ ps aux --sort=-%cpu | awk 'NR==1 {print $1, $2, $3, $4, "UUID"} / -uuid / {for(i=1;i<=NF;i++) if($i=="-uuid") {print $1, $2, $3, $4, $(i+1)}}' | column -t | |
| USER PID %CPU %MEM UUID | |
| qemu 691730 2646 16.9 457990e4-8d26-4f18-9940-72f652b99572 | |
| qemu 75529 1165 1.1 e6175dac-d40f-4375-855c-b48632a28d68 | |
| qemu 213227 775.4 4.1 148f0a0b-b13d-4718-aff2-1bc2b11ec505 | |
| admin 1642873 0.0 0.0 / |
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
| scrape_configs: | |
| - job_name: 'blackbox' ## Backbox-Exporter Config | |
| metrics_path: /probe | |
| params: | |
| module: [http_2xx] # Module defined in blackbox.yml | |
| static_configs: | |
| - targets: | |
| - https://i-3.co.id/ # Website 01 | |
| - https://fake-json-api.mock.beeceptor.com/users # Function 01 | |
| - https://fake-json-api.mock.beeceptor.com/companies # Function 02 |
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
| modules: | |
| http_2xx: | |
| prober: http | |
| http: | |
| preferred_ip_protocol: "ip4" | |
| http_post_2xx: | |
| prober: http | |
| http: | |
| method: POST | |
| tcp_connect: |
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
| [Unit] | |
| Description=Blackbox Exporter | |
| Documentation= Blackbox | |
| Wants=network-online.target | |
| After=network-online.target | |
| [Service] | |
| User=root | |
| Group=root | |
| Type=simple |
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
| #!/bin/bash | |
| DAY="$(date +%Y_%m_%d)" | |
| BACKUP="/home/$USER/DIRECTORY/$DAY-backup-ServiceAA.tar.gz" | |
| tar -csvpzf $BACKUP /home/$USER/ServiceAA |
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
| #cloud-config | |
| chpasswd: | |
| list: | | |
| root:ridwan | |
| expire: false | |
| ssh_pwauth: true | |
| runcmd: | |
| - sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config |
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 | |
| log /dev/log local0 | |
| log /dev/log local1 notice | |
| maxconn 2048 | |
| user haproxy | |
| group haproxy | |
| daemon | |
| tune.ssl.default-dh-param 2048 | |
| defaults |
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
| ## SSH Copy ID | |
| [ridwan@WarMachine]$ | |
| $ for i in {01,02,03}; do ssh-copy-id root@MicroCloud-${i};done | |
| # SCP File preseed.yml | |
| $ for i in {01,02,03}; do scp preseed.yaml root@MicroCloud-${i}:/root/; done | |
| ## RUN Preseed command to All Node Secara bersama | |
| $ for i in {01,02,03}; do ssh root@MicroCloud-${i} "hostname && \ | |
| cat preseed.yaml | microcloud preseed > initialize-output.txt"& done |
NewerOlder