{"id":6626,"date":"2025-09-02T12:28:48","date_gmt":"2025-09-02T09:28:48","guid":{"rendered":"https:\/\/skeletor.org.ua\/?p=6626"},"modified":"2025-09-02T12:34:59","modified_gmt":"2025-09-02T09:34:59","slug":"%d0%be%d0%bd%d0%be%d0%b2%d0%bb%d1%8e%d1%94%d0%bc%d0%be-graphite","status":"publish","type":"post","link":"https:\/\/skeletor.org.ua\/?p=6626","title":{"rendered":"\u041e\u043d\u043e\u0432\u043b\u044e\u0454\u043c\u043e graphite"},"content":{"rendered":"\n<p>\u042f \u0431\u0443\u0434\u0443 \u043e\u043d\u043e\u0432\u043b\u044e\u0432\u0430\u0442\u0438 \u0437\u0432\u02bc\u044f\u0437\u043a\u0443 \u0437 \u0432\u0435\u0440\u0441\u0456\u0457 <strong>0.9.15<\/strong> (<strong>python-2.7<\/strong>) \u043d\u0430 <strong>1.1.10<\/strong> (<strong>python-3.11<\/strong>). \u041d\u043e\u0432\u0443 \u0432\u0435\u0440\u0441\u0456\u044e \u0431\u0443\u0434\u0443 \u043f\u0456\u0434\u043d\u0456\u043c\u0430\u0442\u0438 \u0443 <strong>python venv,<\/strong> \u0449\u043e\u0431 \u043f\u043e\u0442\u0456\u043c \u0431\u0443\u043b\u043e \u043b\u0435\u0433\u0448\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438.<\/p>\n\n\n<p><!--more--><\/p>\n\n\n<p class=\"has-larger-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#496406\" class=\"has-inline-color\">\u041f\u0456\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/mark><\/strong><\/p>\n\n\n<p><code><br \/>\n$ export PYTHONPATH=\"\/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\"<br \/>\n$ python3.11 -m venv graphite<br \/>\n$ source .\/graphite\/bin\/activate<br \/>\n$ cd graphite<br \/>\n$ pip install https:\/\/github.com\/graphite-project\/carbon\/tarball\/1.1.10<br \/>\n$ pip install https:\/\/github.com\/graphite-project\/whisper\/tarball\/1.1.10<br \/>\n$ pip install https:\/\/github.com\/graphite-project\/graphite-web\/tarball\/1.1.10<br \/>\n<\/code>\n<\/p>\n\n\n<p class=\"has-larger-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#496406\" class=\"has-inline-color\">\u0412\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044f<\/mark><\/strong><\/p>\n\n\n\n<p>\u041a\u043e\u043f\u0456\u044e\u0454\u043c\u043e <strong>local_settings.py<\/strong> \u0456 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u043c\u043e <strong>install<\/strong>:<\/p>\n\n\n<p><code><br \/>\n(graphite) skeletor@graphite:\/opt\/graphite$ python3 setup.py install --prefix=\/opt\/graphite<br \/>\n(graphite) skeletor@graphite:\/opt\/graphite$ cd lib\/python3.11\/site-packages<br \/>\n(graphite) skeletor@graphite:\/opt\/graphite\/lib\/python3.11\/site-packages$ ln -s ..\/..\/..\/webapp\/content<br \/>\n(graphite) skeletor@graphite:\/opt\/graphite\/lib\/python3.11\/site-packages$ cd ..\/..\/..\/<br \/>\n(graphite) skeletor@graphite:\/opt\/graphite$ python3 webapp\/manage.py collectstatic<\/p>\n<p>478 static files copied to '\/opt\/graphite\/static'.<br \/>\n<\/code><\/p>\n\n\n<p class=\"has-larger-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#496406\" class=\"has-inline-color\">\u041c\u0456\u0433\u0440\u0430\u0446\u0456\u044f<\/mark><\/strong><\/p>\n\n\n\n<p>\u0414\u0430\u043b\u0456 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0454\u043c\u043e \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u044e \u0437\u0456 \u0441\u0442\u0430\u0440\u043e\u0457 \u0411\u0414<\/p>\n\n\n<p><code><br \/>\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py migrate --settings=graphite.settings --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/<br \/>\n<\/code><\/p>\n\n\n<p>\u042f\u043a\u0449\u043e \u043f\u0440\u0438 \u0446\u044c\u043e\u043c\u0443 \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u043f\u043e\u043c\u0438\u043b\u043a\u0443<\/p>\n\n\n<p><code>django.db.utils.OperationalError: table \"dashboard_dashboard\" already exists<\/code><\/p>\n\n\n<p>\u0422\u043e \u0441\u043a\u043e\u0440\u0456\u0448 \u0437\u0430 \u0432\u0441\u0435 \u0411\u0414 \u0434\u0443\u0436\u0435 \u0441\u0442\u0430\u0440\u0430 \u0456 \u043c\u0456\u0433\u0440\u0430\u0442\u043e\u0440 \u043d\u0435 \u043c\u043e\u0436\u0435 \u0446\u0435 \u0437\u0440\u043e\u0431\u0438\u0442\u0438 \u0432 1 \u043a\u0440\u043e\u043a. \u0420\u043e\u0431\u0438\u043c\u043e \u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0435:<\/p>\n\n\n<pre>\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py migrate --settings=graphite.settings --fake --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\nOperations to perform:\n  Apply all migrations: account, admin, auth, contenttypes, dashboard, events, sessions, tagging, tags, url_shortener\nRunning migrations:\n  Applying dashboard.0001_initial... FAKED\n  Applying events.0001_initial... FAKED\n  Applying tagging.0002_on_delete... FAKED\n  Applying tags.0001_initial... FAKED\n  Applying url_shortener.0001_initial... FAKED\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py showmigrations --settings=graphite.settings --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\naccount\n [X] 0001_initial\nadmin\n [X] 0001_initial\n [X] 0002_logentry_remove_auto_add\n [X] 0003_logentry_add_action_flag_choices\nauth\n [X] 0001_initial\n [X] 0002_alter_permission_name_max_length\n [X] 0003_alter_user_email_max_length\n [X] 0004_alter_user_username_opts\n [X] 0005_alter_user_last_login_null\n [X] 0006_require_contenttypes_0002\n [X] 0007_alter_validators_add_error_messages\n [X] 0008_alter_user_username_max_length\n [X] 0009_alter_user_last_name_max_length\n [X] 0010_alter_group_name_max_length\n [X] 0011_update_proxy_permissions\ncontenttypes\n [X] 0001_initial\n [X] 0002_remove_content_type_name\ndashboard\n [X] 0001_initial\nevents\n [X] 0001_initial\nsessions\n [X] 0001_initial\ntagging\n [X] 0001_initial\n [X] 0002_on_delete\ntags\n [X] 0001_initial\nurl_shortener\n [X] 0001_initial\n<\/pre>\n\n\n<p>\u0406 \u0437\u043d\u043e\u0432\u0443 \u043f\u0440\u043e\u0431\u0443\u0454\u043c\u043e \u043c\u0456\u0433\u0440\u0430\u0446\u0456\u044e:<\/p>\n\n\n<pre>\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py migrate --settings=graphite.settings --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\nOperations to perform:\n  Apply all migrations: account, admin, auth, contenttypes, dashboard, events, sessions, tagging, tags, url_shortener\nRunning migrations:\n  No migrations to apply.\n  Your models have changes that are not yet reflected in a migration, and so won't be applied.\n  Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.\n<\/pre>\n<pre>\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py makemigrations --settings=graphite.settings --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\nMigrations for 'account':\n  lib\/python3.11\/site-packages\/graphite\/account\/migrations\/0002_auto_20250507_0744.py\n    - Alter field history on profile\nMigrations for 'events':\n  lib\/python3.11\/site-packages\/graphite\/events\/migrations\/0002_auto_20250507_0744.py\n    - Alter field tags on event\n<\/pre>\n<pre>\n(graphite) skeletor@graphite:\/opt\/graphite$ webapp\/manage.py migrate --settings=graphite.settings --pythonpath \/opt\/graphite\/lib\/:\/opt\/graphite\/webapp\/\nOperations to perform:\n  Apply all migrations: account, admin, auth, contenttypes, dashboard, events, sessions, tagging, tags, url_shortener\nRunning migrations:\n  Applying account.0002_auto_20250507_0744... OK\n  Applying events.0002_auto_20250507_0744... OK\n<\/pre>\n\n<p class=\"has-larger-font-size\"><strong><mark style=\"background-color:rgba(0, 0, 0, 0);color:#496406\" class=\"has-inline-color\">\u041f\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u044f<\/mark><\/strong><\/p>\n\n\n\n<p>\u0414\u043b\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0457 \u0440\u043e\u0431\u043e\u0442\u0438 \u043d\u0430\u043c \u0442\u0440\u0435\u0431\u0430 \u0431\u0443\u0434\u0435 \u0432\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0438 \u0442\u0430\u043a\u0456 \u0448\u0440\u0438\u0444\u0442\u0438: <strong>system\/font\/truetype\/cantarell, system\/font\/truetype\/croscorefonts, system\/font\/truetype\/dejavu<\/strong>, \u0430 \u0442\u0430\u043a\u043e\u0436 <strong>gunicorn <\/strong>\u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0443 <strong>graphite-web<\/strong> \u0447\u0435\u0440\u0435\u0437 <strong>fastCGI<\/strong>:<\/p>\n\n\n<p><code>(graphite) skeletor@graphite:\/opt\/graphite$ pip install gunicorn<\/code><\/p>\n\n\n<p>\u0456 \u0433\u043e\u0442\u0443\u0454\u043c\u043e \u0441\u0442\u0430\u0440\u0442\u043e\u0432\u0438\u0439 \u0441\u043a\u0440\u0438\u043f\u0442:<\/p>\n\n\n<pre>\n#!\/bin\/sh\n\n\/opt\/graphite\/bin\/gunicorn \\\n  --daemon \\\n  --chdir \/opt\/graphite\/webapp \\\n  --pythonpath \/opt\/graphite\/lib:\/opt\/graphite\/webapp \\\n  graphite.wsgi:application \\\n  --workers 30 \\\n  --threads 200 \\\n  --max-requests 200 \\\n  --log-file=\/opt\/graphite\/var\/log\/gunicorn.log \\\n  --bind unix:\/opt\/graphite\/var\/run\/graphite.sock \\\n  --pid \/opt\/graphite\/var\/run\/graphite.pid\n<\/pre>\n\n\n<p>\u0410 \u0449\u0435 \u043c\u0435\u043d\u0456 \u043d\u0435 \u043f\u043e\u0434\u043e\u0431\u0430\u0454\u0442\u044c\u0441\u044f, \u043a\u043e\u043b\u0438 \u043f\u0440\u0438 \u0432\u0456\u0434\u043a\u0440\u0438\u0442\u0442\u0456 <strong>dashboard&#8217;y <\/strong>\u0442\u0440\u0435\u0442\u0438\u043d\u0443 \u0435\u043a\u0440\u0430\u043d\u0443 \u0437\u0430\u0439\u043c\u0430\u0454 \u0441\u043c\u0443\u0433\u0430 \u0437 \u043a\u0435\u0440\u0443\u0432\u0430\u043d\u043d\u044f, \u0442\u043e\u043c\u0443 \u044f \u0457\u0457 \u043e\u0434\u0440\u0430\u0437\u0443 \u0445\u043e\u0432\u0430\u044e. \u041d\u0438\u0436\u0447\u0435 <strong>patch <\/strong>\u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e:<\/p>\n\n\n<pre>\ngraphite-web 1.1.10:\n\n--- webapp\/content\/js\/dashboard.js   2025-05-07 09:17:17.795268150 +0000\n+++ webapp\/content\/js\/dashboard.js   2025-05-07 09:17:52.569058869 +0000\n@@ -791,8 +791,8 @@\n   \/\/ Load initial dashboard state if it was passed in\n   if (initialState) {\n     applyState(initialState);\n-    navBar.collapse(false);\n   }\n+  navBar.collapse(false);\n \n   if(window.location.hash != '')\n   {\n\n=========================================\n\ngraphite-web 0.9.15:\n\n--- webapp\/content\/js\/dashboard.js 2025-05-07 09:15:14.731723466 +0000\n+++ webapp\/content\/js\/dashboard.js 2025-05-07 09:14:42.050163125 +0000\n@@ -719,8 +719,8 @@\n   \/\/ Load initial dashboard state if it was passed in\n   if (initialState) {\n     applyState(initialState);\n-    navBar.collapse();\n   }\n+  navBar.collapse();\n\n   if(window.location.hash != '')\n   {\n<\/pre>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u042f \u0431\u0443\u0434\u0443 \u043e\u043d\u043e\u0432\u043b\u044e\u0432\u0430\u0442\u0438 \u0437\u0432\u02bc\u044f\u0437\u043a\u0443 \u0437 \u0432\u0435\u0440\u0441\u0456\u0457 0.9.15 (python-2.7) \u043d\u0430 1.1.10 (python-3.11). \u041d\u043e\u0432\u0443 \u0432\u0435\u0440\u0441\u0456\u044e \u0431\u0443\u0434\u0443 \u043f\u0456\u0434\u043d\u0456\u043c\u0430\u0442\u0438 \u0443 python venv, \u0449\u043e\u0431 \u043f\u043e\u0442\u0456\u043c \u0431\u0443\u043b\u043e \u043b\u0435\u0433\u0448\u0435 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u0438\u0442\u0438.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-6626","post","type-post","status-publish","format-standard","hentry","category-others"],"_links":{"self":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6626"}],"version-history":[{"count":8,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6626\/revisions"}],"predecessor-version":[{"id":6635,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=\/wp\/v2\/posts\/6626\/revisions\/6635"}],"wp:attachment":[{"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/skeletor.org.ua\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}