如何在石墨和grafana上安装基本的auth

时间:2015-04-13 09:19:16

标签: basic-authentication graphite http-basic-authentication grafana

我安装了Graphite和grafana,一切正常。

我需要为石墨和grafana添加基本身份验证。

我该怎么做?

Graphite conf文件: /etc/apache2/sites-enabled/graphite.conf

<VirtualHost *:80>
    WSGIDaemonProcess _graphite processes=5 threads=5 display-name='%{GROUP}' inactivity-timeout=120 user=_graphite group=_graphite
    WSGIProcessGroup _graphite
    WSGIImportScript /usr/share/graphite-web/graphite.wsgi process-group=_graphite application-group=%{GLOBAL}
    WSGIScriptAlias / /usr/share/graphite-web/graphite.wsgi

    Alias /content/ /usr/share/graphite-web/static/
    <Location "/content/">
            SetHandler None
    </Location>

    ErrorLog ${APACHE_LOG_DIR}/graphite-web_error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog ${APACHE_LOG_DIR}/graphite-web_access.log combined

</VirtualHost>

1 个答案:

答案 0 :(得分:0)

尝试访问python packlages中的graphite dist:

e.g

cd /usr/lib/python2.7/dist-packages/graphite

你应该有一个文件manage.py

运行:

python manage.py migrate auth

您可能还需要运行:

graphite-manage syncdb