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



2023年3月12日 星期日

Try the Disaggregated Network Operating System (DANOS)

 https://www.danosproject.org/


vyos@node:~$ show configuration commands 

set interfaces dataplane dp0p33p1 address 192.168.100.254/24

set interfaces loopback lo

set protocols static route 0.0.0.0/0 next-hop 192.168.100.1

set service ssh port 22

set system acm enable

set system acm operational-ruleset rule 9969 action deny

set system acm operational-ruleset rule 9969 command /show/log/audit

set system acm operational-ruleset rule 9969 group vyattaop

set system acm operational-ruleset rule 9970 action deny

set system acm operational-ruleset rule 9970 command '/add/system/image/*/packages/*'

set system acm operational-ruleset rule 9970 group vyattaop

set system acm operational-ruleset rule 9970 group vyattaadm

set system acm operational-ruleset rule 9971 action deny

set system acm operational-ruleset rule 9971 command '/spawn/*'

set system acm operational-ruleset rule 9971 group vyattaop

set system acm operational-ruleset rule 9971 group vyattaadm

set system acm operational-ruleset rule 9972 action deny

set system acm operational-ruleset rule 9972 command '/set/console/*'

set system acm operational-ruleset rule 9972 group vyattaop

set system acm operational-ruleset rule 9973 action deny

set system acm operational-ruleset rule 9973 command '/set/date/*'

set system acm operational-ruleset rule 9973 group vyattaop

set system acm operational-ruleset rule 9974 action deny

set system acm operational-ruleset rule 9974 command '/set/system/*'

set system acm operational-ruleset rule 9974 group vyattaop

set system acm operational-ruleset rule 9975 action allow

set system acm operational-ruleset rule 9975 command '/set/*'

set system acm operational-ruleset rule 9975 group vyattaop

set system acm operational-ruleset rule 9976 action allow

set system acm operational-ruleset rule 9976 command '/twping/*'

set system acm operational-ruleset rule 9976 group vyattaop

set system acm operational-ruleset rule 9977 action allow

set system acm operational-ruleset rule 9977 command /show/tech-support/save

set system acm operational-ruleset rule 9977 group vyattaop

set system acm operational-ruleset rule 9978 action deny

set system acm operational-ruleset rule 9978 command '/show/tech-support/save/*'

set system acm operational-ruleset rule 9978 group vyattaop

set system acm operational-ruleset rule 9979 action allow

set system acm operational-ruleset rule 9979 command /show/tech-support/save-uncompressed

set system acm operational-ruleset rule 9979 group vyattaop

set system acm operational-ruleset rule 9980 action deny

set system acm operational-ruleset rule 9980 command '/show/tech-support/save-uncompressed/*'

set system acm operational-ruleset rule 9980 group vyattaop

set system acm operational-ruleset rule 9981 action allow

set system acm operational-ruleset rule 9981 command /show/tech-support/brief/save

set system acm operational-ruleset rule 9981 group vyattaop

set system acm operational-ruleset rule 9982 action deny

set system acm operational-ruleset rule 9982 command '/show/tech-support/brief/save/*'

set system acm operational-ruleset rule 9982 group vyattaop

set system acm operational-ruleset rule 9983 action allow

set system acm operational-ruleset rule 9983 command /show/tech-support/brief/save-uncompressed

set system acm operational-ruleset rule 9983 group vyattaop

set system acm operational-ruleset rule 9984 action deny

set system acm operational-ruleset rule 9984 command '/show/tech-support/brief/save-uncompressed/*'

set system acm operational-ruleset rule 9984 group vyattaop

set system acm operational-ruleset rule 9985 action allow

set system acm operational-ruleset rule 9985 command /show/tech-support/brief/

set system acm operational-ruleset rule 9985 group vyattaop

set system acm operational-ruleset rule 9986 action deny

set system acm operational-ruleset rule 9986 command /show/tech-support/brief

set system acm operational-ruleset rule 9986 group vyattaop

set system acm operational-ruleset rule 9987 action deny

set system acm operational-ruleset rule 9987 command /show/tech-support

set system acm operational-ruleset rule 9987 group vyattaop

set system acm operational-ruleset rule 9988 action deny

set system acm operational-ruleset rule 9988 command /show/configuration

set system acm operational-ruleset rule 9988 group vyattaop

set system acm operational-ruleset rule 9989 action allow

set system acm operational-ruleset rule 9989 command '/clear/*'

set system acm operational-ruleset rule 9989 group vyattaop

set system acm operational-ruleset rule 9990 action allow

set system acm operational-ruleset rule 9990 command '/show/*'

set system acm operational-ruleset rule 9990 group vyattaop

set system acm operational-ruleset rule 9991 action allow

set system acm operational-ruleset rule 9991 command '/monitor/*'

set system acm operational-ruleset rule 9991 group vyattaop

set system acm operational-ruleset rule 9992 action allow

set system acm operational-ruleset rule 9992 command '/ping/*'

set system acm operational-ruleset rule 9992 group vyattaop

set system acm operational-ruleset rule 9993 action allow

set system acm operational-ruleset rule 9993 command '/reset/*'

set system acm operational-ruleset rule 9993 group vyattaop

set system acm operational-ruleset rule 9994 action allow

set system acm operational-ruleset rule 9994 command '/release/*'

set system acm operational-ruleset rule 9994 group vyattaop

set system acm operational-ruleset rule 9995 action allow

set system acm operational-ruleset rule 9995 command '/renew/*'

set system acm operational-ruleset rule 9995 group vyattaop

set system acm operational-ruleset rule 9996 action allow

set system acm operational-ruleset rule 9996 command '/telnet/*'

set system acm operational-ruleset rule 9996 group vyattaop

set system acm operational-ruleset rule 9997 action allow

set system acm operational-ruleset rule 9997 command '/traceroute/*'

set system acm operational-ruleset rule 9997 group vyattaop

set system acm operational-ruleset rule 9998 action allow

set system acm operational-ruleset rule 9998 command '/update/*'

set system acm operational-ruleset rule 9998 group vyattaop

set system acm operational-ruleset rule 9999 action deny

set system acm operational-ruleset rule 9999 command '*'

set system acm operational-ruleset rule 9999 group vyattaop

set system acm rpc-ruleset rule 9981 action allow

set system acm rpc-ruleset rule 9981 group vyattaop

set system acm rpc-ruleset rule 9981 rpc-name 'vyatta-system-tacplus-v1:reset-suppression-timers'

set system acm rpc-ruleset rule 9982 action allow

set system acm rpc-ruleset rule 9982 group vyattaop

set system acm rpc-ruleset rule 9982 rpc-name 'vyatta-system-bmc-v1:clear-bmc-sel'

set system acm rpc-ruleset rule 9983 action allow

set system acm rpc-ruleset rule 9983 group vyattaop

set system acm rpc-ruleset rule 9983 rpc-name 'vyatta-interfaces-dataplane-transceiver-v1:xcvr-info'

set system acm rpc-ruleset rule 9984 action allow

set system acm rpc-ruleset rule 9984 group vyattaop

set system acm rpc-ruleset rule 9984 rpc-name 'vyatta-interfaces-dataplane-ethernet-info-v1:eth-info'

set system acm rpc-ruleset rule 9985 action allow

set system acm rpc-ruleset rule 9985 group vyattaop

set system acm rpc-ruleset rule 9985 rpc-name 'vyatta-interfaces-dataplane-rpc-v1:slowpath-info'

set system acm rpc-ruleset rule 9986 action allow

set system acm rpc-ruleset rule 9986 group vyattaop

set system acm rpc-ruleset rule 9986 rpc-name 'vyatta-interfaces-dataplane-rpc-v1:identify-info'

set system acm rpc-ruleset rule 9987 action allow

set system acm rpc-ruleset rule 9987 group vyattaop

set system acm rpc-ruleset rule 9987 rpc-name 'vyatta-interfaces-dataplane-rpc-v1:affinity-info'

set system acm rpc-ruleset rule 9988 action allow

set system acm rpc-ruleset rule 9988 group vyattaop

set system acm rpc-ruleset rule 9988 rpc-name 'vyatta-system-storage-v1:clear-block-device-unused-blocks'

set system acm rpc-ruleset rule 9989 action allow

set system acm rpc-ruleset rule 9989 group vyattaop

set system acm rpc-ruleset rule 9989 rpc-name 'vyatta-system-storage-v1:get-block-device'

set system acm rpc-ruleset rule 9990 action allow

set system acm rpc-ruleset rule 9990 group vyattaop

set system acm rpc-ruleset rule 9990 rpc-name 'vyatta-cpp-rate-limiter-v1:clear-statistics'

set system acm rpc-ruleset rule 9991 action allow

set system acm rpc-ruleset rule 9991 group vyattaop

set system acm rpc-ruleset rule 9991 rpc-name 'vyatta-ippf-v1:clear-statistics'

set system acm rpc-ruleset rule 9992 action allow

set system acm rpc-ruleset rule 9992 group vyattaop

set system acm rpc-ruleset rule 9992 rpc-name 'vyatta-ippf-v1:get-statistics'

set system acm rpc-ruleset rule 9993 action allow

set system acm rpc-ruleset rule 9993 group vyattaop

set system acm rpc-ruleset rule 9993 rpc-name 'vyatta-virtualization-v1:list-images'

set system acm rpc-ruleset rule 9994 action allow

set system acm rpc-ruleset rule 9994 group vyattaop

set system acm rpc-ruleset rule 9994 rpc-name 'vyatta-system-sensor-v1:system-event-logs'

set system acm rpc-ruleset rule 9995 action allow

set system acm rpc-ruleset rule 9995 group vyattaop

set system acm rpc-ruleset rule 9995 rpc-name 'vyatta-service-twamp-v1:twping'

set system acm rpc-ruleset rule 9996 action allow

set system acm rpc-ruleset rule 9996 group vyattaop

set system acm rpc-ruleset rule 9996 rpc-name 'vyatta-op-v1:route'

set system acm rpc-ruleset rule 9997 action allow

set system acm rpc-ruleset rule 9997 group vyattaop

set system acm rpc-ruleset rule 9997 rpc-name 'vyatta-op-v1:interface'

set system acm rpc-ruleset rule 9998 action allow

set system acm rpc-ruleset rule 9998 group vyattaop

set system acm rpc-ruleset rule 9998 rpc-name 'vyatta-op-v1:ping'

set system acm rpc-ruleset rule 9999 action deny

set system acm rpc-ruleset rule 9999 group vyattaop

set system acm rpc-ruleset rule 9999 module-name '*'

set system acm rpc-ruleset rule 9999 rpc-name '*'

set system acm ruleset rule 9998 action allow

set system acm ruleset rule 9998 group vyattapwdcfg

set system acm ruleset rule 9998 operation '*'

set system acm ruleset rule 9998 path '/system/login/user/*/authentication/*'

set system acm ruleset rule 9999 action allow

set system acm ruleset rule 9999 group vyattacfg

set system acm ruleset rule 9999 operation '*'

set system acm ruleset rule 9999 path '*'

set system config-management commit-revisions 20

set system console device ttyS0 speed 115200

set system ip

set system login user vyos authentication encrypted-password '********'

set system login user vyos level admin

set system login user xrcd2 authentication encrypted-password '********'


2023年3月5日 星期日

Cacti + LINE Notify

 [root@rocky9 thold]# cat /etc/redhat-release 

Rocky Linux release 9.1 (Blue Onyx)

[root@rocky9 thold]# php -v 

PHP 7.4.33 (cli) (built: Feb 14 2023 09:05:10) ( NTS )

Copyright (c) The PHP Group

Zend Engine v3.4.0, Copyright (c) Zend Technologies

    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

[root@rocky9 thold]# mysql

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 2293

Server version: 10.5.16-MariaDB MariaDB Server


Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.


Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.


MariaDB [(none)]> exit

Bye

[root@rocky9 thold]# 

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

Cacti ver 1.2.24

Thresholds 1.7

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

vi /var/www/html/cacti/plugins/thold/thold_functions.php


Row 5456 Insert :

    shell_exec("curl -X POST https://notify-api.line.me/api/notify -H 'Authorization: Bearer LineNotifyTokenXXXXXXXXXXXXXXXXXXXXXXXXXXXX' -F 'message=$subject \n\n'");







vi /var/www/html/cacti/lib/functions.php


Row 4705 Insert :

 shell_exec("curl -X POST https://notify-api.line.me/api/notify -H 'Authorization: Bearer LineNotifyTokenXXXXXXXXXXXXXXXXXXXXXXXXXXXX' -F 'message=$subject \n\n  $body'");










Advanced DEMO