{"id":234,"date":"2017-01-16T23:04:52","date_gmt":"2017-01-16T14:04:52","guid":{"rendered":"http:\/\/daimlars.jp\/blog\/?p=234"},"modified":"2017-01-16T23:04:52","modified_gmt":"2017-01-16T14:04:52","slug":"grafana%e3%82%a4%e3%83%b3%e3%82%b9%e3%83%88%e3%83%bc%e3%83%ab%e4%bb%96","status":"publish","type":"post","link":"http:\/\/daimlars.jp\/blog\/?p=234","title":{"rendered":"grafana\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u4ed6"},"content":{"rendered":"<p>\u65b0\u898f\u306bEC2\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u3063\u305f\u3068\u3053\u308d\u304b\u305f\u30b9\u30bf\u30fc\u30c8\u3002\u307e\u305a\u306fVirtualBox\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u8272\u3005\u3068\u5927\u30cf\u30de\u30ea\u3002\u7d50\u5c40\u3001Oracle\u30da\u30fc\u30b8\u3088\u308arpm\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"lang:sh decode:true\"># yum install VirtualBox-5.1-5.1.12_112440_el7-1.x86_64.rpm  --skip-broken\n\uff08\u4e2d\u7565\uff09\n\u98db\u3070\u3057\u307e\u3057\u305f (\u4f9d\u5b58\u6027\u306e\u554f\u984c):\n  VirtualBox-5.1.x86_64 0:5.1.12_112440_el7-1                                   \n  libXcursor.x86_64 0:1.1.14-2.1.9.amzn1                                        \n  libXinerama.x86_64 0:1.1.2-2.7.amzn1                                          \n  libXmu.x86_64 0:1.1.1-2.8.amzn1                                               \n  libXt.x86_64 0:1.1.4-6.1.9.amzn1                                              \n  libvpx.x86_64 0:1.2.0-1.0.amzn1  \n<\/pre>\n<p>\u3010\u53c2\u8003\u3011<a href=\"http:\/\/kajuhome.com\/yum_skip_broken.shtml\">skip-broken\u3068\u306f<\/a><\/p>\n<p>\u7d9a\u3044\u3066\u3001Vagrant\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u3053\u3061\u3089\u3082\u3001<a href=\"https:\/\/www.vagrantup.com\/downloads.html\">\u672c\u5bb6<\/a>\u3088\u308arpm\u3092\u5165\u624b\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u7d9a\u3044\u3066Graphite\u3002<\/p>\n<pre class=\"lang:default decode:true \">$ wget https:\/\/github.com\/obfuscurity\/synthesize\/archive\/master.zip\n$ unzip master.zip\n$ cd synthesize-master\/\n$ vagrant plugin install vagrant-vbguest\n$ vagrant up\nNo usable default provider could be found for your system.\n\nVagrant relies on interactions with 3rd party systems, known as\n\"providers\", to provide Vagrant with resources to run development\nenvironments. Examples are VirtualBox, VMware, Hyper-V.\n\nThe easiest solution to this message is to install VirtualBox, which\nis available for free on all major platforms.\n\nIf you believe you already have a provider available, make sure it\nis properly installed and configured. You can see more details about\nwhy a particular provider isn't working by forcing usage with\n`vagrant up --provider=PROVIDER`, which should give you a more specific\nerror message for that particular provider.<\/pre>\n<p>\u3069\u3046\u3082VirtualBox\u304cVagrant\u304b\u3089\u898b\u3048\u306a\u3044\u30fb\u30fb\u30fb\u3002\u8272\u3005\u306f\u307e\u3063\u305f\u304c\u3001Amazon\u3000Linux\u306fXen\u3067\u7a3c\u50cd\u3057\u3066\u304a\u308a\u3001VirtualBox\u306f\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u306a\u3044\u3068\u304b\u3002\uff08\u4eee\u60f3\u5316\u4e0a\u3067\u306f\u305d\u3082\u305d\u3082VirtualBox\u304c\u52d5\u304b\u306a\u3044\u3068\u304b\uff09\u3002Graphite\u306f\u30bd\u30fc\u30b9\u3092\u5165\u624b\u3002<\/p>\n<pre class=\"lang:default decode:true \">$git clone https:\/\/github.com\/graphite-project\/graphite-web.git\n$git clone https:\/\/github.com\/graphite-project\/carbon.git\n$git clone https:\/\/github.com\/graphite-project\/whisper.git\n$git clone https:\/\/github.com\/graphite-project\/ceres.git\n<\/pre>\n<p>\u5404\u30d5\u30a9\u30eb\u30c0\u3067\u30d3\u30eb\u30c9\u3002<\/p>\n<pre class=\"lang:sh decode:true \">python setup.py install<\/pre>\n<p>\u30aa\u30d5\u30a3\u30b7\u30e3\u30eb\u306b\u5f93\u3044\u3082\u308d\u3082\u308d\u8ffd\u52a0\u3002<\/p>\n<pre class=\"lang:sh decode:true \">yum install python-devel cairo-devel libffi-devel<\/pre>\n<p>django\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/p>\n<pre class=\"lang:sh decode:true \">pip install Django==1.10.5<\/pre>\n<p>\u6b21\u306f\u6012\u3089\u308c\u305f\u3002<\/p>\n<pre class=\"lang:sh decode:true\">$ pip install cairocffi\nYou are using pip version 6.1.1, however version 9.0.1 is available.\nYou should consider upgrading via the 'pip install --upgrade pip' command.\nCollecting cairocffi\n  Downloading cairocffi-0.7.2.tar.gz (75kB)\n    100% |\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588| 77kB 2.9MB\/s \n    Complete output from command python setup.py egg_info:\n    unable to execute 'gcc': No such file or directory\n    unable to execute 'gcc': No such file or directory<\/pre>\n<p>\u307e\u305a\u306fpip\u3092\u30a2\u30c3\u30d7\u30b0\u30ec\u30fc\u30c9\u3057\u3066\u3001gcc\u3082\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u4ed6\u3082\u308d\u3082\u308d\u3002<\/p>\n<pre class=\"lang:sh decode:true\">$pip install --upgrade pip\n$yum install gcc\n$\/usr\/local\/bin\/pip install cairocffi\n$\/usr\/local\/bin\/pip install django-tagging\n$\/usr\/local\/bin\/pip install pytz\n$\/usr\/local\/bin\/pip install pyparsing\n$<\/pre>\n<p>\u3044\u3088\u3044\u3088DB\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304c\u30a8\u30e9\u30fc<\/p>\n<pre class=\"lang:sh decode:true\">PYTHONPATH=\/opt\/graphite\/webapp\/ django-admin.py migrate --settings=graphite.settings --run-syncdb\n\/opt\/graphite\/webapp\/graphite\/settings.py:249: UserWarning: SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security\n  warn('SECRET_KEY is set to an unsafe default. This should be set in local_settings.py for better security')\nTraceback (most recent call last):\n  File \"\/usr\/local\/bin\/django-admin.py\", line 5, in &lt;module&gt;\n    management.execute_from_command_line()\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/core\/management\/__init__.py\", line 367, in execute_from_command_line\n    utility.execute()\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/core\/management\/__init__.py\", line 341, in execute\n    django.setup()\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/__init__.py\", line 27, in setup\n    apps.populate(settings.INSTALLED_APPS)\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/apps\/registry.py\", line 108, in populate\n    app_config.import_models(all_models)\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/apps\/config.py\", line 199, in import_models\n    self.models_module = import_module(models_module_name)\n  File \"\/usr\/lib64\/python2.7\/importlib\/__init__.py\", line 37, in import_module\n    __import__(name)\n  File \"\/opt\/graphite\/webapp\/graphite\/account\/models.py\", line 16, in &lt;module&gt;\n    from django.contrib.auth import models as auth_models\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/contrib\/auth\/models.py\", line 4, in &lt;module&gt;\n    from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/contrib\/auth\/base_user.py\", line 52, in &lt;module&gt;\n    class AbstractBaseUser(models.Model):\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/models\/base.py\", line 119, in __new__\n    new_class.add_to_class('_meta', Options(meta, app_label))\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/models\/base.py\", line 316, in add_to_class\n    value.contribute_to_class(cls, name)\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/models\/options.py\", line 214, in contribute_to_class\n    self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/__init__.py\", line 33, in __getattr__\n    return getattr(connections[DEFAULT_DB_ALIAS], item)\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/utils.py\", line 211, in __getitem__\n    backend = load_backend(db['ENGINE'])\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/utils.py\", line 115, in load_backend\n    return import_module('%s.base' % backend_name)\n  File \"\/usr\/lib64\/python2.7\/importlib\/__init__.py\", line 37, in import_module\n    __import__(name)\n  File \"\/usr\/local\/lib\/python2.7\/site-packages\/django\/db\/backends\/mysql\/base.py\", line 28, in &lt;module&gt;\n    raise ImproperlyConfigured(\"Error loading MySQLdb module: %s\" % e)\ndjango.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb<\/pre>\n<p>MySQL\u304c\u7121\u3044\u3089\u3057\u3044\u306e\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002python-mysql\u3092\u5165\u308c\u3088\u3046\u3068\u3059\u308b\u3068\u3001<\/p>\n<pre class=\"lang:sh decode:true \">$pip install mysql-python\nCollecting mysql-python\n  Using cached MySQL-python-1.2.5.zip\nInstalling collected packages: mysql-python\n  Running setup.py install for mysql-python ... error\n    Complete output from command \/usr\/bin\/python2.7 -u -c \"import setuptools, tokenize;__file__='\/tmp\/pip-build-9lfWr3\/mysql-python\/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))\" install --record \/tmp\/pip-bKFVV6-record\/install-record.txt --single-version-externally-managed --compile:\n    running install\n    running build\n    running build_py\n    creating build\n    creating build\/lib.linux-x86_64-2.7\n    copying _mysql_exceptions.py -&gt; build\/lib.linux-x86_64-2.7\n    creating build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/__init__.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/converters.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/connections.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/cursors.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/release.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    copying MySQLdb\/times.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\n    creating build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/__init__.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/CR.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/FIELD_TYPE.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/ER.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/FLAG.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/REFRESH.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    copying MySQLdb\/constants\/CLIENT.py -&gt; build\/lib.linux-x86_64-2.7\/MySQLdb\/constants\n    running build_ext\n    building '_mysql' extension\n    creating build\/temp.linux-x86_64-2.7\n    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I\/usr\/include\/mysql55 -I\/usr\/include\/python2.7 -c _mysql.c -o build\/temp.linux-x86_64-2.7\/_mysql.o -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1\nmysql.c:44:23: fatal error: my_config.h: \u305d\u306e\u3088\u3046\u306a\u30d5\u30a1\u30a4\u30eb\u3084\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306f\u3042\u308a\u307e\u305b\u3093<\/pre>\n<p>\u5927\u80c6\u306b\u4ee5\u4e0b\u3092\u3084\u3063\u305f\u3089\u3001\u901a\u3063\u305f\u2661<\/p>\n<pre class=\"lang:sh decode:true\">$yum install mysql-*\npip install mysql-python\nCollecting mysql-python\n  Using cached MySQL-python-1.2.5.zip\nInstalling collected packages: mysql-python\n  Running setup.py install for mysql-python ... done\nSuccessfully installed mysql-python-1.2.5\n<\/pre>\n<p>\u6b21\u306f\u30b9\u30ad\u30fc\u30de\u69cb\u7bc9<\/p>\n<pre class=\"lang:sh decode:true \">PYTHONPATH=\/opt\/graphite\/webapp\/ django-admin.py migrate --settings=graphite.settings --run-syncdb<\/pre>\n<p>\u3055\u3042\u8d77\u52d5\u3068\u601d\u3063\u305f\u3089Apache\u304c\u7121\u304b\u3063\u305f\u3002<\/p>\n<pre class=\"lang:default decode:true \">$yum install httpd24 httpd24-tools\n$yum install mod24_wsgi-py27\n$pip install twisted<\/pre>\n<p>\u305d\u306e\u5f8c\u3082<a href=\"https:\/\/graphite.readthedocs.io\/en\/latest\/index.html\">\u516c\u5f0f<\/a>\u3092\u898b\u306a\u304c\u3089\u60aa\u6226\u82e6\u95d8\u3082\u65ad\u5ff5\u3002\u3002\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u65b0\u898f\u306bEC2\u30a4\u30e1\u30fc\u30b8\u3092\u4f5c\u3063\u305f\u3068\u3053\u308d\u304b\u305f\u30b9\u30bf\u30fc\u30c8\u3002\u307e\u305a\u306fVirtualBox\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002\u8272\u3005\u3068\u5927\u30cf\u30de\u30ea\u3002\u7d50\u5c40\u3001Oracle\u30da\u30fc\u30b8\u3088\u308arpm\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb # yum install VirtualBox [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-234","post","type-post","status-publish","format-standard","hentry","category-engineering"],"_links":{"self":[{"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/234","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=234"}],"version-history":[{"count":0,"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/234\/revisions"}],"wp:attachment":[{"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=234"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/daimlars.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}