2026/08/13
2026/08/09
2025/10/05
2025/08/21
2024/11/04
2024/11/03
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/12
2024/08/03
2023/12/02
2023/08/14
2022/12/20
2022/09/30
最近登入librenms時出現以下提示
目前使用的這個版本是從官網下載ubunbu 20.04 ova
試著升級但升完後有很多問題
於是打算重裝
選定debian 11
依照官網的流程一步步順利裝完
再來依照官方FAQ的方式移轉
也順利完成
最後有問題的是weathermap
如果直接copy ubuntu 20.04的目錄過來會發生無法執行的情況
不過官方已有針對php 8.1 進行修改
所以直接 git clone
git clone https://github.com/librenms-plugins/Weathermap.git
再mv目錄
mv Weathermap /opt/librenms/html/plugins/
把原几的 conf 複制到以下目錄
/opt/librenms/html/plugins/Weathermap/configs
以上就大致完成了
目前觀察中 看看還有沒有其他問題
https://github.com/librenms/packer-builds/releases/tag/21.2.0
https://www.librenms.org/#downloads
https://docs.librenms.org/Installation/Install-LibreNMS/#prepare-linux-server
https://docs.librenms.org/Support/FAQ/#how-do-i-migrate-my-librenms-install-to-another-server
2022/09/28
2021/05/31
今天打開librenms的時候發現無法進入
出現錯誤訊息
查了一下log 發現 5/30 03:00左右就出問題了
重開後正常
但跑了一下valid.php出現以下錯誤
./validate.php
====================================
Component | Version
--------- | -------
LibreNMS | 21.5.1-16-g15da7fa
DB Schema | 2020_12_14_091314_create_port_group_port_table (205)
PHP | 7.4.19
Python | 3.6.8
MySQL | 5.5.68-MariaDB
RRDTool | 1.4.8
SNMP | NET-SNMP 5.7.2
====================================
[OK] Composer Version: 2.0.14
[OK] Dependencies up-to-date.
[OK] Database connection successful
[FAIL] MariaDB version 10.2.2 is the minimum supported version as of March, 2021. Update MariaDB to a supported version 10.5 suggested).
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[WARN] Global lnms shortcut not installed. lnms command must be run with full path
[FIX]:
sudo ln -s /opt/librenms/lnms /usr/bin/lnms
[WARN] Bash completion not installed. lnms command tab completion unavailable.
[FIX]:
sudo cp /opt/librenms/misc/lnms-completion.bash /etc/bash_completion.d/
[WARN] Log rotation not enabled, could cause disk space issues
[FIX]:
sudo cp /opt/librenms/misc/librenms.logrotate /etc/logrotate.d/librenms
[WARN] Your install is over 24 hours out of date, last update: Sat, 29 May 2021 14:08:28 +0000
[FIX]:
Make sure your daily.sh cron is running and run ./daily.sh by hand to see if there are any errors.
[FAIL] We have found some files that are owned by a different user than 'librenms', this will stop you updating automatically and / or rrd files being updated causing graphs to fail.
[FIX]:
sudo chown -R librenms:librenms /opt/librenms
sudo setfacl -d -m g::rwx /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
sudo chmod -R ug=rwX /opt/librenms/rrd /opt/librenms/logs /opt/librenms/bootstrap/cache/ /opt/librenms/storage/
Files:
/opt/librenms/config.php_20201107
/opt/librenms/html/plugins/Weathermap/nkhc.png
/opt/librenms/html/plugins/Weathermap/nkhc.html
./lnms migrate
Migrating: 2020_12_14_091314_create_port_groups_table
In Connection.php line 678:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists (SQL: create table port_groups (id int unsi
gned not null auto_increment primary key, name varchar(255) not null, desc varchar(255) null) default character set utf8mb4 collate ‘ut
f8mb4_unicode_ci’)
In Exception.php line 18:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists
In PDOStatement.php line 112:
SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘port_groups’ already exists
進DB先把 port_groups drop 掉
再跑一次
./lnms migrate
https://www.opencli.com/mysql/rhel-centos7-upgrade-mariadb-to-10-5
2020/11/08
今天記錄一下 librenms 中 weathermap的安裝
官方說明文件如下
https://docs.librenms.org/Extensions/Weathermap/
安裝完後建立圖形的第一個步驟記得要先到 Map Properties
設定
Output Image Filename
Output HTML Filename
否則會看不到網頁及圖形


