<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.ichiayi.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Jonathan&#039;s Wiki 筆記 - tech:librenms</title>
        <description></description>
        <link>https://www.ichiayi.com/</link>
        <lastBuildDate>Fri, 05 Jun 2026 20:34:38 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.ichiayi.com/_media/wiki/dokuwiki.svg</url>
            <title>Jonathan&#039;s Wiki 筆記</title>
            <link>https://www.ichiayi.com/</link>
        </image>
        <item>
            <title>LibreNMS Agent 的安裝方式</title>
            <link>https://www.ichiayi.com/tech/librenms/agent</link>
            <description>LibreNMS Agent 的安裝方式

	*  CentOS 7 + systemd
	*  這 Agent Listen TCP-Port 6556

	*  需要驗證 LibreNMS 可以正確 TCP-Port 6556 連上 Agent 主機 

	*  複製 librenms-agent 儲存庫

cd /opt/
git clone https://github.com/librenms/librenms-agent.git
cd librenms-agent
cp check_mk_agent /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent
cp check_mk@.service check_mk.socket /etc/systemd/system
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local
cp agent-local/* /usr/lib/check_mk_agent/local/
chmod a+…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 05 Jul 2020 04:08:15 +0000</pubDate>
        </item>
        <item>
            <title>安裝 Apache Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/apache_agent</link>
            <description>安裝 Apache Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  Apache 要啟動 mod_status 模組 

vi /etc/httpd/conf.d/server-status.conf

內容大概類似以下


&lt;Location &quot;/server-status&quot;&gt;
    SetHandler server-status
        Order deny,allow
        Deny from all
        Allow from localhost
        Allow from 192.168.1.132
&lt;/Location&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 BIND(Named) Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/bind_agent</link>
            <description>安裝 BIND(Named) Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  named 服務的執行 user:group 是 named:named

	*  至 bind/named 主機內安裝 

mkdir -p /var/cache/bind
touch /var/cache/bind/stats
chown -R named:named /var/cache/bind
vi /etc/named.conf</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>CentOS7 安裝程序</title>
            <link>https://www.ichiayi.com/tech/librenms/centos7</link>
            <description>CentOS7 安裝程序

	*  安裝需要的套件 
	*  建立 librenms 用戶
	*  下載 LibreNMS 
	*  出現異常與警告訊息, 重新開機後再執行
	*  建立 DB Serverpassword 要依照自己需要設定

CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER &#039;librenms&#039;@&#039;localhost&#039; IDENTIFIED BY &#039;**password**&#039;;
GRANT ALL PRIVILEGES ON librenms.* TO &#039;librenms&#039;@&#039;localhost&#039;;
FLUSH PRIVILEGES;
exit</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 14 Jun 2021 08:01:40 +0000</pubDate>
        </item>
        <item>
            <title>nagios plugins - check_mssql_health</title>
            <link>https://www.ichiayi.com/tech/librenms/checkmssql</link>
            <description>nagios plugins - check_mssql_health

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  安裝環境 : CentOS Linux release 7.8.2003 (Core)
	*  安裝程序
		*  FreeTDS
			*  
yum install freetds -y

			*  /etc/freetds.conf 

:
[global]
        # TDS protocol version
        tds version = 7.2
 
:
        # If you get out-of-memory errors, it may mean that your client
        # is trying to allocate a huge buffer for a TEXT field.
        # Try setting &#039;text size&#039; to a more reasonable limit
        text size = 6…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 03 Jul 2020 09:22:19 +0000</pubDate>
        </item>
        <item>
            <title>安裝 PVE (Proxmox Virtual Environment) Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/checkpve</link>
            <description>安裝 PVE (Proxmox Virtual Environment) Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序
	*  這是 SNMP Extend
	*  PVE 8.2

設定程序

	*  在 PVE 主機內安裝 

apt install libpve-apiclient-perl sudo
wget https://raw.githubusercontent.com/librenms/librenms-agent/master/agent-local/proxmox -O /usr/local/bin/proxmox
chmod +x /usr/local/bin/proxmox</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 27 Feb 2024 16:02:31 +0000</pubDate>
        </item>
        <item>
            <title>加裝 Check_MK 增加監控能力</title>
            <link>https://www.ichiayi.com/tech/librenms/check_mk</link>
            <description>加裝 Check_MK 增加監控能力

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  安裝設備環境 
		*  CentOS7 安裝語法 

yum install git hddtemp


		*  Debian / PVE 安裝語法 

apt-get install git hddtemp



	*  下載安裝程序

cd /opt/
git clone https://github.com/librenms/librenms-agent.git
cd librenms-agent
cp check_mk_agent /usr/bin/check_mk_agent
chmod +x /usr/bin/check_mk_agent
cp check_mk@.service check_mk.socket /etc/systemd/system
mkdir -p /usr/lib/check_mk_agent/plugins /usr/lib/check_mk_agent/local…</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 fail2ban Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/fail2ban_agent</link>
            <description>安裝 fail2ban Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  至 fail2ban 主機內安裝 

wget https://github.com/librenms/librenms-agent/raw/master/snmp/fail2ban -O /etc/snmp/fail2ban
chmod +x /etc/snmp/fail2ban


	*  確認 fail2ban 可以正確執行</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 MySQL Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/mysql_agent</link>
            <description>安裝 MySQL Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  CentOS 7
	*  採用 snmp Ext 方式
	*  在 MySQL 主機內執行 

yum install wget php php-mysql
wget https://github.com/librenms/librenms-agent/raw/master/snmp/mysql -O /etc/snmp/mysql
chmod +x /etc/snmp/mysql
mkdir -p /var/cache/librenms/</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>加裝 Nagios Plugin 增加監控能力</title>
            <link>https://www.ichiayi.com/tech/librenms/nagios_agent</link>
            <description>加裝 Nagios Plugin 增加監控能力

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

安裝語法

	*  CentOS 7 
	*  Ubuntu 20.04 

進行設定

CentOS 7

	*  更改設定檔 
vi /opt/librenms/config.php


:
# nagios-plugins-all
$config[&#039;show_services&#039;]           = 1;
$config[&#039;nagios_plugins&#039;]   = &quot;/usr/lib64/nagios/plugins&quot;;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 08 Apr 2023 03:05:11 +0000</pubDate>
        </item>
        <item>
            <title>安裝 Nginx Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/nginx_agent</link>
            <description>安裝 Nginx Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  設定啟動 Nginx 的狀態頁面

vi /etc/nginx/conf.d/default.conf 



:
location /nginx-status {
    stub_status on;
    access_log   off;
    allow 127.0.0.1;
    allow ::1;
    deny all;
}
:</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 PHP-FPM Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/php-fpm_agent</link>
            <description>安裝 PHP-FPM Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  設定啟動 PHP-FPM 的狀態頁面

vi /etc/php-fpm.d/www.conf


:
pm.status_path = /status
:


檢查沒問題就重新啟動 php-fpm 服務


php-fpm -t




systemctl restart php-fpm</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 postfix Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/postfix_agent</link>
            <description>安裝 postfix Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  至 postfix 主機內安裝 

yum install postfix-perl-scripts
wget https://github.com/librenms/librenms-agent/raw/master/snmp/postfix-queues -O /etc/snmp/postfix-queues
chmod +x /etc/snmp/postfix-queues
wget https://github.com/librenms/librenms-agent/raw/master/snmp/postfixdetailed -O /etc/snmp/postfixdetailed
chmod +x /etc/snmp/postfixdetailed</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 Redis Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/redis_agent</link>
            <description>安裝 Redis Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  至 Redis 主機內安裝 

wget https://raw.githubusercontent.com/librenms/librenms-agent/master/snmp/redis.py -O /etc/snmp/redis.py
chmod +x /etc/snmp/redis.py


	*  確認 redis.py 可以正確執行</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
        <item>
            <title>安裝 SMART Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/smart_agent</link>
            <description>安裝 SMART Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  至被監控主機內安裝 

wget https://github.com/librenms/librenms-agent/raw/master/snmp/smart -O /etc/snmp/smart
chmod +x /etc/snmp/smart


	*  編輯 /etc/snmp/smart.config 內容類似以下</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 27 Feb 2024 15:59:26 +0000</pubDate>
        </item>
        <item>
            <title>Ubuntu 20.04 安裝程序</title>
            <link>https://www.ichiayi.com/tech/librenms/ubuntu20_04</link>
            <description>Ubuntu 20.04 安裝程序

	*  安裝必要的套件 
	*  新增 librenms 帳號
	*  下載 LibreNMS 系統
	*  設定 librenms 權限
	*  安裝 PHP 相關套件
	*  安裝 php composer
	*  設定時區資料

:
date.timezone = &quot;Asia/Taipei&quot;
:




	*</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 13 Jan 2022 15:36:49 +0000</pubDate>
        </item>
        <item>
            <title>安裝 ZFS Agent 的方式</title>
            <link>https://www.ichiayi.com/tech/librenms/zfs_agent</link>
            <description>安裝 ZFS Agent 的方式

	*  返回 Ubuntu 20.04 / CentOS7 安裝 LibreNMS 程序

	*  這是 SNMP Extend

	*  至被監控主機內安裝 

wget https://github.com/librenms/librenms-agent/raw/master/snmp/zfs-linux -O /etc/snmp/zfs-linux
chmod +x /etc/snmp/zfs-linux


	*  確認 zfs-linux 可以正確執行</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 16 Jan 2021 06:41:13 +0000</pubDate>
        </item>
    </channel>
</rss>
