{"id":315,"date":"2025-10-19T16:13:28","date_gmt":"2025-10-19T08:13:28","guid":{"rendered":"http:\/\/localhost\/?p=315"},"modified":"2025-10-19T16:30:31","modified_gmt":"2025-10-19T08:30:31","slug":"grafana-prometheus-monitoring","status":"publish","type":"post","link":"https:\/\/tech.syneric.cloud\/?p=315","title":{"rendered":"Grafana , Prometheus monitoring"},"content":{"rendered":"<p>Struktur Grafana,Prometheus<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-320\" src=\"http:\/\/localhost\/wp-content\/uploads\/2025\/10\/Screenshot-2025-10-19-at-4.22.48-PM.png\" alt=\"\" width=\"556\" height=\"173\" \/><\/p>\n<p>Ada 2 jenis volume yang boleh buatkan kekeliruan :<\/p>\n<table>\n<thead>\n<tr>\n<th>Syntax<\/th>\n<th>Type<\/th>\n<th>Where data is stored<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>- grafana_data:\/var\/lib\/grafana<\/code><\/td>\n<td><strong>Named volume<\/strong><\/td>\n<td>Inside Docker\u2019s internal volume storage (e.g. <code>\/var\/lib\/docker\/volumes\/...<\/code>)<\/td>\n<td>Docker manages it automatically. You don\u2019t see it directly on your host. Persistent between container recreations.<\/td>\n<\/tr>\n<tr>\n<td><code>- .\/data\/grafana:\/var\/lib\/grafana<\/code><\/td>\n<td><strong>Bind mount<\/strong><\/td>\n<td>In your project folder (<code>.\/data\/grafana<\/code>)<\/td>\n<td>Files are directly visible and editable on your host. You must create the folder first.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<table>\n<thead>\n<tr>\n<th>Aspect<\/th>\n<th>Named Volume<\/th>\n<th>Bind Mount<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Visibility<\/td>\n<td>Hidden inside Docker<\/td>\n<td>Visible in your project folder<\/td>\n<\/tr>\n<tr>\n<td>Created automatically<\/td>\n<td>\u2705 Yes<\/td>\n<td>\u274c No (you must create it)<\/td>\n<\/tr>\n<tr>\n<td>Backup manually<\/td>\n<td>Harder<\/td>\n<td>Easy (just copy folder)<\/td>\n<\/tr>\n<tr>\n<td>Portability<\/td>\n<td>Great for production<\/td>\n<td>Great for local development<\/td>\n<\/tr>\n<tr>\n<td>Performance<\/td>\n<td>Slightly faster (Docker optimized)<\/td>\n<td>Slightly slower on some OS (esp. macOS)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<ul>\n<li data-start=\"2513\" data-end=\"2594\">Use <strong data-start=\"2517\" data-end=\"2533\">named volume<\/strong> (<code data-start=\"2535\" data-end=\"2550\">grafana_data:<\/code>) \u2192 for clean, persistent production setup<\/li>\n<li data-start=\"2513\" data-end=\"2594\">Use <strong data-start=\"2601\" data-end=\"2615\">bind mount<\/strong> (<code data-start=\"2617\" data-end=\"2634\">.\/data\/grafana:<\/code>) \u2192 for local visibility \/ debugging<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Struktur Grafana,Prometheus Ada 2 jenis volume yang boleh buatkan kekeliruan : Syntax Type Where data is stored Description &#8211; grafana_data:\/var\/lib\/grafana Named volume Inside Docker\u2019s internal volume storage (e.g. \/var\/lib\/docker\/volumes\/&#8230;) Docker manages it automatically. You don\u2019t see it directly on your host. Persistent between container recreations. &#8211; .\/data\/grafana:\/var\/lib\/grafana Bind mount In your project folder (.\/data\/grafana) Files &hellip;<\/p>\n","protected":false},"author":1,"featured_media":325,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-315","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops"],"_links":{"self":[{"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/posts\/315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=315"}],"version-history":[{"count":8,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/posts\/315\/revisions"}],"predecessor-version":[{"id":324,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/posts\/315\/revisions\/324"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=\/wp\/v2\/media\/325"}],"wp:attachment":[{"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech.syneric.cloud\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}