Skip to content

Instantly share code, notes, and snippets.

@shiimaxx
Last active Dec 20, 2019
Embed
What would you like to do?
Graphite検証環境構築手順
# タイムゾーン設定
$ sudo timedatectl set-timezone Asia/Tokyo

# Graphiteインストール
$ sudo apt update && sudo apt install -y apache2 libapache2-mod-wsgi graphite-web graphite-carbon python-whisper
$ sudo rm -f /etc/apache2/sites-enabled/000-default.conf
$ sudo ln -s /usr/share/graphite-web/apache2-graphite.conf /etc/apache2/sites-enabled/
$ sudo systemctl restart apache2

# https://docs.microsoft.com/ja-jp/azure/virtual-machines/linux/attach-disk-portal の手順でデータディスクを /var/lib/graphite/whisper にマウント

# https://mackerel.io/ja/docs/entry/howto/install-agent/deb の手順でmackerel-agentをインストール

# https://mackerel.io/ja/docs/entry/howto/mackerel-agent-plugins の手順でmackerel-agent-pluginsをインストール

# mackerel-agentのメトリック収集の設定
$ sudo bash -c 'cat << EOF >> /etc/mackerel-agent/mackerel-agent.conf
[plugin.metrics.graphite-carbon-cache]
command = "mackerel-plugin-graphite -type cache -webhost 127.0.0.1"
EOF'
$ sudo systemctl restart mackerel-agent

# 負荷テストツール haggar のインストール
$ sudo apt install -y golang
$ echo "PATH=$PATH:~/go/bin" >> ~/.bashrc
$ source ~/.bashrc
$ go get github.com/gorsuch/haggar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment