1

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

我需要为石墨和格拉法纳添加基本身份验证。

我怎样才能做到这一点?

石墨配置文件:/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>
4

1 回答 1

0

尝试在 python 包中访问你的石墨分布:

例如

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

你应该有一个文件manage.py

跑:

python manage.py migrate auth

您可能还需要运行:

graphite-manage syncdb
于 2017-04-08T17:22:52.027 回答