{"id":16614,"date":"2017-10-23T15:30:17","date_gmt":"2017-10-23T06:30:17","guid":{"rendered":"http:\/\/labs.gree.jp\/blog\/?p=16614"},"modified":"2017-10-23T15:31:31","modified_gmt":"2017-10-23T06:31:31","slug":"prometheus%e3%81%ab%e3%82%88%e3%82%8b%e6%95%b0%e7%99%be%e5%8f%b0%e8%a6%8f%e6%a8%a1%e3%81%ae%e3%83%a2%e3%83%8b%e3%82%bf%e3%83%aa%e3%83%b3%e3%82%b0%e3%81%a7%e7%9b%b4%e9%9d%a2%e3%81%97%e3%81%9f%e5%95%8f","status":"publish","type":"post","link":"https:\/\/labs.gree.jp\/blog\/2017\/10\/16614\/","title":{"rendered":"Prometheus\u306b\u3088\u308b\u6570\u767e\u53f0\u898f\u6a21\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3067\u76f4\u9762\u3057\u305f\u554f\u984c\u306b\u3064\u3044\u3066"},"content":{"rendered":"<p>\u30a4\u30f3\u30d5\u30e9\u306e\u53cd\u7530 (@mtanda) \u3067\u3059\u3002<\/p>\n<p>GREE\u3067\u306f\u3001\u591a\u304f\u306e\u30b5\u30fc\u30d3\u30b9\u3092AWS\u74b0\u5883\u3067\u904b\u7528\u3057\u3066\u304a\u308a\u3001\u305d\u308c\u3089\u30b5\u30fc\u30d3\u30b9\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066Prometheus\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Prometheus\u3092\u5c0e\u5165\u3057\u3066\u304b\u3089\u7d042\u5e74\u304c\u305f\u3061\u30011\u53f0\u306ePrometheus\u3067\u6570\u767e\u53f0\u898f\u6a21\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u306a\u304b\u3067\u3001\u3055\u307e\u3056\u307e\u306a\u554f\u984c\u306b\u76f4\u9762\u3057\u307e\u3057\u305f\u3002<br \/>\n\u305d\u308c\u3089\u554f\u984c\u306e\u539f\u56e0\u3092\u5206\u6790\u3057\u3001\u8a2d\u5b9a\u3084\u5229\u7528\u306e\u4ed5\u65b9\u3092\u6539\u5584\u3059\u308b\u3053\u3068\u3067\u3001\u3042\u308b\u7a0b\u5ea6\u5b89\u5b9a\u3057\u3066\u904b\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u77e5\u898b\u304c\u5c11\u3057\u3067\u3082\u304a\u5f79\u306b\u7acb\u3066\u3070\u3068\u601d\u3044\u3001\u3053\u3053\u3067\u5171\u6709\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u5bfe\u8c61\u3068\u3059\u308bPrometheus\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f1.x\u3067\u3059\u3002Prometheus 2.0\u3067\u306f\u3001\u3053\u308c\u3089\u554f\u984c\u306e\u307b\u307c\u5168\u3066\u306b\u5bfe\u3057\u3066\u6539\u5584\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u30012.0\u3067\u3069\u3046\u3044\u3063\u305f\u70b9\u304c\u6539\u5584\u3055\u308c\u3066\u3044\u308b\u304b\u3092\u77e5\u308b\u305f\u3081\u306b\u3082\u6709\u7528\u3060\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>Prometheus\u306e\u30b9\u30c8\u30ec\u30fc\u30b8\u5b9f\u88c5\u306e\u57fa\u790e\u77e5\u8b58<\/h2>\n<p>Prometheus\u3092\u904b\u7528\u3059\u308b\u306b\u3042\u305f\u3063\u3066\u3001\u4e8b\u524d\u306b\u30b9\u30c8\u30ec\u30fc\u30b8\u306e\u5b9f\u88c5\u3092\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u3067\u3001\u554f\u984c\u306e\u539f\u56e0\u5206\u6790\u304c\u3057\u3084\u3059\u304f\u306a\u308b\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30d5\u30e9\u30b0\u306e\"-storage.local.path\"\u3067\u6307\u5b9a\u3055\u308c\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u304c\u4fdd\u5b58\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<pre class=\"toolbar:2 striped:false nums:false lang:default highlight:0 decode:true\">% find data -type f\ndata\/6e\/ba9261f76a4de1.db\ndata\/6f\/74c9f9d4d9c41b.db\ndata\/archived_fingerprint_to_metric\/000001.log\ndata\/archived_fingerprint_to_metric\/CURRENT\ndata\/archived_fingerprint_to_metric\/LOCK\ndata\/archived_fingerprint_to_metric\/LOG\ndata\/archived_fingerprint_to_metric\/MANIFEST-000000\ndata\/archived_fingerprint_to_timerange\/000001.log\ndata\/archived_fingerprint_to_timerange\/CURRENT\ndata\/archived_fingerprint_to_timerange\/LOCK\ndata\/archived_fingerprint_to_timerange\/LOG\ndata\/archived_fingerprint_to_timerange\/MANIFEST-000000\ndata\/heads.db\ndata\/labelname_to_labelvalues\/000001.log\ndata\/labelname_to_labelvalues\/CURRENT\ndata\/labelname_to_labelvalues\/LOCK\ndata\/labelname_to_labelvalues\/LOG\ndata\/labelname_to_labelvalues\/MANIFEST-000000\ndata\/labelpair_to_fingerprints\/000001.log\ndata\/labelpair_to_fingerprints\/CURRENT\ndata\/labelpair_to_fingerprints\/LOCK\ndata\/labelpair_to_fingerprints\/LOG\ndata\/labelpair_to_fingerprints\/MANIFEST-000000\ndata\/mappings.db\ndata\/VERSION<\/pre>\n<p>\"data\/6e\/ba9261f76a4de1.db\"\u306e\u3088\u3046\u306a\u547d\u540d\u898f\u5247\u306e\u30d5\u30a1\u30a4\u30eb\u304c\u3001Prometheus\u306e1 time series\u306b\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u5404time series\u306b\u3064\u3051\u3089\u308c\u305f\u30e9\u30d9\u30eb\u306e\u7d44\u307f\u5408\u308f\u305b\u304b\u3089\u4e00\u610f\u306afingerprint\u304c\u751f\u6210\u3055\u308c\u3001fingerprint\u306b\u5bfe\u5fdc\u3057\u305f\u30d5\u30a1\u30a4\u30eb\u30d1\u30b9\u306btime series\u304c\u8a18\u9332\u3055\u308c\u307e\u3059\u3002<\/p>\n<p>time series\u306e\u4e2d\u306f\u56fa\u5b9a\u95771024\u30d0\u30a4\u30c8\u306echunk\u3068\u3044\u3046\u5358\u4f4d\u3067\u7d30\u304b\u304f\u5206\u3051\u3089\u308c\u3066\u3044\u3066\u3001chunk\u306e\u5358\u4f4d\u3067\u8aad\u307f\u66f8\u304d\u3055\u308c\u307e\u3059\u3002<br \/>\nPrometheus\u306e\u30e1\u30e2\u30ea\u4e0a\u306b\u5c55\u958b\u3055\u308c\u305fchunk\u306f\u3001chunk\u304c\u542b\u3080\u30c7\u30fc\u30bf\u306e\u671f\u9593\u3068\u3044\u3063\u305f\u60c5\u5831\u3068\u5171\u306bchunkDesc\u3068\u3044\u3046\u69cb\u9020\u4f53\u3067\u7ba1\u7406\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/chunk\/chunk.go#L79-L118\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/chunk\/chunk.go#L79-L118<\/a><\/p>\n<h2>Prometheus\u306e\u30e1\u30c8\u30ea\u30af\u30b9<\/h2>\n<p>Prometheus\u81ea\u4f53\u304c\u904b\u7528\u306b\u5f79\u7acb\u3064\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u51fa\u529b\u3057\u3066\u3044\u308b\u306e\u3067\u3001\u3053\u308c\u3089\u3092\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u3059\u308b\u3053\u3068\u3067\u3001\u554f\u984c\u306e\u65e9\u671f\u691c\u77e5\u3084\u539f\u56e0\u8abf\u67fb\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>time series\u3001chunk\u3001chukDesc\u306b\u5bfe\u3059\u308boperation\u306e\u767a\u751f\u56de\u6570\u306f\u3001\u7a81\u767a\u7684\u306a\u8ca0\u8377\u4e0a\u6607\u3068\u3044\u3063\u305f\u554f\u984c\u306e\u539f\u56e0\u8abf\u67fb\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li>prometheus_local_storage_series_ops_total<\/li>\n<li>prometheus_local_storage_chunk_ops_total<\/li>\n<li>prometheus_local_storage_chunkdesc_ops_total<\/li>\n<\/ul>\n<p>\u5404\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u53ce\u96c6\u3055\u308c\u305f\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u30c7\u30a3\u30b9\u30af\u3078\u66f8\u304d\u51fa\u3059\u51e6\u7406\u306b\u9045\u5ef6\u304c\u306a\u3044\u304b\u306f\u3001\u4ee5\u4e0b\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u304c\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<ul>\n<li>prometheus_local_storage_persistence_urgency_score<\/li>\n<li>prometheus_local_storage_rushed_mode<\/li>\n<\/ul>\n<p>urgency score\u304c0.8\u3092\u8d85\u3048\u308b\u3068\u3001rushed mode\u306b\u306a\u308a\u3001\u30e1\u30e2\u30ea\u4e0a\u306b\u3042\u308bchunk\u3092\u5f37\u5236\u7684\u306b\u66f8\u304d\u51fa\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1865\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1865<\/a><\/p>\n<p>1\u3092\u8d85\u3048\u308b\u3068\u3001\u30e1\u30c8\u30ea\u30af\u30b9\u306e\u53ce\u96c6\u81ea\u4f53\u304c\u3055\u308c\u306a\u304f\u306a\u308a\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L971\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L971<\/a><\/p>\n<p>Prometheus\u304c\u958b\u304f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6570\u306b\u3082\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002<br \/>\nprocess_open_fds\u304cprocess_max_fds\u3092\u8d85\u3048\u306a\u3044\u3088\u3046\u306b\u3001OS\u5074\u306e\u8a2d\u5b9a\u3092\u8abf\u6574\u3057\u307e\u3059\u3002<\/p>\n<ul>\n<li>process_max_fds<\/li>\n<li>process_open_fds<\/li>\n<\/ul>\n<p>\u307e\u305f\u3001Prometheus\u306e\u5185\u90e8\u51e6\u7406\u3067\u767a\u751f\u3057\u305f\u30a8\u30e9\u30fc\u56de\u6570\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u76e3\u8996\u3057\u3066\u304a\u304f\u3068\u3001\u5185\u90e8\u3067\u8d77\u3053\u3063\u3066\u3044\u308b\u554f\u984c\u3092\u65e9\u671f\u306b\u691c\u77e5\u3067\u304d\u307e\u3059\u3002<br \/>\n\u30b9\u30c8\u30ec\u30fc\u30b8\u306b\u8d77\u56e0\u3059\u308b\u554f\u984c\u3001\u30a2\u30e9\u30fc\u30c8\u901a\u77e5\u3084\u30a2\u30e9\u30fc\u30c8\u30eb\u30fc\u30eb\u8a55\u4fa1\u306e\u5931\u6557\u306a\u3069\u3001\u3044\u305a\u308c\u3082\u76e3\u8996\u304c\u6b63\u5e38\u306b\u52d5\u3044\u3066\u3044\u308b\u304b\u78ba\u8a8d\u3059\u308b\u305f\u3081\u306b\u91cd\u8981\u306a\u3082\u306e\u3070\u304b\u308a\u3067\u3059\u3002<br \/>\nalertmanager\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306f\u3001alertmanager\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u3082\u53ce\u96c6\u3057\u3066\u76e3\u8996\u3057\u3066\u304a\u304f\u3068\u3088\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>prometheus_local_storage_inconsistencies_total<\/li>\n<li>prometheus_local_storage_non_existent_series_matches_total<\/li>\n<li>prometheus_local_storage_persist_errors_total<\/li>\n<li>prometheus_notifications_dropped_total<\/li>\n<li>prometheus_notifications_errors_total<\/li>\n<li>prometheus_rule_evaluation_failures_total<\/li>\n<\/ul>\n<h2>\u554f\u984c\u306e\u4e8b\u4f8b\u96c6<\/h2>\n<h3>\u4e8b\u4f8b1 inodes\u304c\u67af\u6e07(\u3057\u305d\u3046\u306b\u306a\u308b)<\/h3>\n<p>\u554f\u984c: inodes\u306e\u4e0d\u8db3<br \/>\n\u5f71\u97ff: inodes\u6570\u306e\u76e3\u8996\u306b\u3088\u308a\u67af\u6e07\u524d\u306b\u691c\u77e5\u3067\u304d\u305f\u305f\u3081\u3001\u5f71\u97ff\u306f\u306a\u304b\u3063\u305f<br \/>\n\u539f\u56e0: Auto Scaling\u3067\u306e\u983b\u7e41\u306a\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u306b\u3088\u308btime series\u6570\u306e\u6025\u5897<br \/>\n\u5bfe\u5fdc: \u4e0d\u8db3\u3059\u308binodes\u3092\u88dc\u3046\u305f\u3081\u3001EBS\u306e\u5bb9\u91cf\u3092\u62e1\u5f35<\/p>\n<p>\u65e5\u6bce\u306b\u6570\u5341\u53f0\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u3053\u3068\u3067\u3001time series\u6570 (= inodes\u6570)\u304c10\u4e07\u5358\u4f4d\u3067\u5897\u3048\u3066\u3044\u307e\u3057\u305f\u3002<br \/>\n\u524d\u3082\u3063\u3066\u5fc5\u8981\u6570\u3092\u898b\u7a4d\u3082\u308b\u3053\u3068\u3082\u96e3\u3057\u3044\u306e\u3067\u3001\u76e3\u8996\u306b\u3072\u3063\u304b\u304b\u3063\u305f\u5834\u5408\u306f\u3001\u90fd\u5ea6EBS\u3092\u62e1\u5f35\u3057\u3066\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16623\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage-600x370.png\" alt=\"\" width=\"600\" height=\"370\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage-600x370.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage-276x170.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage-768x473.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage-830x511.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/inode_usage.png 1417w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>\u4e8b\u4f8b2 \u7a81\u767a\u7684\u306b\u767a\u751f\u3059\u308b\u5927\u91cf\u306e\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f<\/h3>\n<p>\u554f\u984c: \u904b\u7528\u958b\u59cb\u304b\u3089\u6570\u30f6\u6708\u5f8c\u306b\u767a\u751f\u3059\u308b\u5927\u91cf\u306e\u30c7\u30a3\u30b9\u30af\u66f8\u304d\u8fbc\u307f<br \/>\n\u5f71\u97ff: \u30e1\u30c8\u30ea\u30af\u30b9\u66f8\u304d\u51fa\u3057\u306e\u9045\u308c<br \/>\n\u539f\u56e0: retention\u671f\u9593\u304c\u5207\u308c\u305fchunk\u306e\u524a\u9664<br \/>\n\u5bfe\u5fdc: storage.local.series-file-shrink-ratio\u306e\u8abf\u6574<\/p>\n<p>retention\u671f\u9593\u304c\u5207\u308c\u305fchunk\u306e\u524a\u9664\u51e6\u7406\u3067\u306f\u3001\u5207\u308c\u305f\u90e8\u5206\u3060\u3051\u3092\u8aad\u307f\u98db\u3070\u3057\u3066\u3001\u305d\u308c\u4ee5\u964d\u306e\u90e8\u5206\u3092\u4e00\u65e6\u5225\u30d5\u30a1\u30a4\u30eb\u306b\u66f8\u304d\u51fa\u3057\u5f8c\u3001\u5143\u306e\u30d5\u30a1\u30a4\u30eb\u306b\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/persistence.go#L876-L1067\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/persistence.go#L876-L1067<\/a><\/p>\n<p>\u305d\u306e\u305f\u3081\u30011 time series\u306e\u30d5\u30a1\u30a4\u30eb\u30b5\u30a4\u30ba\u304c\u5927\u304d\u304f\u306a\u308b\u3068\u3001\u305d\u308c\u3060\u3051\u66f8\u304d\u51fa\u3059\u30c7\u30fc\u30bf\u91cf\u304c\u5897\u3048\u308b\u50be\u5411\u306b\u3042\u308a\u307e\u3059\u3002<br \/>\n\u524a\u9664\u51e6\u7406\u306f\u3001\u983b\u5ea6\u304c\u591a\u304f\u306a\u308a\u3059\u304e\u306a\u3044\u3088\u3046\u306b\u3001\u90fd\u5ea6sleep\u3092\u3044\u308c\u306a\u304c\u3089\u5b9f\u884c\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001sleep\u6642\u9593\u306f\u6700\u9577\u3067\u308210\u79d2\u3068\u30cf\u30fc\u30c9\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u8ca0\u8377\u304c\u9ad8\u304f\u306a\u308a\u3059\u304e\u3066\u3057\u307e\u3046\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p><a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L44\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L44<\/a><\/p>\n<p>\u3068\u304f\u306b\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u74b0\u5883\u3067\u554f\u984c\u306b\u306a\u308a\u3084\u3059\u3044\u3068\u601d\u308f\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li>storage.local.retention\u30921\u30f6\u6708\u4ee5\u4e0a\u306a\u3069\u9577\u304f\u8a2d\u5b9a\u3057\u3066\u3044\u308b<\/li>\n<li>\u30aa\u30f3\u30d7\u30ec\u30df\u30b9\u74b0\u5883\u306a\u3069\u3067\u30011 time series\u304c\u9577\u671f\u9593\u306b\u308f\u305f\u3063\u3066\u8a18\u9332\u3055\u308c\u308b\u50be\u5411\u306b\u3042\u308b<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16624\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike-600x369.png\" alt=\"\" width=\"600\" height=\"369\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike-600x369.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike-276x170.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike-768x473.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike-830x511.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_writes_spike.png 1416w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>\u4e8b\u4f8b3 \u30af\u30a8\u30ea\u5b9f\u884c\u6642\u306b\u767a\u751f\u3059\u308b\u5927\u91cf\u306e\u30c7\u30a3\u30b9\u30af\u8aad\u307f\u8fbc\u307f<\/h3>\n<p>\u554f\u984c: \u30af\u30a8\u30ea\u5bfe\u8c61\u306e\u671f\u9593\u30921\u65e5\u4ee5\u4e0a\u306a\u3069\u3068\u3059\u308b\u3068\u3001\u5927\u91cf\u306e\u8aad\u307f\u8fbc\u307f\u304c\u767a\u751f\u3059\u308b<br \/>\n\u5f71\u97ff: \u30af\u30a8\u30ea\u306e\u30ec\u30b9\u30dd\u30f3\u30b9\u30bf\u30a4\u30e0\u60aa\u5316\u3001\u30e1\u30e2\u30ea\u4e0d\u8db3\u306b\u3088\u308bOOM<br \/>\n\u539f\u56e0: 1\u30f6\u6708\u4ee5\u4e0a\u306e\u9577\u3055\u3092\u6301\u3064time series\u306eunarchive<br \/>\n\u5bfe\u5fdc: \u5225\u306ePrometheus\u306b\u7cbe\u5ea6\u3092\u304a\u3068\u3057\u3066\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u4fdd\u5b58\u3057\u3001\u6570\u65e5\u4ee5\u4e0a\u904e\u53bb\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u306f\u305d\u3061\u3089\u3092\u53c2\u7167\u3055\u305b\u308b<\/p>\n<p>query.staleness-delta (\u30c7\u30d5\u30a9\u30eb\u30c85\u5206)\u3092\u8d85\u3048\u3066\u3001\u65b0\u898f\u66f8\u304d\u8fbc\u307f\u304c\u306a\u3044time series\u306farchive\u306e\u5bfe\u8c61\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1640-L1657\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1640-L1657<\/a><\/p>\n<p>\u4e00\u5ea6archive\u3055\u308c\u305ftime series\u306f\u3001unarchive\u6642\u306btime series\u5168\u4f53\u3092\u8aad\u307f\u51fa\u3057\u3066\u3001chunkDesc\u3092\u518d\u69cb\u7bc9\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n<a href=\"https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1027-L1070\">https:\/\/github.com\/prometheus\/prometheus\/blob\/v1.8.0\/storage\/local\/storage.go#L1027-L1070<\/a><\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u6bce\u65e5\u4f55\u53f0\u3082\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092terminate\u3057\u3066\u3044\u308b\u3088\u3046\u306a\u72b6\u6cc1\u3067\u30011\u9031\u9593\u306a\u3069\u9577\u3044\u671f\u9593\u3092\u5bfe\u8c61\u306bGrafana\u306e\u30c0\u30c3\u30b7\u30e5\u30dc\u30fc\u30c9\u3092\u8868\u793a\u3059\u308b\u3068\u3001unarchive\u304c\u767a\u751f\u3057\u3066\u3001\u8ca0\u8377\u304c\u8df3\u306d\u4e0a\u304c\u308a\u307e\u3059\u3002<\/p>\n<p>\u30e1\u30e2\u30ea\u306b\u5c55\u958b\u3059\u308b\u969b\u306b\u3001\u4e00\u6642\u7684\u306b\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u3082\u4e0a\u304c\u308b\u306e\u3067\u3001\u5834\u5408\u306b\u3088\u3063\u3066\u306f\u30e1\u30e2\u30ea\u4e0d\u8db3\u306b\u306a\u308aOOM\u304c\u767a\u751f\u3057\u307e\u3059\u3002<\/p>\n<p>\u793e\u5185\u3067\u306f\u3001\u3053\u3046\u3044\u3063\u305f\u554f\u984c\u3078\u306e\u5bfe\u5fdc\u3068\u3057\u3066\u300115\u79d2\u7cbe\u5ea6\u3067\u8a18\u9332\u3057\u3066\u3044\u308b\u30e1\u30c8\u30ea\u30af\u30b9\u4ee5\u5916\u306b\u3001\u5225\u306ePrometheus\u306b1\u6642\u9593\u7cbe\u5ea6\u3067\u540c\u3058\u30e1\u30c8\u30ea\u30af\u30b9\u3092\u8a18\u9332\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\nGrafana\u3067\u8868\u793a\u3059\u308b\u671f\u9593\u306b\u5fdc\u3058\u3066\u3001datasource plugin\u5074\u3067\u3069\u3061\u3089\u306ePrometheus\u306b\u5bfe\u3057\u3066\u30af\u30a8\u30ea\u3092\u767a\u884c\u3059\u308b\u304b\u5207\u308a\u66ff\u3048\u308b\u4ed5\u7d44\u307f\u3092\u4f5c\u308a\u3001\u5229\u7528\u8005\u5074\u304c\u610f\u8b58\u3057\u306a\u304f\u3066\u3082\u9ad8\u8ca0\u8377\u306b\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16626\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike-600x369.png\" alt=\"\" width=\"600\" height=\"369\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike-600x369.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike-276x170.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike-768x473.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike-830x511.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/disk_reads_spike.png 1421w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h3>\u4e8b\u4f8b4 \u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u4e00\u62ecterminate\u306b\u3088\u308a\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u6ea2\u308c\u767a\u751f<\/h3>\n<p>\u554f\u984c: \u6570\u5341\u53f0\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u307e\u3068\u3081\u3066terminate\u3057\u305f\u969b\u306b\u3001\"Series quarantined\u201d\u30a8\u30e9\u30fc\u304c\u767a\u751f<br \/>\n\u5f71\u97ff: time series\u3078\u306e\u65b0\u898f\u66f8\u304d\u8fbc\u307f\u6642\u306b\u5931\u6557\u3057\u3001\u66f8\u304d\u8fbc\u307f\u6e08\u307f\u306etime series\u3054\u3068\u6d88\u3048\u308b<br \/>\n\u539f\u56e0: terminate\u6e08\u307f\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u30e1\u30c8\u30ea\u30af\u30b9\u306epull\u5bfe\u8c61\u3068\u3057\u3066\u767b\u9332\u3055\u308c\u3066\u304a\u308a\u3001\u30bf\u30a4\u30e0\u30a2\u30a6\u30c8\u5f85\u3061\u306e\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u5927\u91cf\u306b\u767a\u751f\u3001\u65b0\u898f\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u958b\u3051\u306a\u304f\u306a\u308b<br \/>\n\u5bfe\u5fdc: terminate\u6e08\u307f\u3092\u5bfe\u8c61\u5916\u3068\u3059\u308b\u3088\u3046\u3001relabel_configs\u306b\u8a2d\u5b9a\u3092\u8ffd\u52a0<\/p>\n<p>ec2_sd\u3092\u5229\u7528\u3057\u3066\u3044\u308b\u5834\u5408\u306b\u554f\u984c\u306b\u306a\u308a\u307e\u3059\u3002ec2_sd\u304c\u5185\u90e8\u3067\u547c\u3073\u51fa\u3057\u3066\u3044\u308bec2:DescribeInstances API\u306e\u7d50\u679c\u306b\u306f\u3001\u3057\u3070\u3089\u304f\u306e\u9593terminate\u6e08\u307f\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\"terminated\"\u3068\u3044\u3046\u72b6\u614b\u3067\u6b8b\u308a\u307e\u3059\u3002\u3053\u308c\u3089\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306b\u5bfe\u3057\u3066pull\u3092\u3057\u3088\u3046\u3068\u3057\u3066\u3001\u30b3\u30cd\u30af\u30b7\u30e7\u30f3\u304c\u6ede\u7559\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u3002scrape_timeout\u3092\u77ed\u304f\u3059\u308c\u3070\u6539\u5584\u3059\u308b\u53ef\u80fd\u6027\u3082\u3042\u3063\u305f\u3068\u601d\u3044\u307e\u3059\u304c\u3001\u3068\u304f\u306b\u4e0d\u90fd\u5408\u304c\u306a\u304b\u3063\u305f\u305f\u3081\u3001pull\u5bfe\u8c61\u304b\u3089\u5916\u3059\u3088\u3046\u306b\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u8a2d\u5b9a\u4f8b<\/p>\n<pre class=\"toolbar:2 striped:false nums:false lang:default highlight:0 decode:true\">ec2_sd_configs:\n- region: ap-northeast-1\n  port: 19100\nrelabel_configs:\n- source_labels: [__meta_ec2_instance_state]\n  regex: ^running$\n  action: keep<\/pre>\n<h3>\u4e8b\u4f8b5 Auto Scaling\u306b\u3088\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u8d77\u52d5\u5f8c\u306b\u767a\u751f\u3059\u308b\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u306e\u30b9\u30d1\u30a4\u30af<\/h3>\n<p>\u554f\u984c: \u65b0\u898ftime series\u751f\u6210\u6642\u306b\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u304c\u30b9\u30d1\u30a4\u30af\u3059\u308b<br \/>\n\u5f71\u97ff: \u30e1\u30e2\u30ea\u4e0d\u8db3\u306b\u3088\u308bOOM<br \/>\n\u539f\u56e0: (\u304a\u305d\u3089\u304f)LevelDB\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u30b5\u30a4\u30ba\u306e\u80a5\u5927\u5316<br \/>\n\u5bfe\u5fdc: Prometheus\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7<\/p>\n<p>\u306f\u3063\u304d\u308a\u3068\u3057\u305f\u539f\u56e0\u306f\u308f\u304b\u3063\u3066\u306f\u3044\u307e\u305b\u3093\u304c\u3001Auto Scaling\u3092\u5c0e\u5165\u3057\u3066\u3044\u308b\u30b5\u30fc\u30d3\u30b9\u3067\u3001\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304c\u8d77\u52d5\u3057\u305f\u76f4\u5f8c\u306b\u3001Prometheus\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u91cf\u304c\u30b9\u30d1\u30a4\u30af\u3059\u308b\u554f\u984c\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002<br \/>\n\u65e5\u5897\u3057\u306b\u30b9\u30d1\u30a4\u30af\u6642\u306e\u5909\u52d5\u5e45\u304c\u5927\u304d\u304f\u306a\u308a\u3001\u30e1\u30e2\u30ea\u4e0d\u8db3\u306b\u3088\u308aOOM\u304c\u767a\u751f\u3057\u3066\u3057\u307e\u3046\u3053\u3068\u3082\u3042\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u30d7\u30ed\u30d5\u30a1\u30a4\u30e9\u3067\u89e3\u6790\u3057\u305f\u7d50\u679c\u3001Prometheus\u304c\u5229\u7528\u3057\u3066\u3044\u308bLevelDB\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3001\u65b0\u898f\u30a8\u30f3\u30c8\u30ea\u767b\u9332\u6642\u306b\u5927\u91cf\u306e\u30e1\u30e2\u30ea\u3092\u78ba\u4fdd\u3057\u3066\u3044\u308b\u3068\u3044\u3046\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3057\u305f\u3002<br \/>\n\u8a2d\u5b9a\u3067\u5bfe\u51e6\u3067\u304d\u308b\u554f\u984c\u3067\u306f\u306a\u3044\u3068\u5224\u65ad\u3057\u3001\u30b9\u30b1\u30fc\u30eb\u30a2\u30c3\u30d7\u3067\u5bfe\u5fdc\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-16625\" src=\"http:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike-600x370.png\" alt=\"\" width=\"600\" height=\"370\" srcset=\"https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike-600x370.png 600w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike-276x170.png 276w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike-768x473.png 768w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike-830x512.png 830w, https:\/\/labs.gree.jp\/blog\/wp-content\/uploads\/2017\/10\/memory_usage_spike.png 1416w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Prometheus\u5c0e\u5165\u521d\u671f\u306e\u3053\u308d\u306f\u3001\u305d\u308c\u307b\u3069\u53f0\u6570\u898f\u6a21\u304c\u591a\u304f\u306a\u3044\u30b5\u30fc\u30d3\u30b9\u3078\u306e\u8a66\u9a13\u5c0e\u5165\u3067\u3042\u3063\u305f\u305f\u3081\u3001\u8ca0\u8377\u304c\u554f\u984c\u306b\u306a\u308b\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\n\u3057\u304b\u3057\u3001\u53f0\u6570\u898f\u6a21\u304c\u591a\u304f\u306a\u308a\u3001\u307e\u305f\u4fdd\u5b58\u3057\u3066\u3044\u308b\u30e1\u30c8\u30ea\u30af\u30b9\u304c\u9577\u671f\u9593\u306b\u306a\u308b\u306b\u3057\u305f\u304c\u3063\u3066\u3001\u8ca0\u8377\u304c\u4e0a\u304c\u308a\u3001\u3055\u307e\u3056\u307e\u306a\u554f\u984c\u306b\u76f4\u9762\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>AWS\u74b0\u5883\u3067\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u5c0e\u5165\u6642\u306b\u91cd\u8996\u3057\u305f\u30dd\u30a4\u30f3\u30c8\u306e\u4e00\u3064\u3068\u3057\u3066\u3001\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u81ea\u4f53\u306e\u904b\u7528\u304c\u3057\u3084\u3059\u304f\u5b89\u5b9a\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3057\u305f\u3002<br \/>\n\u5b9f\u969b\u306b\u632f\u308a\u8fd4\u3063\u3066\u307f\u308b\u3068\u3001\u3055\u307e\u3056\u307e\u306a\u554f\u984c\u304c\u3042\u3063\u305f\u3082\u306e\u306e\u3001Prometheus\u81ea\u4f53\u306e\u30e1\u30c8\u30ea\u30af\u30b9\u304c\u5145\u5b9f\u3057\u3066\u3044\u308b\u3053\u3068\u3001\u307e\u305f\u5185\u90e8\u306e\u51e6\u7406\u3082\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u8aad\u3081\u3070\u6bd4\u8f03\u7684\u7406\u89e3\u3057\u3084\u3059\u3044\u3053\u3068\u306f\u3001\u904b\u7528\u3059\u308b\u4e0a\u3067\u3068\u3066\u3082\u52a9\u3051\u3089\u308c\u307e\u3057\u305f\u3002<\/p>\n<p>\u904b\u7528\u306e\u3064\u3089\u3044\u5074\u9762\u3070\u304b\u308a\u53d6\u308a\u4e0a\u3052\u3066\u3057\u307e\u3044\u307e\u3057\u305f\u304c\u3001Prometheus1\u53f0\u3067\u6570\u767e\u53f0\u898f\u6a21\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u304c\u3067\u304d\u308b\u3053\u3068\u3001\u307e\u305fPromQL\u306b\u3088\u308a\u67d4\u8edf\u306a\u96c6\u8a08\u304c\u3067\u304d\u308b\u3053\u3068\u306f\u3001\u81ea\u793e\u3067\u904b\u7528\u3059\u308b\u4fa1\u5024\u304c\u3042\u308b\u307b\u3069\u7d20\u6674\u3089\u3057\u3044\u70b9\u3060\u3068\u601d\u3044\u307e\u3059\u3002<br \/>\n\u3053\u3061\u3089\u3067\u5171\u6709\u3057\u305f\u77e5\u898b\u304c\u5c11\u3057\u3067\u3082\u304a\u5f79\u306b\u7acb\u3066\u308c\u3070\u5e78\u3044\u3067\u3059\u3002<\/p>\n<h2>\u53c2\u8003\u8cc7\u6599<\/h2>\n<p><a href=\"https:\/\/schd.ws\/hosted_files\/cloudnativeeu2017\/ce\/Slides.pdf\">https:\/\/schd.ws\/hosted_files\/cloudnativeeu2017\/ce\/Slides.pdf<\/a><br \/>\n<a href=\"https:\/\/promcon.io\/2016-berlin\/talks\/the-prometheus-time-series-database\/\">https:\/\/promcon.io\/2016-berlin\/talks\/the-prometheus-time-series-database\/<\/a><br \/>\n<a href=\"https:\/\/promcon.io\/2017-munich\/talks\/monitoring-cloudflares-planet-scale-edge-network-with-prometheus\/\">https:\/\/promcon.io\/2017-munich\/talks\/monitoring-cloudflares-planet-scale-edge-network-with-prometheus\/<\/a><\/p>\n<div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u30a4\u30f3\u30d5\u30e9\u306e\u53cd\u7530 (@mtanda) \u3067\u3059\u3002 GREE\u3067\u306f\u3001\u591a\u304f\u306e\u30b5\u30fc\u30d3\u30b9\u3092AWS\u74b0\u5883\u3067\u904b\u7528\u3057\u3066\u304a\u308a\u3001\u305d\u308c\u3089\u30b5\u30fc\u30d3\u30b9\u306e\u30e2\u30cb\u30bf\u30ea\u30f3\u30b0\u30b7\u30b9\u30c6\u30e0\u3068\u3057\u3066Prometheus\u3092\u5229\u7528\u3057\u3066\u3044\u307e\u3059\u3002 Prometheus\u3092\u5c0e\u5165\u3057\u3066\u304b\u3089\u7d042 [&hellip;]<\/p>\n","protected":false},"author":113,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[114,128,22],"class_list":["post-16614","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-aws","tag-prometheus","tag-22"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/users\/113"}],"replies":[{"embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/comments?post=16614"}],"version-history":[{"count":3,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16614\/revisions"}],"predecessor-version":[{"id":16645,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/posts\/16614\/revisions\/16645"}],"wp:attachment":[{"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/media?parent=16614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/categories?post=16614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/labs.gree.jp\/blog\/wp-json\/wp\/v2\/tags?post=16614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}