2024/10/21
2024/10/12
2024/10/10
2024/10/08
2024/10/07
2024/09/30
2024/09/29
2024/09/24
2024/09/19
2024/09/17
2024/09/16
最近因為換冷氣 所以要觀察 raspberry 的cpu溫度
來調整冷氣的設定溫度
先前已經利用設定snmp把值放在librenms上畫圖
今天想到grafana可以取值來畫圖
而且應該比snmp librenms 方便
首先把日期跟溫度存成csv 檔 格式如下 放在web server上
格式如下
time,temperature
Sun Sep 15 09:15:01 CST 2024,46.2
Sun Sep 15 09:20:01 CST 2024,46.2
接下來只要定時更新這個csv檔就可以了
grafana 要add new datasource
yesoreyeram-infinity-datasource
Add visualization
select data source
type 選擇csv 修改csv檔的url
要把columns 依照數字及時間 設定好
時間的格式一定要依照cvs檔裡的時間格式設定好才能畫圖
完成後就能看到如下的圖了
2024/09/14
2024/09/05
2024/08/31
heimdall 是一款滿好用的管理頁面集成軟体
大部分找到的資料都是使用docker
如果不想使用docker而是直接在ubuntu上安裝
流程如下
apt install php8.3-cli php8.3-sqlite3 php8.3-xml php8.3-mbstring php8.3-zip
再來到github下載最新版 目前是 2.6.1
php最低要求是 8.2
下載後解壓
執行
php artisan serve --host=0.0.0.0 --port=8080
即可
不需要安裝 apache
進入介面後並沒有登出的選項
因此隨便建個user
如果要登出 在左下角點 swtich user即可
https://github.com/linuxserver/Heimdall/releases
https://www.reddit.com/r/selfhosted/comments/o0x3tr/install_heimdall_dashboard_on_debianubuntu/
2024/08/22
2024/08/12
2024/08/10
2024/08/03
2024/07/19
2024/07/17
2024/07/03
2024/07/01
2024/06/15
2024/06/13
2024/06/12
本次弱掃有關SSH出現以下二個中風險
The remote SSH server is configured to allow / support weak key
exchange (KEX) algorithm(s).
Detection Result
The remote SSH server supports the following weak KEX algorithm(s):
KEX algorithm | Reason
------------------------------------------------
diffie-hellman-group-exchange-sha1 | Using SHA-1
2024/06/05
2024/05/27
2024/05/26
2024/05/22
這几天用ZAP在弱掃
當網站很大時 因為會產生很大量的cache
所以要確保執行弱掃那台几器的HD空間要夠
不然有可能還沒做完就爆了
另外有很多網站都出現以下的報告
查了一下 可以在httpd.conf 設定
新增以下內容
<IfModule mod_headers.c>
Header set X-Frame-Options "SAMEORIGIN"
Header set Content-Security-Policy "default-src 'self'"
</IfModule>
設完要重啟apache
另外 如果有參考到外面的任何元件
版面是會亂掉的
這個要特別注意
設完後再掃一次出現另一個報告
如果要再處理
Header set 就要再改成如下的設定
Header set Content-Security-Policy "frame-ancestors 'self'; form-action 'self'; base-uri 'self'; img-src 'self'; default-src 'self'; script-src 'self'; style-src 'self';"
當然影響範圍就會更大