顯示具有 Zabbix 標籤的文章。 顯示所有文章
顯示具有 Zabbix 標籤的文章。 顯示所有文章

2026年3月21日 星期六

Zabbix MTR Template Lab

 事前導讀

https://www.meinekleinefarm.net/zabbix-template-net-mtr-my-traceroute/

其它相關資訊

https://xrcd2.blogspot.com/2023/04/zabbix-template-net-mtr-json-report-on.html

https://xrcd2.blogspot.com/2024/06/zabbix-70-lts.html

https://xrcd2.blogspot.com/2026/02/oracle-linux-101.html

以下操作基於 Oracle 10.1 + Zabbix 7.0.23

監控目地為專線是否有異常

從 Firewall WAN Port 至 介接的 Next Hop Gateway/Router IP 異常及品質監控  

尤其是有二個以上的 WAN port 或使用 SD-WAN 的架構監控最為合適

如 




或其它 MTR 相關運用皆可.

對於 MTR 不太了解的人,推薦自行觀看其它高手提供的資訊

MTR:Linux 網路診斷工具使用教學
(G. T. Wang 的個人部落格)


以下運用皆基於 mtr 這個工具延伸而來.

前置作業  zabbix_server.conf

 vi /etc/zabbix/zabbix_server.conf


### Option: EnableGlobalScripts

#    Enable global scripts on Zabbix server.

#       0 - disable

#       1 - enable

#

# Mandatory: no

# Default:

# EnableGlobalScripts=1


EnableGlobalScripts=1



前置作業  Linux sudo 

vi /etc/sudoers 

zabbix ALL=(root) NOPASSWD: /usr/sbin/mtr , /usr/lib/zabbix/externalscripts/mtr.sh  

可視自行監控需求修改之


前置作業 抄改 mtr.sh

https://github.com/xenadmin/zabbix-templates/blob/master/zabbix-net-mtr/mtr.sh


#!/bin/bash

IP=$1

mtr -r -c3 -w -b -p -j $IP


dnf install mtr -y  

vi /usr/lib/zabbix/externalscripts/mtr.sh 

可視自行監控需求修改之如

cat /usr/lib/zabbix/externalscripts/mtr.sh 

#!/usr/bin/bash

IP=$1

/usr/sbin/mtr -n -r -c3 -w -b -p -j $IP

mrt 測試


json 格式輸出  (Template_Net_MTR.xml 輸入的格式一定要是 json 方可使用)

shell 測試


前置作業 WEB UI  [Administrator\General\Timeouts]

External check  30s

可視自行監控需求修改之



匯入 Template_Net_MTR.xml

https://github.com/xenadmin/zabbix-templates/blob/master/zabbix-net-mtr/Template_Net_MTR.xml



透過 Shell + Template 主要取得內容為

item key 

(1)mtr.hop.host[{#HOP_ID}]

(2)mtr.hop.avg[{#HOP_ID}]

(3)mtr.hop.loss[{#HOP_ID}]


(1)MTR 第 n 個節點 IP 

(2)MTR 第 n 個節點 IP 的 RTT 

(3)MTR 第 n 個節點 IP 的 ICMP Loss


[{#HOP_ID}] 是一個由小到大的整數數值 從 1,2,3...其它的資訊可參考 Template_Net_MTR.xml

以上資訊的取得可用於圖示或告警之使用,可視自行監控需求修改之



Item prototypes


含 DNS 解析看到的 MTR Hop 2 [History 資訊]



 -n, --no-dns   [含不 DNS 解析] [=>個人偏好,監控可自行定義加上 Trigger Name 用以區分之]




MTR 可以看到的資訊



告警規則定義 可視自行監控需求修改之

如

last(/HiNet-GW/mtr.hop.loss[2]) >= 10

(last(/HiNet-GW/mtr.hop.host[2]) <> last(/HiNet-GW/mtr.hop.host[2],#2) or last(/HiNet-GW/mtr.hop.host[2])="???")

....




Demo


新增監控



亦可自定 Interval



2024年6月8日 星期六

Zabbix 7.0 LTS 版本試裝

 備妥 LAPP (Liunx Apache PostgreSQL PHP) 或

 LAMP (Liunx Apache MYSQL PHP) ....的運行環境

我的安裝順序 Liunx Apache Mysql (MariadDB) PHP ,

因為之前已測試過 LibreNMS 在 Oracle 9 的運行環境. 

故這次僅需加裝上PostgreSQL即可.在安裝之前先看了一下  release_notes 資訊,

進而得知它支援 TimescaleDB 2.13 與  PostgreSQL 16 ,

之前都是亂裝一通導致 Zabbix 裝不起來的情事.GG

所以先行將 PostgreSQL 16 + TimescaleDB 2.13 的組合先行安裝.


https://www.zabbix.com/release_notes


==> Updated max supported TimescaleDB version to 2.13 Server

==> Increased PostgreSQL maximum supported version to 16


PostgreSQL 16 可參考如下 URL 

https://www.postgresql.org/download/


因為我是使用 Oracle Linux 所以是看這個.

https://www.postgresql.org/download/linux/redhat/

安裝操作依官網 SOP 即可...

# Install the repository RPM:

sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm


# Disable the built-in PostgreSQL module:

sudo dnf -qy module disable postgresql


# Install PostgreSQL:

sudo dnf install -y postgresql16-server


# Optionally initialize the database and enable automatic start:


sudo /usr/pgsql-16/bin/postgresql-16-setup initdb

sudo systemctl enable postgresql-16

sudo systemctl start postgresql-16


PostgreSQL安裝完成後,重要的設定及安裝程式會放置在這二處


[root@Oracle9 pgsql-16]# pwd

/usr/pgsql-16

[root@Oracle9 16]# pwd

/var/lib/pgsql/16


為方便後續的操作及使用

vi  /etc/profile

最下方處加上如下設定.

PATH=$PATH:/usr/pgsql-16/bin/

export PATH

PGDATA=/var/lib/pgsql/16/data

export PGDATA

及做一些必要的 postgresql 服務設定.

vi /var/lib/pgsql/16/data/pg_hba.conf 

vi /var/lib/pgsql/16/data/postgresql.conf 

===============================================

TimescaleDB 可參考如下 URL 

https://packagecloud.io/timescale/timescaledb/install

因為我是要下載及安裝指定版本,故我選擇用手動下載及安裝的方式進行之.

TimescaleDB 2.13  可參考如下 URL 

https://packagecloud.io/timescale/timescaledb

下載

wget --content-disposition "https://packagecloud.io/timescale/timescaledb/packages/el/9/timescaledb-2-loader-postgresql-16-2.13.0-0.el9.x86_64.rpm/download.rpm?distro_version_id=240"

wget --content-disposition "https://packagecloud.io/timescale/timescaledb/packages/el/9/timescaledb-2-postgresql-16-2.13.0-0.el9.x86_64.rpm/download.rpm?distro_version_id=240"

wget --content-disposition "https://packagecloud.io/timescale/timescaledb/packages/el/9/timescaledb-tools-0.15.0-0.el9.x86_64.rpm/download.rpm?distro_version_id=240"

手動安裝 timescaledb-2-postgresql-16-2.13

[root@Oracle9 tmp]# cd timescaledb-2-pg16/

[root@Oracle9 timescaledb-2-pg16]# ll

total 3032

-rw-r--r-- 1 root root   28055 Nov 29  2023 timescaledb-2-loader-postgresql-16-2.13.0-0.el9.x86_64.rpm

-rw-r--r-- 1 root root  684479 Nov 29  2023 timescaledb-2-postgresql-16-2.13.0-0.el9.x86_64.rpm

-rw-r--r-- 1 root root 2386633 Nov  6  2023 timescaledb-tools-0.15.0-0.el9.x86_64.rpm

[root@Oracle9 timescaledb-2-pg16]# rpm -ivh timescaledb-tools-0.15.0-0.el9.x86_64.rpm 

Verifying...                          ################################# [100%]

Preparing...                          ################################# [100%]

Updating / installing...

   1:timescaledb-tools-0.15.0-0.el9   ################################# [100%]


[root@Oracle9 timescaledb-2-pg16]# rpm -ivh timescaledb-2-loader-postgresql-16-2.13.0-0.el9.x86_64.rpm 

Verifying...                          ################################# [100%]

Preparing...                          ################################# [100%]

Updating / installing...

   1:timescaledb-2-loader-postgresql-1################################# [100%]

Using pg_config located at /usr/pgsql-16/bin/pg_config to finish installation...


[root@Oracle9 timescaledb-2-pg16]# rpm -ivh timescaledb-2-postgresql-16-2.13.0-0.el9.x86_64.rpm 

Verifying...                          ################################# [100%]

Preparing...                          ################################# [100%]

Updating / installing...

   1:timescaledb-2-postgresql-16-2.13.################################# [100%]

Using pg_config located at /usr/pgsql-16/bin/pg_config to finish installation...


TimescaleDB has been installed. You need to update your postgresql.conf file

to load the library by adding 'timescaledb' to your shared_preload_libraries.

The easiest way to do this (and more configuration) is to use timescaledb-tune:

timescaledb-tune --pg-config=/usr/pgsql-16/bin/pg_config


依指示做  timescaledb-tune  


[root@Oracle9 timescaledb-2-pg16]# timescaledb-tune --pg-config=/usr/pgsql-16/bin/pg_config

Using postgresql.conf at this path:

/var/lib/pgsql/16/data/postgresql.conf


Is this correct? [(y)es/(n)o]: y

Writing backup to:

/tmp/timescaledb_tune.backup202406091011


shared_preload_libraries needs to be updated

Current:

#shared_preload_libraries = ''

Recommended:

shared_preload_libraries = 'timescaledb'

Is this okay? [(y)es/(n)o]: y

success: shared_preload_libraries will be updated


Tune memory/parallelism/WAL and other settings? [(y)es/(n)o]: y

Recommendations based on 7.31 GB of available memory and 4 CPUs for PostgreSQL 16


Memory settings recommendations

Current:

shared_buffers = 128MB

#effective_cache_size = 4GB

#maintenance_work_mem = 64MB

#work_mem = 4MB

Recommended:

shared_buffers = 1871MB

effective_cache_size = 5614MB

maintenance_work_mem = 958185kB

work_mem = 4790kB

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: memory settings will be updated


Parallelism settings recommendations

Current:

missing: timescaledb.max_background_workers

#max_worker_processes = 8

#max_parallel_workers_per_gather = 2

#max_parallel_workers = 8

Recommended:

timescaledb.max_background_workers = 16

max_worker_processes = 23

max_parallel_workers_per_gather = 2

max_parallel_workers = 4

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: parallelism settings will be updated


WAL settings recommendations

Current:

#wal_buffers = -1

min_wal_size = 80MB

Recommended:

wal_buffers = 16MB

min_wal_size = 512MB

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: WAL settings will be updated


Background writer settings recommendations

Current:

Recommended:

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: background writer settings will be updated


Miscellaneous settings recommendations

Current:

#default_statistics_target = 100

#random_page_cost = 4.0

#checkpoint_completion_target = 0.9

#max_locks_per_transaction = 64

#autovacuum_max_workers = 3

#autovacuum_naptime = 1min

#effective_io_concurrency = 1

Recommended:

default_statistics_target = 100

random_page_cost = 1.1

checkpoint_completion_target = 0.9

max_locks_per_transaction = 64

autovacuum_max_workers = 10

autovacuum_naptime = 10

effective_io_concurrency = 256

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: miscellaneous settings will be updated

Saving changes to: /var/lib/pgsql/16/data/postgresql.conf

[root@Oracle9 timescaledb-2-pg16]# 

====>   systemctl restart postgresql-16

到這裡 Zabbix 安裝的前置作業應該差不多完成了.

==============================================

Zabbix 安裝及設定可參考如下 URL 

https://www.zabbix.com/download

我是看這裡操作的.

https://www.zabbix.com/download?zabbix=7.0&os_distribution=oracle_linux&os_version=9&components=server_frontend_agent&db=pgsql&ws=apache

安裝操作依官網 SOP 即可...大致如下....

PS 我是使用 Oracle Linux 9 所以有些許小異動...

A

# echo "excludepkgs=zabbix*" >> /etc/yum.repos.d/oracle-epel-ol9.repo 

# rpm -Uvh https://repo.zabbix.com/zabbix/7.0/oracle/9/x86_64/zabbix-release-7.0-2.el9.noarch.rpm

# dnf clean all

B

# dnf install zabbix-server-pgsql zabbix-web-pgsql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

C

# sudo -u postgres createuser --pwprompt zabbix

# sudo -u postgres createdb -O zabbix zabbix

#zcat /usr/share/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix

D

vi /etc/zabbix/zabbix_server.conf

....

DBHost=127.0.0.1

DBName=zabbix

DBSchema=public

DBUser=zabbix

DBPassword=zabbix

.....

E

# systemctl restart zabbix-server zabbix-agent httpd php-fpm

# systemctl enable zabbix-server zabbix-agent httpd php-fpm

=====================================================

[root@Oracle9 data]# netstat -antlp | grep "LISTEN" 

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      792/sshd: /usr/sbin 

tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN      1/systemd           

tcp        0      0 0.0.0.0:37989           0.0.0.0:*               LISTEN      -                   

tcp        0      0 127.0.0.1:44321         0.0.0.0:*               LISTEN      1071/pmcd           

tcp        0      0 0.0.0.0:38035           0.0.0.0:*               LISTEN      841/rpc.statd       

tcp        0      0 0.0.0.0:10050           0.0.0.0:*               LISTEN      9173/zabbix_agentd  

tcp        0      0 0.0.0.0:10051           0.0.0.0:*               LISTEN      9175/zabbix_server  

tcp        0      0 0.0.0.0:2049            0.0.0.0:*               LISTEN      -                   

tcp        0      0 127.0.0.1:4330          0.0.0.0:*               LISTEN      2544/pmlogger       

tcp        0      0 127.0.0.1:199           0.0.0.0:*               LISTEN      837/snmpd           

tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN      7767/postgres       

tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      939/mariadbd        

tcp        0      0 127.0.0.1:6010          0.0.0.0:*               LISTEN      3338/sshd: XXXX 

tcp        0      0 0.0.0.0:20048           0.0.0.0:*               LISTEN      869/rpc.mountd      

tcp6       0      0 :::22                   :::*                    LISTEN      792/sshd: /usr/sbin 

tcp6       0      0 :::111                  :::*                    LISTEN      1/systemd           

tcp6       0      0 :::80                   :::*                    LISTEN      9923/httpd          

tcp6       0      0 ::1:44321               :::*                    LISTEN      1071/pmcd           

tcp6       0      0 :::41563                :::*                    LISTEN      -                   

tcp6       0      0 :::10050                :::*                    LISTEN      9173/zabbix_agentd  

tcp6       0      0 :::10051                :::*                    LISTEN      9175/zabbix_server  

tcp6       0      0 :::2049                 :::*                    LISTEN      -                   

tcp6       0      0 ::1:5432                :::*                    LISTEN      7767/postgres       

tcp6       0      0 ::1:6010                :::*                    LISTEN      3338/sshd: XRCD2 

tcp6       0      0 ::1:4330                :::*                    LISTEN      2544/pmlogger       

tcp6       0      0 :::3306                 :::*                    LISTEN      939/mariadbd        

tcp6       0      0 :::20048                :::*                    LISTEN      869/rpc.mountd      

tcp6       0      0 :::36655                :::*                    LISTEN      841/rpc.statd       

[root@Oracle9 data]# 

=================================================================

Zabbix 加裝 timescaledb

https://www.zabbix.com/documentation/current/en/manual/appendix/install/timescaledb

安裝操作依官網 SOP 即可...大致如下....

[root@Oracle9 yum.repos.d]# echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix

WARNING:  

WELCOME TO

 _____ _                               _     ____________  

|_   _(_)                             | |    |  _  \ ___ \ 

  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ / 

  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \ 

  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /

  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/

               Running version 2.13.0

For more information on TimescaleDB, please visit the following links:


 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started

 2. API reference documentation: https://docs.timescale.com/api/latest


Note: TimescaleDB collects anonymous reports to better understand and assist our users.

For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.


CREATE EXTENSION

[root@Oracle9 yum.repos.d]# 


[root@Oracle9 timescaledb]# cat /usr/share/zabbix-sql-scripts/postgresql/timescaledb/schema.sql | sudo -u zabbix psql zabbix

NOTICE:  function base36_decode(pg_catalog.varchar) does not exist, skipping

DROP FUNCTION

CREATE FUNCTION

NOTICE:  function cuid_timestamp(pg_catalog.varchar) does not exist, skipping

DROP FUNCTION

CREATE FUNCTION

NOTICE:  PostgreSQL version 16.3 is valid

NOTICE:  TimescaleDB extension is detected

NOTICE:  TimescaleDB version 2.13.0 is valid

WARNING:  column type "character varying" used for "source" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "value" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "auditid" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "username" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "ip" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "resource_cuid" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "resourcename" does not follow best practices

HINT:  Use datatype TEXT instead.

WARNING:  column type "character varying" used for "recordsetid" does not follow best practices

HINT:  Use datatype TEXT instead.

NOTICE:  TimescaleDB is configured successfully

DO

[root@Oracle9 timescaledb]#

======================================================

檢查看看

[root@Oracle9 timescaledb]# su - postgres

[postgres@Oracle9 ~]$ psql

psql (16.3)

Type "help" for help.


postgres=# \l

                                                       List of databases

   Name    |  Owner   | Encoding | Locale Provider |   Collate   |    Ctype    | ICU Locale | ICU Rules |   Access privileges   

-----------+----------+----------+-----------------+-------------+-------------+------------+-----------+-----------------------

 postgres  | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | 

 template0 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | =c/postgres          +

           |          |          |                 |             |             |            |           | postgres=CTc/postgres

 template1 | postgres | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | =c/postgres          +

           |          |          |                 |             |             |            |           | postgres=CTc/postgres

 zabbix    | zabbix   | UTF8     | libc            | en_US.UTF-8 | en_US.UTF-8 |            |           | 

(4 rows)


postgres=# \dn+

                                       List of schemas

  Name  |       Owner       |           Access privileges            |      Description       

--------+-------------------+----------------------------------------+------------------------

 public | pg_database_owner | pg_database_owner=UC/pg_database_owner+| standard public schema

        |                   | =U/pg_database_owner                   | 

(1 row)



postgres=# exit

[postgres@Oracle9 ~]$ exit

logout

[root@Oracle9 data]# 


DEMO





壓測工具

https://pypi.org/project/cpu-load-generator/


LineNotify Alert DEMO






2023年4月2日 星期日

Zabbix Template Net MTR (JSON Report on CentOS7)

 https://www.meinekleinefarm.net/zabbix-template-net-mtr-my-traceroute/


依據上面這個 URL 的做法是需要安裝 mtr 這個套件,但在 CentOS 7 用 yum 

去裝這個套件,確是無法用 JSON 格式輸出 Report ,所以是需要去下載 

source code compiler

https://bitwizard.nl/mtr/files/

如果透過 yum / dnf 下載到的 mrt 就支援 JSON格式輸出,則應該可以使用

這個 Zabbix Template 以下畫面的輸出,我是在 Rocky Linux release 9.1 ,

透過  source code compiler 

去模擬我在 CentOS7 上面碰到的問題,在此留個筆記.




[root@zabbix mtr-0.94]# cat /etc/rocky-release

Rocky Linux release 9.1 (Blue Onyx)

[root@zabbix mtr-0.94]# 


[root@zabbix mtr-0.94]# dnf info mtr

Last metadata expiration check: 0:20:09 ago on Sun 02 Apr 2023 07:24:42 PM CST.

Installed Packages

Name         : mtr

Epoch        : 2

Version      : 0.94

Release      : 4.el9

Architecture : x86_64

Size         : 191 k

Source       : mtr-0.94-4.el9.src.rpm

Repository   : @System

From repo    : anaconda

Summary      : Network diagnostic tool combining 'traceroute' and 'ping'

URL          : https://www.bitwizard.nl/mtr/

License      : GPLv2

Description  : MTR combines the functionality of the 'traceroute' and 'ping' programs

             : in a single network diagnostic tool.

             : 

             : When MTR is started, it investigates the network connection between the

             : host MTR runs on and the user-specified destination host. Afterwards it

             : determines the address of each network hop between the machines and sends

             : a sequence of ICMP echo requests to each one to determine the quality of

             : the link to each machine. While doing this, it prints running statistics

             : about each machine.

             : 

             : MTR provides two user interfaces: an ncurses interface, useful for the

             : command line, e.g. for SSH sessions; and a GTK interface for X (provided

             : in the mtr-gtk package).


[root@zabbix mtr-0.94]# 


它是支援 JSON格式輸出的.

===================================

模擬我在 CentOS7 

上面碰到的問題


build options:
--------------
libasan :
ipv6    :yes
ipinfo  :yes
ncurses :no
gtk     :no
jansson :no
cap     :
libs    :-lm 
cflags  :-g -O2 -Wall -Wno-pointer-sign


====================================

dnf --enablerepo=crb install jansson-devel


[root@zabbix mtr-0.94]# pwd
/usr/local/src/mtr-0.94
[root@zabbix mtr-0.94]# ./configure 
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports the include directive... yes (GNU style)
checking whether make supports nested variables... yes
checking dependency style of gcc... gcc3
checking whether make supports nested variables... (cached) yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking size of unsigned char... 1
checking size of unsigned short... 2
checking size of unsigned int... 4
checking size of unsigned long... 8
checking arpa/nameser_compat.h usability... yes
checking arpa/nameser_compat.h presence... yes
checking for arpa/nameser_compat.h... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking cursesX.h usability... no
checking cursesX.h presence... no
checking for cursesX.h... no
checking error.h usability... yes
checking error.h presence... yes
checking for error.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking linux/icmp.h usability... yes
checking linux/icmp.h presence... yes
checking for linux/icmp.h... yes
checking linux/errqueue.h usability... yes
checking linux/errqueue.h presence... yes
checking for linux/errqueue.h... yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking ncurses/curses.h usability... yes
checking ncurses/curses.h presence... yes
checking for ncurses/curses.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking socket.h usability... no
checking socket.h presence... no
checking for socket.h... no
checking sys/cdefs.h usability... yes
checking sys/cdefs.h presence... yes
checking for sys/cdefs.h... yes
checking sys/limits.h usability... no
checking sys/limits.h presence... no
checking for sys/limits.h... no
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking stdio_ext.h usability... yes
checking stdio_ext.h presence... yes
checking for stdio_ext.h... yes
checking for sys/types.h... (cached) yes
checking sys/xti.h usability... no
checking sys/xti.h presence... no
checking for sys/xti.h... no
checking values.h usability... yes
checking values.h presence... yes
checking for values.h... yes
checking for __fpending... yes
checking for fcntl... yes
checking for error... yes
checking for getopt_long... yes
checking for floor in -lm... yes
checking for GTK... yes
checking for JANSSON... yes
checking for library containing initscr... -lncurses
checking for cap_set_proc in -lcap... yes
checking for socket... yes
checking for gethostbyname... yes
checking for res_query... yes
checking for dn_expand in -lresolv... yes
checking whether errno is declared... yes
checking for socklen_t... yes
checking for time_t... yes
checking for C flags to get more warnings... -Wall -Wno-pointer-sign
build options:
--------------
libasan :
ipv6    :yes
ipinfo  :yes
ncurses :yes
gtk     :yes
jansson :yes
cap     :yes
libs    :-lncurses -lm 
cflags  :-g -O2 -Wall -Wno-pointer-sign
--------------
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
[root@zabbix mtr-0.94]#  make ; make install 
......
....


[root@zabbix sbin]# ./mtr -r -c1 8.8.8.8
Start: 2023-04-02T19:24:51+0800
HOST: zabbix                      Loss%   Snt   Last   Avg  Best  Wrst StDev
  1.|-- _gateway                   0.0%     1    4.3   4.3   4.3   4.3   0.0
  2.|-- h254.s98.ts.hinet.net      0.0%     1    8.5   8.5   8.5   8.5   0.0
  3.|-- tpe4-3302.hinet.net        0.0%     1   30.1  30.1  30.1  30.1   0.0
  4.|-- tylc-3032.hinet.net        0.0%     1   10.5  10.5  10.5  10.5   0.0
  5.|-- tyfo-3335.hinet.net        0.0%     1    9.9   9.9   9.9   9.9   0.0
  6.|-- 72.14.213.90               0.0%     1   11.2  11.2  11.2  11.2   0.0
  7.|-- 108.170.244.65             0.0%     1   11.5  11.5  11.5  11.5   0.0
  8.|-- 209.85.142.121             0.0%     1    9.7   9.7   9.7   9.7   0.0
  9.|-- ???                       100.0     1    0.0   0.0   0.0   0.0   0.0
 10.|-- dns.google                 0.0%     1   10.4  10.4  10.4  10.4   0.0
[root@zabbix sbin]# 


[root@zabbix sbin]# traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  _gateway (192.168.100.1)  3.650 ms  14.042 ms  13.834 ms
 2  h254.s98.ts.hinet.net (168.95.98.254)  7.892 ms  8.167 ms  7.875 ms
 3  tpe4-3302.hinet.net (168.95.23.110)  8.596 ms  9.152 ms  8.853 ms
 4  tylc-3032.hinet.net (220.128.9.242)  9.591 ms  9.412 ms  9.572 ms
 5  tylc-3336.hinet.net (220.128.9.21)  11.692 ms tylc-3336.hinet.net (220.128.9.25)  9.989 ms tyfo-3335.hinet.net (220.128.9.13)  11.288 ms
 6  72.14.209.178 (72.14.209.178)  9.986 ms  9.095 ms 72.14.215.0 (72.14.215.0)  9.884 ms
 7  108.170.244.33 (108.170.244.33)  9.409 ms 108.170.244.65 (108.170.244.65)  10.704 ms *
 8  209.85.243.196 (209.85.243.196)  9.898 ms dns.google (8.8.8.8)  8.605 ms 209.85.245.64 (209.85.245.64)  14.529 ms

[root@zabbix sbin]# ./mtr -r -c1 -w -b -p -j 8.8.8.8
{
    "report": {
        "mtr": {
            "src": "zabbix",
            "dst": "8.8.8.8",
            "tos": 0,
            "tests": 1,
            "psize": "64",
            "bitpattern": "0x00"
        },
        "hubs": [
            {
                "count": 1,
                "host": "_gateway (192.168.100.1)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 34.426,
                "Avg": 34.426,
                "Best": 34.426,
                "Wrst": 34.426,
                "StDev": 0.0
            },
            {
                "count": 2,
                "host": "h254.s98.ts.hinet.net (168.95.98.254)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 13.442,
                "Avg": 13.442,
                "Best": 13.442,
                "Wrst": 13.442,
                "StDev": 0.0
            },
            {
                "count": 3,
                "host": "tpe4-3302.hinet.net (168.95.23.110)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 10.539,
                "Avg": 10.539,
                "Best": 10.539,
                "Wrst": 10.539,
                "StDev": 0.0
            },
            {
                "count": 4,
                "host": "tylc-3032.hinet.net (220.128.9.242)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 10.711,
                "Avg": 10.711,
                "Best": 10.711,
                "Wrst": 10.711,
                "StDev": 0.0
            },
            {
                "count": 5,
                "host": "tyfo-3335.hinet.net (220.128.9.185)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 45.341,
                "Avg": 45.341,
                "Best": 45.341,
                "Wrst": 45.341,
                "StDev": 0.0
            },
            {
                "count": 6,
                "host": "72.14.213.90",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 11.993,
                "Avg": 11.993,
                "Best": 11.993,
                "Wrst": 11.993,
                "StDev": 0.0
            },
            {
                "count": 7,
                "host": "108.170.244.65",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 11.377,
                "Avg": 11.377,
                "Best": 11.377,
                "Wrst": 11.377,
                "StDev": 0.0
            },
            {
                "count": 8,
                "host": "209.85.142.121",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 11.746,
                "Avg": 11.746,
                "Best": 11.746,
                "Wrst": 11.746,
                "StDev": 0.0
            },
            {
                "count": 9,
                "host": "dns.google (8.8.8.8)",
                "Loss%": 0.0,
                "Snt": 1,
                "Last": 12.678,
                "Avg": 12.678,
                "Best": 12.678,
                "Wrst": 12.678,
                "StDev": 0.0
            }
        ]
    }
}
[root@zabbix sbin]#



==========================================

[root@zabbix mtr-0.94]# mtr -help

Usage:
 mtr [options] hostname

 -F, --filename FILE        read hostname(s) from a file
 -4                         use IPv4 only
 -6                         use IPv6 only
 -u, --udp                  use UDP instead of ICMP echo
 -T, --tcp                  use TCP instead of ICMP echo
 -I, --interface NAME       use named network interface
 -a, --address ADDRESS      bind the outgoing socket to ADDRESS
 -f, --first-ttl NUMBER     set what TTL to start
 -m, --max-ttl NUMBER       maximum number of hops
 -U, --max-unknown NUMBER   maximum unknown host
 -P, --port PORT            target port number for TCP, SCTP, or UDP
 -L, --localport LOCALPORT  source port number for UDP
 -s, --psize PACKETSIZE     set the packet size used for probing
 -B, --bitpattern NUMBER    set bit pattern to use in payload
 -i, --interval SECONDS     ICMP echo request interval
 -G, --gracetime SECONDS    number of seconds to wait for responses
 -Q, --tos NUMBER           type of service field in IP header
 -e, --mpls                 display information from ICMP extensions
 -Z, --timeout SECONDS      seconds to keep probe sockets open
 -M, --mark MARK            mark each sent packet
 -r, --report               output using report mode
 -w, --report-wide          output wide report
 -c, --report-cycles COUNT  set the number of pings sent
 -j, --json                 output json
 -x, --xml                  output xml
 -C, --csv                  output comma separated values
 -l, --raw                  output raw format
 -p, --split                split output
 -t, --curses               use curses terminal interface
     --displaymode MODE     select initial display mode
 -n, --no-dns               do not resolve host names
 -b, --show-ips             show IP numbers and host names
 -o, --order FIELDS         select output fields
 -y, --ipinfo NUMBER        select IP information in output
 -z, --aslookup             display AS number
 -h, --help                 display this help and exit
 -v, --version              output version information and exit

See the 'man 8 mtr' for details.
[root@zabbix mtr-0.94]# 







2023年3月18日 星期六

zabbix 6.0 upgrade to 6.2

 



[root@zabbix tmp]# rpm -Uvh https://repo.zabbix.com/zabbix/6.2/rhel/9/x86_64/zabbix-release-6.2-3.el9.noarch.rpm

Retrieving https://repo.zabbix.com/zabbix/6.2/rhel/9/x86_64/zabbix-release-6.2-3.el9.noarch.rpm

Verifying...                          ################################# [100%]

Preparing...                          ################################# [100%]

Updating / installing...

   1:zabbix-release-6.2-3.el9         ################################# [ 50%]

Cleaning up / removing...

   2:zabbix-release-6.0-4.el9         ################################# [100%]

[root@zabbix tmp]# 




[root@zabbix tmp]# dnf upgrade zabbix*

Last metadata expiration check: 0:01:12 ago on Sun 19 Mar 2023 08:50:54 AM CST.

Dependencies resolved.

=========================================================================

 Package                         Architecture     Version                         Repository        Size

=========================================================================

Upgrading:

 zabbix-agent                    x86_64           6.2.8-release1.el9              zabbix           519 k

 zabbix-apache-conf              noarch           6.2.8-release1.el9              zabbix            13 k

 zabbix-selinux-policy           x86_64           6.2.8-release1.el9              zabbix           257 k

 zabbix-server-pgsql             x86_64           6.2.8-release1.el9              zabbix           1.7 M

 zabbix-sql-scripts              noarch           6.2.8-release1.el9              zabbix           7.2 M

 zabbix-web                      noarch           6.2.8-release1.el9              zabbix           7.4 M

 zabbix-web-deps                 noarch           6.2.8-release1.el9              zabbix            13 k

 zabbix-web-pgsql                noarch           6.2.8-release1.el9              zabbix            12 k


Transaction Summary

=========================================================================

Upgrade  8 Packages


Total download size: 17 M

Is this ok [y/N]: y

Downloading Packages:

(1/8): zabbix-apache-conf-6.2.8-release1.el9.noarch.rpm                   16 kB/s |  13 kB     00:00    

(2/8): zabbix-selinux-policy-6.2.8-release1.el9.x86_64.rpm               187 kB/s | 257 kB     00:01    

(3/8): zabbix-agent-6.2.8-release1.el9.x86_64.rpm                        313 kB/s | 519 kB     00:01    

(4/8): zabbix-server-pgsql-6.2.8-release1.el9.x86_64.rpm                 270 kB/s | 1.7 MB     00:06    

(5/8): zabbix-web-deps-6.2.8-release1.el9.noarch.rpm                      11 kB/s |  13 kB     00:01    

(6/8): zabbix-web-pgsql-6.2.8-release1.el9.noarch.rpm                    9.6 kB/s |  12 kB     00:01    

(7/8): zabbix-sql-scripts-6.2.8-release1.el9.noarch.rpm                  746 kB/s | 7.2 MB     00:09    

(8/8): zabbix-web-6.2.8-release1.el9.noarch.rpm                          351 kB/s | 7.4 MB     00:21    

---------------------------------------------------------------------------------------------------------

Total                                                                    750 kB/s |  17 MB     00:23     

Running transaction check

Transaction check succeeded.

Running transaction test

Transaction test succeeded.

Running transaction

  Preparing        :                                                                                 1/1 

  Upgrading        : zabbix-web-6.2.8-release1.el9.noarch                                           1/16 

  Running scriptlet: zabbix-web-6.2.8-release1.el9.noarch                                           1/16 

/usr/share/fonts/dejavu/DejaVuSans.ttf has not been configured as an alternative for zabbix-web-font


  Upgrading        : zabbix-web-deps-6.2.8-release1.el9.noarch                                      2/16 

  Upgrading        : zabbix-web-pgsql-6.2.8-release1.el9.noarch                                     3/16 

  Upgrading        : zabbix-apache-conf-6.2.8-release1.el9.noarch                                   4/16 

  Running scriptlet: zabbix-apache-conf-6.2.8-release1.el9.noarch                                   4/16 

  Upgrading        : zabbix-sql-scripts-6.2.8-release1.el9.noarch                                   5/16 

  Running scriptlet: zabbix-server-pgsql-6.2.8-release1.el9.x86_64                                  6/16 

  Upgrading        : zabbix-server-pgsql-6.2.8-release1.el9.x86_64                                  6/16 

warning: /etc/zabbix/zabbix_server.conf created as /etc/zabbix/zabbix_server.conf.rpmnew


  Running scriptlet: zabbix-server-pgsql-6.2.8-release1.el9.x86_64                                  6/16 

  Upgrading        : zabbix-selinux-policy-6.2.8-release1.el9.x86_64                                7/16 

  Running scriptlet: zabbix-selinux-policy-6.2.8-release1.el9.x86_64                                7/16 

  Running scriptlet: zabbix-agent-6.2.8-release1.el9.x86_64                                         8/16 

  Upgrading        : zabbix-agent-6.2.8-release1.el9.x86_64                                         8/16 

warning: /etc/zabbix/zabbix_agentd.conf created as /etc/zabbix/zabbix_agentd.conf.rpmnew


  Running scriptlet: zabbix-agent-6.2.8-release1.el9.x86_64                                         8/16 

  Cleanup          : zabbix-apache-conf-6.0.14-release1.el9.noarch                                  9/16 

  Cleanup          : zabbix-web-deps-6.0.14-release1.el9.noarch                                    10/16 

  Cleanup          : zabbix-web-pgsql-6.0.14-release1.el9.noarch                                   11/16 

  Running scriptlet: zabbix-web-6.0.14-release1.el9.noarch                                         12/16 

  Cleanup          : zabbix-web-6.0.14-release1.el9.noarch                                         12/16 

  Cleanup          : zabbix-sql-scripts-6.0.14-release1.el9.noarch                                 13/16 

  Cleanup          : zabbix-selinux-policy-6.0.14-release1.el9.x86_64                              14/16 

  Running scriptlet: zabbix-selinux-policy-6.0.14-release1.el9.x86_64                              14/16 

  Running scriptlet: zabbix-server-pgsql-6.0.14-release1.el9.x86_64                                15/16 

  Cleanup          : zabbix-server-pgsql-6.0.14-release1.el9.x86_64                                15/16 

  Running scriptlet: zabbix-server-pgsql-6.0.14-release1.el9.x86_64                                15/16 

  Running scriptlet: zabbix-agent-6.0.14-release1.el9.x86_64                                       16/16 

  Cleanup          : zabbix-agent-6.0.14-release1.el9.x86_64                                       16/16 

  Running scriptlet: zabbix-agent-6.0.14-release1.el9.x86_64                                       16/16 

  Running scriptlet: zabbix-agent-6.2.8-release1.el9.x86_64                                        16/16 

  Running scriptlet: zabbix-agent-6.0.14-release1.el9.x86_64                                       16/16 

  Verifying        : zabbix-agent-6.2.8-release1.el9.x86_64                                         1/16 

  Verifying        : zabbix-agent-6.0.14-release1.el9.x86_64                                        2/16 

  Verifying        : zabbix-apache-conf-6.2.8-release1.el9.noarch                                   3/16 

  Verifying        : zabbix-apache-conf-6.0.14-release1.el9.noarch                                  4/16 

  Verifying        : zabbix-selinux-policy-6.2.8-release1.el9.x86_64                                5/16 

  Verifying        : zabbix-selinux-policy-6.0.14-release1.el9.x86_64                               6/16 

  Verifying        : zabbix-server-pgsql-6.2.8-release1.el9.x86_64                                  7/16 

  Verifying        : zabbix-server-pgsql-6.0.14-release1.el9.x86_64                                 8/16 

  Verifying        : zabbix-sql-scripts-6.2.8-release1.el9.noarch                                   9/16 

  Verifying        : zabbix-sql-scripts-6.0.14-release1.el9.noarch                                 10/16 

  Verifying        : zabbix-web-6.2.8-release1.el9.noarch                                          11/16 

  Verifying        : zabbix-web-6.0.14-release1.el9.noarch                                         12/16 

  Verifying        : zabbix-web-deps-6.2.8-release1.el9.noarch                                     13/16 

  Verifying        : zabbix-web-deps-6.0.14-release1.el9.noarch                                    14/16 

  Verifying        : zabbix-web-pgsql-6.2.8-release1.el9.noarch                                    15/16 

  Verifying        : zabbix-web-pgsql-6.0.14-release1.el9.noarch                                   16/16 


Upgraded:

  zabbix-agent-6.2.8-release1.el9.x86_64               zabbix-apache-conf-6.2.8-release1.el9.noarch      

  zabbix-selinux-policy-6.2.8-release1.el9.x86_64      zabbix-server-pgsql-6.2.8-release1.el9.x86_64     

  zabbix-sql-scripts-6.2.8-release1.el9.noarch         zabbix-web-6.2.8-release1.el9.noarch              

  zabbix-web-deps-6.2.8-release1.el9.noarch            zabbix-web-pgsql-6.2.8-release1.el9.noarch        


Complete!

[root@zabbix tmp]# systemctl restart zabbix-server

[root@zabbix tmp]# systemctl restart zabbix-agent


Zabbix Upgrade


Zabbix  Tree




Zabbix Host Tree 

https://github.com/BGmot/zabbix-module-hosts-tree



2022年3月11日 星期五

Zabbix 6.0 試裝

 安裝 postgresql server 14 


https://www.postgresql.org/download/linux/redhat/



# Install the repository RPM:


sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm


# Disable the built-in PostgreSQL module:

sudo dnf -qy module disable postgresql


# Install PostgreSQL:

sudo dnf install -y postgresql14-server


# Optionally initialize the database and enable automatic start:

sudo /usr/pgsql-14/bin/postgresql-14-setup initdb

sudo systemctl enable postgresql-14

sudo systemctl start postgresql-14



安裝 zabbix 6.0 + Rocky Linux release 8.5 (Green Obsidian) + Apache + Postgresq 14 + Timescaledb-2



https://www.zabbix.com/download?zabbix=6.0&os_distribution=centos&os_version=8&db=postgresql&ws=apache




安裝 timescaledb-2-postgresql-14


export SPLUNK_HOME=/opt/splunk


PATH=$PATH:/usr/pgsql-14/bin/

export PATH

PGDATA=/var/lib/pgsql/14/data

export PGDATA



Timescale_timescaledb 參考文件及設定


https://docs.timescale.com/install/latest/self-hosted/installation-redhat/#install-self-hosted-timescaledb-on-red-hat-based-systems



Create the Timescale repository:


tee /etc/yum.repos.d/timescale_timescaledb.repo <<EOL

[timescale_timescaledb]

name=timescale_timescaledb

baseurl=https://packagecloud.io/timescale/timescaledb/el/$(rpm -E %{rhel})/\$basearch

repo_gpgcheck=1

gpgcheck=0

enabled=1

gpgkey=https://packagecloud.io/timescale/timescaledb/gpgkey

sslverify=1

sslcacert=/etc/pki/tls/certs/ca-bundle.crt

metadata_expire=300

EOL



[root@rocky ~]# timescaledb-tune

Using postgresql.conf at this path:

/var/lib/pgsql/14/data/postgresql.conf


Is this correct? [(y)es/(n)o]: y

Writing backup to:

/tmp/timescaledb_tune.backup202203121248


shared_preload_libraries needs to be updated

Current:

#shared_preload_libraries = ''

Recommended:

shared_preload_libraries = 'timescaledb'

Is this okay? [(y)es/(n)o]: y

success: shared_preload_libraries will be updated


Tune memory/parallelism/WAL and other settings? [(y)es/(n)o]: y

Recommendations based on 7.75 GB of available memory and 4 CPUs for PostgreSQL 14


Memory settings recommendations

Current:

shared_buffers = 128MB

#effective_cache_size = 4GB

#maintenance_work_mem = 64MB

#work_mem = 4MB

Recommended:

shared_buffers = 1983MB

effective_cache_size = 5950MB

maintenance_work_mem = 1015528kB

work_mem = 5077kB

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: memory settings will be updated


Parallelism settings recommendations

Current:

missing: timescaledb.max_background_workers

#max_worker_processes = 8

#max_parallel_workers_per_gather = 2

#max_parallel_workers = 8

Recommended:

timescaledb.max_background_workers = 8

max_worker_processes = 15

max_parallel_workers_per_gather = 2

max_parallel_workers = 4

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: parallelism settings will be updated


WAL settings recommendations

Current:

#wal_buffers = -1

min_wal_size = 80MB

Recommended:

wal_buffers = 16MB

min_wal_size = 512MB

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: WAL settings will be updated


Miscellaneous settings recommendations

Current:

#default_statistics_target = 100

#random_page_cost = 4.0

#checkpoint_completion_target = 0.9

#max_locks_per_transaction = 64

#autovacuum_max_workers = 3

#autovacuum_naptime = 1min

#effective_io_concurrency = 1

Recommended:

default_statistics_target = 500

random_page_cost = 1.1

checkpoint_completion_target = 0.9

max_locks_per_transaction = 64

autovacuum_max_workers = 10

autovacuum_naptime = 10

effective_io_concurrency = 256

Is this okay? [(y)es/(s)kip/(q)uit]: y

success: miscellaneous settings will be updated

Saving changes to: /var/lib/pgsql/14/data/postgresql.conf

[root@rocky ~]#


Zabbix 啟用  Timescaledb


https://www.zabbix.com/documentation/current/en/manual/appendix/install/timescaledb


[root@rocky tmp]# echo "CREATE EXTENSION IF NOT EXISTS timescaledb CASCADE;" | sudo -u postgres psql zabbix

WARNING:

WELCOME TO

 _____ _                               _     ____________

|_   _(_)                             | |    |  _  \ ___ \

  | |  _ _ __ ___   ___  ___  ___ __ _| | ___| | | | |_/ /

  | | | |  _ ` _ \ / _ \/ __|/ __/ _` | |/ _ \ | | | ___ \

  | | | | | | | | |  __/\__ \ (_| (_| | |  __/ |/ /| |_/ /

  |_| |_|_| |_| |_|\___||___/\___\__,_|_|\___|___/ \____/

               Running version 2.6.0

For more information on TimescaleDB, please visit the following links:


 1. Getting started: https://docs.timescale.com/timescaledb/latest/getting-started

 2. API reference documentation: https://docs.timescale.com/api/latest

 3. How TimescaleDB is designed: https://docs.timescale.com/timescaledb/latest/overview/core-concepts


Note: TimescaleDB collects anonymous reports to better understand and assist our users.

For more information and how to disable, please see our docs https://docs.timescale.com/timescaledb/latest/how-to-guides/configuration/telemetry.


CREATE EXTENSION


=====================


匯入 Zabbix  schema 等資料



[root@rocky tmp]# zcat /usr/share/doc/zabbix-sql-scripts/postgresql/server.sql.gz | sudo -u zabbix psql zabbix


[root@rocky tmp]# cat /usr/share/doc/zabbix-sql-scripts/postgresql/timescaledb.sql | sudo -u zabbix psql zabbix


先前的 LAB https://xrcd2.blogspot.com/search/label/Zabbix