{"id":95,"date":"2026-01-07T07:49:03","date_gmt":"2026-01-06T22:49:03","guid":{"rendered":"https:\/\/www.n2soft.com\/?p=95"},"modified":"2026-01-07T07:51:01","modified_gmt":"2026-01-06T22:51:01","slug":"teslamate-grafana-%eb%8c%80%ec%8b%9c%eb%b3%b4%eb%93%9c-%ec%98%a4%eb%a5%98-%ed%95%b4%ea%b2%b0-%eb%b0%8f-%ec%9e%90%eb%8f%99-%ec%97%85%eb%8d%b0%ec%9d%b4%ed%8a%b8-%ea%b5%ac%ec%84%b1-%ea%b8%b0%eb%a1%9d","status":"publish","type":"post","link":"https:\/\/www.n2soft.com\/?p=95","title":{"rendered":"TeslaMate + Grafana \ub300\uc2dc\ubcf4\ub4dc \uc624\ub958 \ud574\uacb0 \ubc0f \uc790\ub3d9 \uc5c5\ub370\uc774\ud2b8 \uad6c\uc131 \uae30\ub85d"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">1. \ud658\uacbd \uc694\uc57d<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Docker \/ Docker Compose \uae30\ubc18<\/li>\n\n\n\n<li>\uad6c\uc131 \uc11c\ube44\uc2a4\n<ul class=\"wp-block-list\">\n<li>TeslaMate<\/li>\n\n\n\n<li>PostgreSQL<\/li>\n\n\n\n<li>Grafana<\/li>\n\n\n\n<li>MQTT (Mosquitto)<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\uc6b4\uc601 \ubaa9\uc801\n<ul class=\"wp-block-list\">\n<li>Tesla \ucc28\ub7c9 \uc8fc\ud589\/\ucda9\uc804 \ub370\uc774\ud130 \uc218\uc9d1<\/li>\n\n\n\n<li>Grafana \ub300\uc2dc\ubcf4\ub4dc \uc2dc\uac01\ud654<\/li>\n\n\n\n<li>\uc8fc\uae30\uc801\uc778 \ubb34\uc911\ub2e8 \uc5c5\ub370\uc774\ud2b8<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">2. \ubb38\uc81c \uc0c1\ud669 \uc694\uc57d<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\uc99d\uc0c1<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Grafana \ub85c\uadf8\uc778\uc740 \uac00\ub2a5<\/li>\n\n\n\n<li>TeslaMate \ub300\uc2dc\ubcf4\ub4dc\uac00 <strong>\ube44\uc5b4 \uc788\uac70\ub098 \ubaa8\ub4e0 \uac12\uc774 N\/A\ub85c \ud45c\uc2dc<\/strong><\/li>\n\n\n\n<li>TeslaMate \ub85c\uadf8\uc5d0\uc11c\ub294 \ucc28\ub7c9 \uc8fc\ud589\/\ucda9\uc804 \ub370\uc774\ud130\uac00 \uc815\uc0c1\uc801\uc73c\ub85c \uae30\ub85d\ub428<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\uc6d0\uc778<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Grafana\uac00 <strong>TeslaMate \uc804\uc6a9 \uc774\ubbf8\uc9c0\uac00 \uc544\ub2cc \uc21c\uc815 Grafana \uc774\ubbf8\uc9c0<\/strong>\ub85c \uc2e4\ud589\ub428<\/li>\n\n\n\n<li>Grafana PostgreSQL \ub370\uc774\ud130\uc18c\uc2a4\uc758 <strong>Host \uac12\uc774 \ube44\uc5b4 \uc788\uc74c<\/strong>\n<ul class=\"wp-block-list\">\n<li><code>:5432<\/code> \ud615\ud0dc\ub85c \uc811\uc18d \uc2dc\ub3c4 \u2192 connection refused<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">3. docker-compose.yml \uc218\uc815 (\ud575\uc2ec)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Grafana \uc774\ubbf8\uc9c0\ub97c TeslaMate \uc804\uc6a9\uc73c\ub85c \ubcc0\uacbd<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>grafana:\n  image: teslamate\/grafana:latest\n  container_name: teslamate-grafana\n  restart: unless-stopped\n  depends_on:\n    - postgres\n  environment:\n    GF_SECURITY_ADMIN_USER: admin\n    GF_SECURITY_ADMIN_PASSWORD: ${GRAFANA_PASSWORD}\n    TZ: Asia\/Seoul\n  volumes:\n    - \/srv\/teslamate\/grafana:\/var\/lib\/grafana\n  ports:\n    - \"3000:3000\"\n<\/code><\/pre>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>\u26a0\ufe0f \uc21c\uc815 <code>grafana\/grafana<\/code> \uc774\ubbf8\uc9c0\ub97c \uc0ac\uc6a9\ud558\uba74 TeslaMate \ub300\uc2dc\ubcf4\ub4dc\uc640 \ub370\uc774\ud130\uc18c\uc2a4\uac00 \uc790\ub3d9 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub294\ub2e4.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">4. Grafana PostgreSQL \ub370\uc774\ud130\uc18c\uc2a4 \uc124\uc815 (\uc911\uc694)<\/h2>\n\n\n\n<p>Grafana UI \u2192 <strong>Data Sources \u2192 PostgreSQL<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\ud56d\ubaa9<\/th><th>\uac12<\/th><\/tr><\/thead><tbody><tr><td>Host<\/td><td><code>postgres:5432<\/code><\/td><\/tr><tr><td>Database<\/td><td><code>teslamate<\/code><\/td><\/tr><tr><td>User<\/td><td><code>teslamate<\/code><\/td><\/tr><tr><td>Password<\/td><td>PostgreSQL \ube44\ubc00\ubc88\ud638<\/td><\/tr><tr><td>SSL mode<\/td><td>disable<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\uc124\uc815 \ud6c4 <strong>Save &amp; Test \u2192 Success<\/strong> \ud655\uc778<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>Docker \ub0b4\ubd80 \ub124\ud2b8\uc6cc\ud06c\uc5d0\uc11c\ub294 <code>127.0.0.1<\/code>\uc774\ub098 NAS IP\uac00 \uc544\ub2c8\ub77c <strong>\uc11c\ube44\uc2a4\uba85(postgres)<\/strong> \uc73c\ub85c \uc811\uadfc\ud574\uc57c \ud55c\ub2e4.<\/p>\n<\/blockquote>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">5. TeslaMate \ub85c\uadf8\ub85c \ub370\uc774\ud130 \uc218\uc9d1 \uc815\uc0c1 \uc5ec\ubd80 \ud655\uc778<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker logs teslamate --tail=200\n<\/code><\/pre>\n\n\n\n<p>\uc815\uc0c1 \uc608\uc2dc \ub85c\uadf8:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>Driving \/ Started \/ Ended<\/code><\/li>\n\n\n\n<li><code>Charging \/ Complete<\/code><\/li>\n\n\n\n<li><code>Derived efficiency factor<\/code><\/li>\n\n\n\n<li><code>POST https:\/\/auth.tesla.com\/... -> 200<\/code><\/li>\n<\/ul>\n\n\n\n<p>\u2192 \ub370\uc774\ud130\ub294 \uc815\uc0c1 \uc218\uc9d1 \uc911\uc774\uba70, Grafana \uc124\uc815 \ubb38\uc81c\uc600\uc74c\uc744 \ud655\uc778<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">6. \uc790\ub3d9 \uc5c5\ub370\uc774\ud2b8 \uc2a4\ud06c\ub9bd\ud2b8 \uad6c\uc131<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\uc2a4\ud06c\ub9bd\ud2b8 \uc704\uce58<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/sbin\/teslamate-update.sh\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\uc8fc\uc694 \uae30\ub2a5<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>docker compose pull<\/li>\n\n\n\n<li>docker compose up -d<\/li>\n\n\n\n<li>\ucee8\ud14c\uc774\ub108 \uc0c1\ud0dc \uc810\uac80<\/li>\n\n\n\n<li>\ub85c\uadf8 \uae30\ub85d<\/li>\n\n\n\n<li>\uc911\ubcf5 \uc2e4\ud589 \ubc29\uc9c0(lock)<\/li>\n<\/ul>\n\n\n\n<p>(\uc2a4\ud06c\ub9bd\ud2b8 \uc804\ubb38\uc740 \ubcc4\ub3c4 \ud398\uc774\uc9c0\/\ucca8\ubd80\ub85c \ubd84\ub9ac \uad8c\uc7a5)<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">7. systemd timer\ub85c \uc8fc\uac04 \uc790\ub3d9 \uc5c5\ub370\uc774\ud2b8 \uc124\uc815<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\uc11c\ube44\uc2a4 \uc720\ub2db<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Unit]\nDescription=Update TeslaMate stack\nAfter=docker.service\n\n&#91;Service]\nType=oneshot\nExecStart=\/usr\/local\/sbin\/teslamate-update.sh\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\ud0c0\uc774\uba38 \uc720\ub2db (\uc77c\uc694\uc77c 03:00)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;Timer]\nOnCalendar=Sun *-*-* 03:00:00\nPersistent=true\n\n&#91;Install]\nWantedBy=timers.target\n<\/code><\/pre>\n\n\n\n<p>\ud65c\uc131\ud654:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl daemon-reload\nsystemctl enable --now teslamate-update.timer\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">8. \uc5c5\ub370\uc774\ud2b8 \uc2e4\ud589 \ub85c\uadf8 \uc608\uc2dc<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;2026-01-06T10:46:34+09:00] Starting TeslaMate update...\n&#91;2026-01-06T10:46:36+09:00] OK: container running: teslamate\n&#91;2026-01-06T10:46:36+09:00] OK: container running: teslamate-grafana\n&#91;2026-01-06T10:46:36+09:00] Update completed.\n<\/code><\/pre>\n\n\n\n<p>\ub85c\uadf8 \uc704\uce58:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/var\/log\/teslamate\/update.log\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">9. \uc815\ub9ac \ubc0f \uad50\ud6c8<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Grafana \ub300\uc2dc\ubcf4\ub4dc N\/A \ubb38\uc81c\ub294 \ub300\ubd80\ubd84 \ub370\uc774\ud130\uc18c\uc2a4 \uc124\uc815 \ubb38\uc81c<\/strong><\/li>\n\n\n\n<li>Docker \ud658\uacbd\uc5d0\uc11c\ub294 \ubc18\ub4dc\uc2dc <strong>\uc11c\ube44\uc2a4\uba85 \uae30\ubc18 \ub124\ud2b8\uc6cc\ud06c \uc811\uadfc<\/strong><\/li>\n\n\n\n<li>TeslaMate\ub294 <strong>\uc804\uc6a9 Grafana \uc774\ubbf8\uc9c0 \uc0ac\uc6a9\uc774 \ud544\uc218<\/strong><\/li>\n\n\n\n<li>\uc790\ub3d9 \uc5c5\ub370\uc774\ud2b8\ub294 systemd timer\uac00 cron\ubcf4\ub2e4 \uc548\uc815\uc801<\/li>\n\n\n\n<li>\ub85c\uadf8\ub97c \ub0a8\uaca8\ub450\uba74 \uc7a5\uc560 \uc6d0\uc778 \ucd94\uc801\uc774 \ub9e4\uc6b0 \uc26c\uc6cc\uc9c4\ub2e4<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>1. \ud658\uacbd \uc694\uc57d 2. \ubb38\uc81c \uc0c1\ud669 \uc694\uc57d \uc99d\uc0c1 \uc6d0\uc778 3. docker-compose.yml \uc218\uc815 (\ud575\uc2ec) Grafana \uc774\ubbf8\uc9c0\ub97c TeslaMate \uc804\uc6a9\uc73c\ub85c \ubcc0\uacbd \u26a0\ufe0f \uc21c\uc815 grafana\/grafana \uc774\ubbf8\uc9c0\ub97c \uc0ac\uc6a9\ud558\uba74 TeslaMate \ub300\uc2dc\ubcf4\ub4dc\uc640 \ub370\uc774\ud130\uc18c\uc2a4\uac00 \uc790\ub3d9 \uc0dd\uc131\ub418\uc9c0 \uc54a\ub294\ub2e4. 4. Grafana PostgreSQL \ub370\uc774\ud130\uc18c\uc2a4 \uc124\uc815 (\uc911\uc694) Grafana UI \u2192 Data Sources \u2192 PostgreSQL \ud56d\ubaa9 \uac12 Host postgres:5432 Database teslamate User teslamate Password PostgreSQL \ube44\ubc00\ubc88\ud638 SSL mode [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,30],"tags":[],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-39","category-30"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=95"}],"version-history":[{"count":1,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":96,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=\/wp\/v2\/posts\/95\/revisions\/96"}],"wp:attachment":[{"href":"https:\/\/www.n2soft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.n2soft.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}