mac使用influxdb和grafana


mac使用influxdb和grafana

influxdb安裝以及配置

brew update
brew install influxdb
ln -sfv /usr/local/opt/influxdb/*.plist ~/Library/LaunchAgents

# 配置文件在/etc/influxdb/influxdb.conf ,如果沒有就將/usr/local/etc/influxdb.conf 拷一個過去
配置緩存:cache-max-memory-size

#啟動服務
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist

#停止服務
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.influxdb.plist

#前台啟動
influxd -config /usr/local/etc/influxdb.conf

查看influxdb運行配置
influxd config

安裝

如果沒有安裝過

brew update
brew install grafana

如果安裝了現在需要升級

brew update
brew reinstall grafana

運行

brew services start grafana

停止

brew services stop grafana

瀏覽器打開

輸入http://127.0.0.1:3000即可打開其畫面,默認登陸用戶名,密碼admin/admin

編寫爬蟲代碼

-- 爬蟲使用的 MongoDB 的 database 名稱為 spider_data;
-- 爬蟲使用的 MongoDB 的 table 名稱為 qsbk;


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM