{"action":"created","comment":{"url":"https://api.github.com/repos/coreos/etcd/pulls/comments/107460560","pull_request_review_id":28432266,"id":107460560,"diff_hunk":"@@ -0,0 +1,206 @@\n+# general cluster availability\n+\n+# alert if another failed member will result in an unavailable cluster\n+ALERT InsufficientMembers\n+IF count(up{job=\"etcd\"} == 0) > (count(up{job=\"etcd\"}) / 2 - 1)\n+FOR 3m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"etcd cluster insufficient members\",\n+  description = \"If one more etcd member goes down the cluster will be unavailable\",\n+}\n+\n+# etcd leader alerts\n+# ==================\n+\n+# alert if any etcd instance has no leader\n+ALERT NoLeader\n+IF etcd_server_has_leader{job=\"etcd\"} == 0\n+FOR 1m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"etcd member has no leader\",\n+  description = \"etcd member {{ $labels.instance }} has no leader\",\n+}\n+\n+# alert if there are lots of leader changes\n+ALERT HighNumberOfLeaderChanges\n+IF increase(etcd_server_leader_changes_seen_total{job=\"etcd\"}[1h]) > 3\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of leader changes within the etcd cluster are happening\",\n+  description = \"etcd instance {{ $labels.instance }} has seen {{ $value }} leader changes within the last hour\",\n+}\n+\n+# gRPC request alerts\n+# ===================\n+\n+# alert if more than 1% of gRPC method calls have failed within the last 5 minutes\n+ALERT HighNumberOfFailedGRPCRequests\n+IF sum by(grpc_method) (rate(etcd_grpc_requests_failed_total{job=\"etcd\"}[5m]))\n+  / sum by(grpc_method) (rate(etcd_grpc_total{job=\"etcd\"}[5m])) > 0.01\n+FOR 10m\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of gRPC requests are failing\",\n+  description = \"{{ $value }}% of requests for {{ $labels.grpc_method }} failed on etcd instance {{ $labels.instance }}\",\n+}\n+\n+# alert if more than 5% of gRPC method calls have failed within the last 5 minutes\n+ALERT HighNumberOfFailedGRPCRequests\n+IF sum by(grpc_method) (rate(etcd_grpc_requests_failed_total{job=\"etcd\"}[5m]))\n+  / sum by(grpc_method) (rate(etcd_grpc_total{job=\"etcd\"}[5m])) > 0.05\n+FOR 5m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of gRPC requests are failing\",\n+  description = \"{{ $value }}% of requests for {{ $labels.grpc_method }} failed on etcd instance {{ $labels.instance }}\",\n+}\n+\n+# alert if the 99th percentile of gRPC method calls take more than 150ms\n+ALERT GRPCRequestsSlow\n+IF histogram_quantile(0.99, rate(etcd_grpc_unary_requests_duration_seconds_bucket[5m])) > 0.15\n+FOR 10m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"slow gRPC requests\",\n+  description = \"on ectd instance {{ $labels.instance }} gRPC requests to {{ $label.grpc_method }} are slow\",\n+}\n+\n+# HTTP requests alerts\n+# ====================\n+\n+# alert if more than 1% of requests to an HTTP endpoint have failed within the last 5 minutes\n+ALERT HighNumberOfFailedHTTPRequests\n+IF sum by(method) (rate(etcd_http_failed_total{job=\"etcd\"}[5m]))\n+  / sum by(method) (rate(etcd_http_received_total{job=\"etcd\"}[5m])) > 0.01\n+FOR 10m\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of HTTP requests are failing\",\n+  description = \"{{ $value }}% of requests for {{ $labels.method }} failed on etcd instance {{ $labels.instance }}\",\n+}\n+\n+# alert if more than 5% of requests to an HTTP endpoint have failed within the last 5 minutes\n+ALERT HighNumberOfFailedHTTPRequests\n+IF sum by(method) (rate(etcd_http_failed_total{job=\"etcd\"}[5m])) \n+  / sum by(method) (rate(etcd_http_received_total{job=\"etcd\"}[5m])) > 0.05\n+FOR 5m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of HTTP requests are failing\",\n+  description = \"{{ $value }}% of requests for {{ $labels.method }} failed on etcd instance {{ $labels.instance }}\",\n+}\n+\n+# alert if the 99th percentile of HTTP requests take more than 150ms\n+ALERT HTTPRequestsSlow\n+IF histogram_quantile(0.99, rate(etcd_http_successful_duration_seconds_bucket[5m])) > 0.15\n+FOR 10m\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"slow HTTP requests\",\n+  description = \"on ectd instance {{ $labels.instance }} HTTP requests to {{ $label.method }} are slow\",\n+}\n+\n+# file descriptor alerts\n+# ======================\n+\n+instance:fd_utilization = process_open_fds / process_max_fds\n+\n+# alert if file descriptors are likely to exhaust within the next 4 hours\n+ALERT FdExhaustionClose\n+IF predict_linear(instance:fd_utilization[1h], 3600 * 4) > 1\n+FOR 10m\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"file descriptors soon exhausted\",\n+  description = \"{{ $labels.job }} instance {{ $labels.instance }} will exhaust in file descriptors soon\",\n+}\n+\n+# alert if file descriptors are likely to exhaust within the next hour\n+ALERT FdExhaustionClose\n+IF predict_linear(instance:fd_utilization[10m], 3600) > 1\n+FOR 10m\n+LABELS {\n+  severity = \"critical\"\n+}\n+ANNOTATIONS {\n+  summary = \"file descriptors soon exhausted\",\n+  description = \"{{ $labels.job }} instance {{ $labels.instance }} will exhaust in file descriptors soon\",\n+}\n+\n+# etcd member communication alerts\n+# ================================\n+\n+# alert if 99th percentile of round trips take 150ms\n+ALERT EtcdMemberCommunicationSlow\n+IF histogram_quantile(0.99, rate(etcd_network_member_round_trip_time_seconds_bucket[5m])) > 0.15\n+FOR 10m\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"etcd member communication is slow\",\n+  description = \"ectd instance {{ $labels.instance }} member communication with {{ $label.To }} is slow\",\n+}\n+\n+# etcd proposal alerts\n+# ====================\n+\n+# alert if there are several failed proposals within an hour\n+ALERT HighNumberOfFailedProposals\n+IF increase(etcd_server_proposals_failed_total{job=\"etcd\"}[1h]) > 5\n+LABELS {\n+  severity = \"warning\"\n+}\n+ANNOTATIONS {\n+  summary = \"a high number of failed proposals within the etcd cluster are happening\",","path":"Documentation/op-guide/etcd3_alert.rules","position":177,"original_position":177,"commit_id":"c61de601e6ed6496252b1a37ead35c9cfa26526b","original_commit_id":"c61de601e6ed6496252b1a37ead35c9cfa26526b","user":{"login":"heyitsanthony","id":16294350,"avatar_url":"https://avatars1.githubusercontent.com/u/16294350?v=3","gravatar_id":"","url":"https://api.github.com/users/heyitsanthony","html_url":"https://github.com/heyitsanthony","followers_url":"https://api.github.com/users/heyitsanthony/followers","following_url":"https://api.github.com/users/heyitsanthony/following{/other_user}","gists_url":"https://api.github.com/users/heyitsanthony/gists{/gist_id}","starred_url":"https://api.github.com/users/heyitsanthony/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heyitsanthony/subscriptions","organizations_url":"https://api.github.com/users/heyitsanthony/orgs","repos_url":"https://api.github.com/users/heyitsanthony/repos","events_url":"https://api.github.com/users/heyitsanthony/events{/privacy}","received_events_url":"https://api.github.com/users/heyitsanthony/received_events","type":"User","site_admin":false},"body":"`a high number of proposals within the etcd cluster are failing`?","created_at":"2017-03-22T16:19:44Z","updated_at":"2017-03-22T16:23:35Z","html_url":"https://github.com/coreos/etcd/pull/7556#discussion_r107460560","pull_request_url":"https://api.github.com/repos/coreos/etcd/pulls/7556","_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments/107460560"},"html":{"href":"https://github.com/coreos/etcd/pull/7556#discussion_r107460560"},"pull_request":{"href":"https://api.github.com/repos/coreos/etcd/pulls/7556"}}},"pull_request":{"url":"https://api.github.com/repos/coreos/etcd/pulls/7556","id":111820146,"html_url":"https://github.com/coreos/etcd/pull/7556","diff_url":"https://github.com/coreos/etcd/pull/7556.diff","patch_url":"https://github.com/coreos/etcd/pull/7556.patch","issue_url":"https://api.github.com/repos/coreos/etcd/issues/7556","number":7556,"state":"open","locked":false,"title":"Documentation: add Prometheus alerting rules","user":{"login":"brancz","id":4546722,"avatar_url":"https://avatars0.githubusercontent.com/u/4546722?v=3","gravatar_id":"","url":"https://api.github.com/users/brancz","html_url":"https://github.com/brancz","followers_url":"https://api.github.com/users/brancz/followers","following_url":"https://api.github.com/users/brancz/following{/other_user}","gists_url":"https://api.github.com/users/brancz/gists{/gist_id}","starred_url":"https://api.github.com/users/brancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brancz/subscriptions","organizations_url":"https://api.github.com/users/brancz/orgs","repos_url":"https://api.github.com/users/brancz/repos","events_url":"https://api.github.com/users/brancz/events{/privacy}","received_events_url":"https://api.github.com/users/brancz/received_events","type":"User","site_admin":false},"body":"Adding the etcd alerting rules we developed. This way they have visibility and we can collaborate on them together with the community. The etcd2 rules are basically a subset of the etcd3 rules as etcd3 introduced a lot of new metrics that we were able to write alerts for.\r\n\r\nI remember that we had previously reviewed the alerts together, but feel free to review them again! :slightly_smiling_face: \r\n\r\n@hongchaodeng @xiang90 ","created_at":"2017-03-21T16:22:15Z","updated_at":"2017-03-22T16:23:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"84f6047b815fc70bec386f98ef3982b0293fd0ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/coreos/etcd/pulls/7556/commits","review_comments_url":"https://api.github.com/repos/coreos/etcd/pulls/7556/comments","review_comment_url":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}","comments_url":"https://api.github.com/repos/coreos/etcd/issues/7556/comments","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/c61de601e6ed6496252b1a37ead35c9cfa26526b","head":{"label":"brancz:prom-rules","ref":"prom-rules","sha":"c61de601e6ed6496252b1a37ead35c9cfa26526b","user":{"login":"brancz","id":4546722,"avatar_url":"https://avatars0.githubusercontent.com/u/4546722?v=3","gravatar_id":"","url":"https://api.github.com/users/brancz","html_url":"https://github.com/brancz","followers_url":"https://api.github.com/users/brancz/followers","following_url":"https://api.github.com/users/brancz/following{/other_user}","gists_url":"https://api.github.com/users/brancz/gists{/gist_id}","starred_url":"https://api.github.com/users/brancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brancz/subscriptions","organizations_url":"https://api.github.com/users/brancz/orgs","repos_url":"https://api.github.com/users/brancz/repos","events_url":"https://api.github.com/users/brancz/events{/privacy}","received_events_url":"https://api.github.com/users/brancz/received_events","type":"User","site_admin":false},"repo":{"id":85722608,"name":"etcd","full_name":"brancz/etcd","owner":{"login":"brancz","id":4546722,"avatar_url":"https://avatars0.githubusercontent.com/u/4546722?v=3","gravatar_id":"","url":"https://api.github.com/users/brancz","html_url":"https://github.com/brancz","followers_url":"https://api.github.com/users/brancz/followers","following_url":"https://api.github.com/users/brancz/following{/other_user}","gists_url":"https://api.github.com/users/brancz/gists{/gist_id}","starred_url":"https://api.github.com/users/brancz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brancz/subscriptions","organizations_url":"https://api.github.com/users/brancz/orgs","repos_url":"https://api.github.com/users/brancz/repos","events_url":"https://api.github.com/users/brancz/events{/privacy}","received_events_url":"https://api.github.com/users/brancz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brancz/etcd","description":"Distributed reliable key-value store for the most critical data of a distributed system","fork":true,"url":"https://api.github.com/repos/brancz/etcd","forks_url":"https://api.github.com/repos/brancz/etcd/forks","keys_url":"https://api.github.com/repos/brancz/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brancz/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brancz/etcd/teams","hooks_url":"https://api.github.com/repos/brancz/etcd/hooks","issue_events_url":"https://api.github.com/repos/brancz/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/brancz/etcd/events","assignees_url":"https://api.github.com/repos/brancz/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/brancz/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/brancz/etcd/tags","blobs_url":"https://api.github.com/repos/brancz/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brancz/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brancz/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/brancz/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brancz/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/brancz/etcd/languages","stargazers_url":"https://api.github.com/repos/brancz/etcd/stargazers","contributors_url":"https://api.github.com/repos/brancz/etcd/contributors","subscribers_url":"https://api.github.com/repos/brancz/etcd/subscribers","subscription_url":"https://api.github.com/repos/brancz/etcd/subscription","commits_url":"https://api.github.com/repos/brancz/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/brancz/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/brancz/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/brancz/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/brancz/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/brancz/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brancz/etcd/merges","archive_url":"https://api.github.com/repos/brancz/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brancz/etcd/downloads","issues_url":"https://api.github.com/repos/brancz/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/brancz/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/brancz/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/brancz/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brancz/etcd/labels{/name}","releases_url":"https://api.github.com/repos/brancz/etcd/releases{/id}","deployments_url":"https://api.github.com/repos/brancz/etcd/deployments","created_at":"2017-03-21T15:55:33Z","updated_at":"2017-03-21T15:55:37Z","pushed_at":"2017-03-22T15:21:41Z","git_url":"git://github.com/brancz/etcd.git","ssh_url":"git@github.com:brancz/etcd.git","clone_url":"https://github.com/brancz/etcd.git","svn_url":"https://github.com/brancz/etcd","homepage":"https://coreos.com/etcd/docs/latest/","size":29743,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"coreos:master","ref":"master","sha":"ff6d6867b06e82bb011770130d6d9580818e0cce","user":{"login":"coreos","id":3730757,"avatar_url":"https://avatars0.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"repo":{"id":11225014,"name":"etcd","full_name":"coreos/etcd","owner":{"login":"coreos","id":3730757,"avatar_url":"https://avatars0.githubusercontent.com/u/3730757?v=3","gravatar_id":"","url":"https://api.github.com/users/coreos","html_url":"https://github.com/coreos","followers_url":"https://api.github.com/users/coreos/followers","following_url":"https://api.github.com/users/coreos/following{/other_user}","gists_url":"https://api.github.com/users/coreos/gists{/gist_id}","starred_url":"https://api.github.com/users/coreos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreos/subscriptions","organizations_url":"https://api.github.com/users/coreos/orgs","repos_url":"https://api.github.com/users/coreos/repos","events_url":"https://api.github.com/users/coreos/events{/privacy}","received_events_url":"https://api.github.com/users/coreos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/coreos/etcd","description":"Distributed reliable key-value store for the most critical data of a distributed system","fork":false,"url":"https://api.github.com/repos/coreos/etcd","forks_url":"https://api.github.com/repos/coreos/etcd/forks","keys_url":"https://api.github.com/repos/coreos/etcd/keys{/key_id}","collaborators_url":"https://api.github.com/repos/coreos/etcd/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/coreos/etcd/teams","hooks_url":"https://api.github.com/repos/coreos/etcd/hooks","issue_events_url":"https://api.github.com/repos/coreos/etcd/issues/events{/number}","events_url":"https://api.github.com/repos/coreos/etcd/events","assignees_url":"https://api.github.com/repos/coreos/etcd/assignees{/user}","branches_url":"https://api.github.com/repos/coreos/etcd/branches{/branch}","tags_url":"https://api.github.com/repos/coreos/etcd/tags","blobs_url":"https://api.github.com/repos/coreos/etcd/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/coreos/etcd/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/coreos/etcd/git/refs{/sha}","trees_url":"https://api.github.com/repos/coreos/etcd/git/trees{/sha}","statuses_url":"https://api.github.com/repos/coreos/etcd/statuses/{sha}","languages_url":"https://api.github.com/repos/coreos/etcd/languages","stargazers_url":"https://api.github.com/repos/coreos/etcd/stargazers","contributors_url":"https://api.github.com/repos/coreos/etcd/contributors","subscribers_url":"https://api.github.com/repos/coreos/etcd/subscribers","subscription_url":"https://api.github.com/repos/coreos/etcd/subscription","commits_url":"https://api.github.com/repos/coreos/etcd/commits{/sha}","git_commits_url":"https://api.github.com/repos/coreos/etcd/git/commits{/sha}","comments_url":"https://api.github.com/repos/coreos/etcd/comments{/number}","issue_comment_url":"https://api.github.com/repos/coreos/etcd/issues/comments{/number}","contents_url":"https://api.github.com/repos/coreos/etcd/contents/{+path}","compare_url":"https://api.github.com/repos/coreos/etcd/compare/{base}...{head}","merges_url":"https://api.github.com/repos/coreos/etcd/merges","archive_url":"https://api.github.com/repos/coreos/etcd/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/coreos/etcd/downloads","issues_url":"https://api.github.com/repos/coreos/etcd/issues{/number}","pulls_url":"https://api.github.com/repos/coreos/etcd/pulls{/number}","milestones_url":"https://api.github.com/repos/coreos/etcd/milestones{/number}","notifications_url":"https://api.github.com/repos/coreos/etcd/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/coreos/etcd/labels{/name}","releases_url":"https://api.github.com/repos/coreos/etcd/releases{/id}","deployments_url":"https://api.github.com/repos/coreos/etcd/deployments","created_at":"2013-07-06T21:57:21Z","updated_at":"2017-03-22T15:04:06Z","pushed_at":"2017-03-22T15:55:55Z","git_url":"git://github.com/coreos/etcd.git","ssh_url":"git@github.com:coreos/etcd.git","clone_url":"https://github.com/coreos/etcd.git","svn_url":"https://github.com/coreos/etcd","homepage":"https://coreos.com/etcd/docs/latest/","size":29760,"stargazers_count":12766,"watchers_count":12766,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2363,"mirror_url":null,"open_issues_count":148,"forks":2363,"open_issues":148,"watchers":12766,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/coreos/etcd/pulls/7556"},"html":{"href":"https://github.com/coreos/etcd/pull/7556"},"issue":{"href":"https://api.github.com/repos/coreos/etcd/issues/7556"},"comments":{"href":"https://api.github.com/repos/coreos/etcd/issues/7556/comments"},"review_comments":{"href":"https://api.github.com/repos/coreos/etcd/pulls/7556/comments"},"review_comment":{"href":"https://api.github.com/repos/coreos/etcd/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/coreos/etcd/pulls/7556/commits"},"statuses":{"href":"https://api.github.com/repos/coreos/etcd/statuses/c61de601e6ed6496252b1a37ead35c9cfa26526b"}}}}
{"actor":{"display_login":"heyitsanthony"}}