Prometheus Scrape

2020 It邦幫忙鐵人賽 系列文章 Prometheus / Grafana (5) GKE 上自架 Prometheus GKE 上自架 Grafana scrape config & exporter Dive into Redis Exporter 輸出 kube-state 的監測數據 由於我比較熟悉 GCP / GKE 的服務,這篇的操作過程都會以 GCP 平台作為範例,不過操作過程大體上是跨平台通用的。 寫文章真的是體力活,覺得我的文章還有參考價值,請左邊幫我點讚按個喜歡,右上角幫我按個追縱,底下歡迎留言討論。給我一點繼續走下去的動力。 對我的文章有興趣,歡迎到我的網站上 https://chechia.net 閱讀其他技術文章,有任何謬誤也請各方大德直接聯繫我,感激不盡。 摘要 Prometheus scrape scrape_configs Node exporter Scrape Prometheus 收集 metrics 的方式,是從被監測的目標的 http endpoints 收集 (scrape) metrics,目標服務有提供 export metrics 的 endpoint 的話,稱作 exporter。例如 kafka-exporter 就會收集 kafka 運行的 metrics,變成 http endpoint instance,prometheus 從 instance 上面收集資料。 ...

October 4, 2019 · 3 min · 517 words · chechiachang

Redis Ha Failure Recovery

2020 It邦幫忙鐵人賽 系列文章 在 GKE 上部署 Redis HA (5) 使用 helm 部署 redis-ha Redis HA with sentinel Redis sentinel topology Redis HA with HAproxy Redis HA Failure Recovery Prometheus Metrics Exporter 由於我比較熟悉 GCP / GKE 的服務,這篇的操作過程都會以 GCP 平台作為範例,不過操作過程大體上是跨平台通用的。 寫文章真的是體力活,覺得我的文章還有參考價值,請左邊幫我點讚按個喜歡,右上角幫我按個追縱,底下歡迎留言討論。給我一點繼續走下去的動力。 對我的文章有興趣,歡迎到我的網站上 https://chechia.net 閱讀其他技術文章,有任何謬誤也請各方大德直接聯繫我,感激不盡。 摘要 Failure Case Recovery Topology 上篇的例子完成應該是這樣 +-------+ +--------+ +------------+ +---------+ |Clients|---|HAProxys|----|redis master|----|sentinels| +-------+ +--------+ +------------+ +---------+ HAproxy 作為後端 redis 的 gateway Client 透過 HAproxy 連入 redis master sentinel 負責監測 redis 狀態與 failover,只是 client 不再透過 sentinel 去取得 master,而是透過 HAProxy。 那現在就來聊聊這些服務可能怎麼死的,回復的機制又是如何 ...

October 3, 2019 · 2 min · 372 words · chechiachang

Redis Ha HAProxy

2020 It邦幫忙鐵人賽 系列文章 在 GKE 上部署 Redis HA (5) 使用 helm 部署 redis-ha Redis HA with sentinel Redis sentinel topology Redis HA with HAproxy Redis HA Failure Recovery Prometheus Metrics Exporter 由於我比較熟悉 GCP / GKE 的服務,這篇的操作過程都會以 GCP 平台作為範例,不過操作過程大體上是跨平台通用的。 寫文章真的是體力活,覺得我的文章還有參考價值,請左邊幫我點讚按個喜歡,右上角幫我按個追縱,底下歡迎留言討論。給我一點繼續走下去的動力。 對我的文章有興趣,歡迎到我的網站上 https://chechia.net 閱讀其他技術文章,有任何謬誤也請各方大德直接聯繫我,感激不盡。 摘要 HAProxy Introduction Redis Sentinel with HAProxy HAProxy Intro HAproxy 全名是 High Availability Proxy,是一款開源 TCP/HTTP load balancer,他可以 聽 tcp socket,連 server,然後把 socket 接在一起讓雙向流通 可做 Http reverse-proxy (Http gateway),自己作為代理 server,把接受到的 connection 傳到後端的 server。 SSL 終端,可支援 client-side 與 server-side 的 ssl/tls 當 tcp/http normalizer 更改 http 的 request 與 response 當 switch,決定 request 後送的目標 做 load balancer,為後端 server 做負載均衡 調節流量,設定 rate limit,或是根據內容調整流量 HAProxy 還有其他非常多的功能,想了解細節可以來看原理解說文件 ...

October 2, 2019 · 4 min · 800 words · chechiachang

Redis Ha Topology

2020 It邦幫忙鐵人賽 系列文章 在 GKE 上部署 Redis HA (5) 使用 helm 部署 redis-ha Redis HA with sentinel Redis sentinel topology Redis HA with HAproxy Redis HA Failure Recovery Prometheus Metrics Exporter 由於我比較熟悉 GCP / GKE 的服務,這篇的操作過程都會以 GCP 平台作為範例,不過操作過程大體上是跨平台通用的。 寫文章真的是體力活,覺得我的文章還有參考價值,請左邊幫我點讚按個喜歡,右上角幫我按個追縱,底下歡迎留言討論。給我一點繼續走下去的動力。 對我的文章有興趣,歡迎到我的網站上 https://chechia.net 閱讀其他技術文章,有任何謬誤也請各方大德直接聯繫我,感激不盡。 摘要 Redis Sentinel Topology Topology Masters: M1, M2, M3, …, Mn. Slaves: R1, R2, R3, …, Rn (R stands for replica). Sentinels: S1, S2, S3, …, Sn. Clients: C1, C2, C3, …, Cn. 每個方格代表一台機器或是 VM 2 Sentinels DON’T DO THIS ...

September 30, 2019 · 2 min · 399 words · chechiachang

Redis Ha Sentinel

2020 It邦幫忙鐵人賽 系列文章 在 GKE 上部署 Redis HA (5) 使用 helm 部署 redis-ha Redis HA with sentinel Redis sentinel topology Redis HA with HAproxy Redis HA Failure Recovery Prometheus Metrics Exporter 由於我比較熟悉 GCP / GKE 的服務,這篇的操作過程都會以 GCP 平台作為範例,不過操作過程大體上是跨平台通用的。 寫文章真的是體力活,覺得我的文章還有參考價值,請左邊幫我點讚按個喜歡,右上角幫我按個追縱,底下歡迎留言討論。給我一點繼續走下去的動力。 對我的文章有興趣,歡迎到我的網站上 https://chechia.net 閱讀其他技術文章,有任何謬誤也請各方大德直接聯繫我,感激不盡。 摘要 redis-sentinel redis sentinel 與 redis 使用相容的 api,直接使用 redis-cli 透過 26479 port 連入,可以連到 sentinel,透過 sentinel 可以取得 redis master 的狀態與連線設定。 redis-cli -h redis-redis-ha -p 26479 上篇我們的 redis-ha 安裝完變這樣 ...

September 29, 2019 · 4 min · 784 words · chechiachang