GBase 8a 监控配置
本次部署用到三個節(jié)點:
資源庫裝在 192.168.1.1? ? ? ? ? ? ? ? ?【建議選擇mysql做資源庫】
tomcat監(jiān)控網(wǎng)站裝在 192.168.1.2? 【采集中心裝在監(jiān)控節(jié)點或者再加一個節(jié)點192.168.1.4安裝采集中心】
被監(jiān)控集群裝在 192.168.1.3? ? ? ? ?【采集代理裝在集群節(jié)點,集群的每一個節(jié)點都要安裝采集代理】
安裝資源庫mysql?
Linux 安裝Mysql 詳細教程(圖文教程)_bai_shuang的博客-CSDN博客_linux安裝mysql
[root@hw-00 ~]# yum install cmake ncurses-devel gcc gcc-c++ vim lsof bzip2 openssl-devel -y [root@hw-00 ~]# useradd mysql [root@hw-00 ~]# passwd mysql [root@hw-00 ~]# visudomysql ALL=(ALL) ALL
[mysql@tx ~]$ ll -rw-r--r-- 1 mysql mysql 492490461 Nov 9 21:17 mysql-8.0.30-el7-x86_64.tar.gz [mysql@tx ~]$ tar -zxvf mysql-8.0.30-el7-x86_64.tar.gz [mysql@tx ~]$ su - root Password: Last login: Wed Nov 9 21:16:48 CST 2022 from 111.199.219.192 on pts/0 [root@tx ~]# mkdir -p /data/mysql [root@tx ~]# chown -R mysql:mysql /data/mysql [root@tx ~]# vi /etc/my.cnf?[mysqld]
bind-address=0.0.0.0
port=3306
user=mysql
basedir=/usr/local/mysql
datadir=/data/mysql
socket=/tmp/mysql.sock
log-error=/data/mysql/mysql.err
pid-file=/data/mysql/mysql.pid
#character config
character_set_server=utf8mb4
symbolic-links=0
explicit_defaults_for_timestamp=true
?[mysqld]
skip-grant-tables
?[mysqld]
#skip-grant-tables
初始化monito數(shù)據(jù)庫
使用mysql做資源庫的話必須,使用8a做資源庫的話 可以不手工初始化,但是我用8a有點問題,后來還是改用mysql 5.7 了
[gbase@tx monitor]$ pwd /opt/monitor [gbase@tx monitor]$ ll total 168 -rw-r--r-- 1 gbase gbase 171867 Sep 27 2021 dbupdate_db8a_9.5.1.0.sql [gbase@tx monitor]$ gccli -ugbase -p******110531! < dbupdate_db8a_9.5.1.0.sql [gbase@tx ~]$ gccli -ugbase -p Enter password: GBase client 9.5.3.27.14_patch.1b41b5c1. Copyright (c) 2004-2022, GBase. All Rights Reserved.gbase> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | performance_schema | | gbase | | gctmpdb | | db1 | | gclusterdb | | monitor | +--------------------+ 7 rows in set (Elapsed: 00:00:00.00)gbase> use monitor; Query OK, 0 rows affected (Elapsed: 00:00:00.00)gbase> show tables; +-----------------------------+ | Tables_in_monitor | +-----------------------------+ | center | | center_temp_conf | | cluster | | cluster_area | | cluster_log | | cluster_node | | cluster_process | | cluster_type | | collection_mode | | conf_backup_log | | db_resource_control_history | | device_type | | equipment_info | | gbase8tinfo | | gbaseinfo | | gbs_info | | gbt_info | | gbt_mtd_info | | gbt_multi_info | | load_his_error_data | | load_his_info | | log_type | | monitor_clear_log | | monitor_config | | monitor_config_manage | | monitor_index | | monitor_index_mib | | monitor_index_summary_type | | monitor_item_conf | | monitor_item_user | | monitor_level | | monitor_log | | monitor_strategy | | net_device_basic_info | | net_device_port_info | | process_type | | processinfo | | qingcloud_info | | resources | | resources_role | | role | | rtsync_basic_info | | server_info | | server_sensor_info | | sqltrace | | sqltrace_iter | | sync_his_info | | sysinfo | | us_info | | user | | user_cluster | | user_role | | warning | | warning_conf | | xinghuan_info | +-----------------------------+ 55 rows in set (Elapsed: 00:00:00.01)安裝監(jiān)控網(wǎng)站
注意:這里安裝到單獨的服務器,不要跟資源數(shù)據(jù)庫在一起,一個是資源搶占問題,一個是裝在一起 ssh登錄失敗,后面不能安裝采集中心(這里我不確定是我機器的問題 還是本來就不能裝在一起,反正分開裝肯定沒問題)
[gbase@tx ~]$ pwd /home/gbase [gbase@tx ~]$ ll -rw-r--r-- 1 gbase gbase 342596917 Nov 6 09:38 GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64.zip [gbase@tx ~]$ unzip GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64.zip [gbase@tx web]$ cd GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/ [gbase@tx web]$ ll -rw-r--r-- 1 gbase gbase 302858327 Sep 27 2021 apache-tomcat-8.5.65.zip [gbase@tx web]$ unzip apache-tomcat-8.5.65.zip [gbase@tx web]$ chmod -R 755 apache-tomcat-8.5.65 [gbase@tx web]$ cd apache-tomcat-8.5.65/bin/ [gbase@tx bin]$ sh startup.sh Using CATALINA_BASE: /home/gbase/GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/apache-tomcat-8.5.65 Using CATALINA_HOME: /home/gbase/GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/apache-tomcat-8.5.65 Using CATALINA_TMPDIR: /home/gbase/GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/apache-tomcat-8.5.65/temp Using JRE_HOME: ../jre Using CLASSPATH: /home/gbase/GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/apache-tomcat-8.5.65/bin/bootstrap.jar:/home/gbase/GBaseGMonitor-9.5.1.0_build21-Redhat_x86-64/web/apache-tomcat-8.5.65/bin/tomcat-juli.jar Using CATALINA_OPTS: Tomcat started.開放端口
如果是阿里云或者騰訊云什么云,需要在阿里云網(wǎng)站配置防火墻規(guī)則,開放端口,只在服務器開放端口沒用(原來資源庫用的8a 開的5258端口,如果是mysql 開3306端口)
[root@tx bin]# firewall-cmd --zone=public --add-port=8080/tcp --permanent success [root@tx bin]# firewall-cmd --reload success [root@tx bin]# firewall-cmd --list-ports 5258/tcp 8080/tcp用另一臺機器驗證端口
[root@hw-00 ~]# telnet 13.143.154.13 8080 Trying 13.143.154.13... Connected to 13.143.154.13. Escape character is '^]'. ^CConnection closed by foreign host.如果端口通了 但是網(wǎng)頁還是無法訪問 可以試試重啟防火墻
[root@tx apache-tomcat-8.5.65]# systemctl stop firewalld [root@tx apache-tomcat-8.5.65]# systemctl start firewalld [root@tx apache-tomcat-8.5.65]# systemctl restart firewall訪問監(jiān)控頁面
http://13.143.154.13:8080/gcmonitor
8a數(shù)據(jù)庫如果沒有手工初始化資源庫 這里需要勾上
這里主機的IP地址 寫 資源庫的IP? ?不是要監(jiān)控的數(shù)據(jù)庫的IP,所有的監(jiān)控數(shù)據(jù)存放在資源庫中
?
?admin/admin
????安裝采集中心
點擊右上角 platform manage
?添加監(jiān)控集群
?
采集策略 全選
點擊采集中心管理 添加采集中心
采集中心負責將采集代理采集的信息持久化到資源庫、并進行節(jié)點報警處理等。一個集群只能通過一個采集中心對采集代理進行采集
?這里的主機 寫監(jiān)控服務器的IP,這個是采集中心裝在哪個節(jié)點,可以跟監(jiān)控服務器裝在一起,也可以新增一個節(jié)點 專門做采集中心
?
勾選然后安裝
?
?填寫操作系統(tǒng)用戶
?
如果發(fā)生下面錯誤,檢查IP地址是否正確,我第一次監(jiān)控跟數(shù)據(jù)庫裝在同一臺服務器,這樣ssh不通,監(jiān)控必須是單獨的服務器
?
?監(jiān)控服務器(剛才填的采集中心的地址)可以看到 已經(jīng)多了采集中心的目錄
[root@hw-00 gbase]# pwd /home/gbase [root@hw-00 gbase]# ll drwxr-xr-x 5 gbase gbase 4096 Nov 6 20:22 gcmonitor_center安裝采集代理
采集代理需要部署在 GCluster 集群節(jié)點上。該模塊負 責采集集群節(jié)點的操作系統(tǒng)、磁盤、內(nèi)存、CPU、網(wǎng)絡流量、節(jié)點運行狀態(tài)、節(jié)點 進程、以及集群的運行情況。
?
?這里寫要監(jiān)控的節(jié)點的IP ,跟服務器類型這個選項保持一致,如果選gcluster 就寫gcluster的IP 如果是gnode 就寫gnode的IP, 把集群的每個IP都配上,如果是gcluster就寫gcluster的IP 做相應的勾選,gnode也是同樣的道理
????????
這里不知道為什么 已經(jīng)添加了 但是顯示不出來 導致無法安裝【確定是數(shù)據(jù)庫的問題,用8a 953做資源庫 確實顯示不出來,后來改成mysql5.7 就可以正常顯示了】
?最后一步就是安裝采集代理了,然后該啟動的啟動就好了
總結(jié)
以上是生活随笔為你收集整理的GBase 8a 监控配置的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: win10彻底禁用wsappx的方法
- 下一篇: Shooter射击游戏需求分析