「Sentry」:修訂間差異
跳至導覽
跳至搜尋
第14行: | 第14行: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo chsh -s /bin/bash www-data; sudo chown www-data:www-data ~www-data; sudo su - www-data -c "git clone https://github.com/getsentry/onpremise.git" | sudo chsh -s /bin/bash www-data; sudo chown www-data:www-data ~www-data; sudo su - www-data -c "git clone https://github.com/getsentry/onpremise.git; cd onpremise; SENTRY_IMAGE=getsentry/sentry:21.1.0 ./install.sh" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
於 2021年2月14日 (日) 02:02 的修訂
Sentry是一套蒐集錯誤訊息的軟體,或是對應的雲端服務。
硬體
官方推估每天處理四百萬的事件,資料保留90天,大約需要1.5 TB的空間[1]。
簡介
Sentry提供SDK在用戶端安裝後就可以蒐集錯誤資訊,並且在伺服器上分類並提供介面讓維護者可以確認情況。
安裝
這邊以Ubuntu 20.04為作業系統,需要先安裝Docker與docker-compose
,然後裝到www-data
下:
sudo chsh -s /bin/bash www-data; sudo chown www-data:www-data ~www-data; sudo su - www-data -c "git clone https://github.com/getsentry/onpremise.git; cd onpremise; SENTRY_IMAGE=getsentry/sentry:21.1.0 ./install.sh"
設定
先投過指令產生config.yml
與sentry.conf.py
兩個設定檔:
sentry init
這樣會在~/.sentry/
下產生這兩個檔案。官方文件上有說明希望之後都轉移到config.yml
,但目前還有許多東西在舊的sentry.conf.py
裡[2]。如果想要放在其他地方,可以指定路徑:
sentry init /etc/sentry
這邊我們先以預設值的方式進行設定。首先先修改postgres
這個帳號的密碼,並且修改sentry.conf.py
內對應的欄位,要注意不能是空的。
接下來把PostgreSQL的資料庫建出來:
sudo -u postgres createdb -E utf-8 sentry
然後把資料庫建出來,我在建立的過程中間有遇到OOM,再跑一次就好:
sentry upgrade
參考文獻
- ↑ Docs - Installation. [2019-04-22].
- ↑ Docs - Installation with Python. [2019-04-22].
外部連結
- 官方網站 (英文)
- Docs - Sentry Server (英文)