首页 > 数据库 > 国内数据库 > OBAgent安装配置
1.创建配置文件
obagent: servers: - name: fgobserver1 # Please dont use hostname, only IP can be supported ip: 192.168.18.41 - name: fgobserver2 ip: 192.168.18.42 - name: fgobserver3 ip: 192.168.18.43 global: # The working directory for obagent. obagent is started under this directory. This is a required field. home_path: /home/admin/obagent # The port that pulls and manages the metrics. The default port number is 8088. server_port: 8088 # Debug port for pprof. The default port number is 8089. pprof_port: 8089 sql_port: 2881 rpc_port: 2882 # Log level. The default value is INFO. log_level: INFO # Log path. The default value is log/monagent.log. log_path: log/monagent.log # Encryption method. OBD supports aes and plain. The default value is plain. crypto_method: plain # Path to store the crypto key. The default value is conf/.config_secret.key. # crypto_path: conf/.config_secret.key # Size for a single log file. Log size is measured in Megabytes. The default value is 30M. log_size: 30 # Expiration time for logs. The default value is 7 days. log_expire_day: 7 # The maximum number for log files. The default value is 10. log_file_count: 10 # Whether to use local time for log files. The default value is true. # log_use_localtime: true # Whether to enable log compression. The default value is true. # log_compress: true # Username for HTTP authentication. The default value is admin. http_basic_auth_user: admin # Password for HTTP authentication. The default value is root. http_basic_auth_password: admin # Username for debug service. The default value is admin. pprof_basic_auth_user: admin # Password for debug service. The default value is root. pprof_basic_auth_password: admin # 以下配置必须与OceanBase 数据库一致 # Monitor username for OceanBase Database. The user must have read access to OceanBase Database as a system tenant. The default value is root. monitor_user: monitor # Monitor password for OceanBase Database. The default value is empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the root_password in oceanbase-ce. monitor_password: monitor # Cluster name for OceanBase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the appname in oceanbase-ce. cluster_name: fgeduobce # Cluster ID for OceanBase Database. When a depends exists, OBD gets this value from the oceanbase-ce of the depends. The value is the same as the cluster_id in oceanbase-ce. cluster_id: 2 fgobserver1: zone: zone1 fgobserver2: zone: zone2 fgobserver3: zone: zone3
2.创建监控用户
use oceanbase; create user monitor identified by 'monitor'; grant select on oceanbase.* to monitor;
3.OBD 部署OBAgent
$ obd cluster deploy fgeduobagent -c obagent-only.yaml Package obagent-1.1.0 is available. install obagent-1.1.0 for local ok +---------------------------------------------------------------------------+ | Packages | +------------+---------+---------+------------------------------------------+ | Repository | Version | Release | Md5 | +------------+---------+---------+------------------------------------------+ | obagent | 1.1.0 | 1.el7 | d2416fadeadba35944872467843d55da0999f298 | +------------+---------+---------+------------------------------------------+ Repository integrity check ok Parameter check ok Open ssh connection ok Remote obagent-1.1.0-d2416fadeadba35944872467843d55da0999f298 repository install ok Remote obagent-1.1.0-d2416fadeadba35944872467843d55da0999f298 repository lib check ok Cluster status check ok Initializes obagent work home ok fgeduobagent deployed $ obd cluster start fgeduobagent Get local repositories and plugins ok Open ssh connection ok Load cluster param plugin ok Check before start obagent ok Start obproxy ok obagent program health check ok +---------------------------------------------------+ | obagent | +---------------+-------------+------------+--------+ | ip | server_port | pprof_port | status | +---------------+-------------+------------+--------+ | 192.168.18.41 | 8088 | 8089 | active | | 192.168.18.42 | 8088 | 8089 | active | | 192.168.18.43 | 8088 | 8089 | active | +---------------+-------------+------------+--------+ fgeduobagent running
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/15412087/viewspace-3115805/ ,如需转载,请注明出处,否则将追究法律责任。