agent 部署监控主机状态
环境准备
agent目标主机:
建立oracle用户,并配置sudo 权限:
hosts 文件添加Cloud Control 主机ip和主机名称解析:
[root@prod04 ~]# cat /etc/sudoers|grep oracle
oracle ALL=(ALL) NOPASSWD: ALL
agent端:
[root@prod04 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.111 em01
192.168.0.190 prod04
192.168.0.191 prod04-vip
192.168.0.192 prod05
192.168.0.193 prod05-vip
192.168.0.195 scan
Cloud Control 主机配置:
hosts 文件添加要添加agent主机信息。
在2个主机hosts 添加主机名ip信息:
oms端:
[root@em01 ~]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain localhost4 localhost4.localdomain4 localhost
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost
192.168.0.111 em01
192.168.0.190 prod04
192.168.0.192 prod05
手动添加目标
安装agent:
输入主机信息
agent 安装目录和用户名和密码:
命名的身份证明,添加用户:
复查:
部署代理:
部署代理完成:
状态检查
可以看prod04 主机状态信息:
agent 状态检查命令
ORACLE 用户:
[oracle@prod04 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 3
Copyright (c) 1996, 2018 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.3.0.0.0
OMS Version : 13.3.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/cc12agetnt/agent_inst
Agent Log Directory : /u01/cc12agetnt/agent_inst/sysman/log
Agent Binaries : /u01/cc12agetnt/agent_13.3.0.0.0
Core JAR Location : /u01/cc12agetnt/agent_13.3.0.0.0/jlib
Agent Process ID : 53063
Parent Process ID : 53026
Agent URL : https://prod04:3872/emd/main/
Local Agent URL in NAT : https://prod04:3872/emd/main/
Repository URL : https://em01:4903/empbs/upload
Started at : 2018-11-23 14:31:49
Started by user : oracle
Operating System : Linux version 3.10.0-514.el7.x86_64 (amd64)
Number of Targets : 4
Last Reload : (none)
Last successful upload : 2018-11-23 14:36:45
Last attempted upload : 2018-11-23 14:36:45
Total Megabytes of XML files uploaded so far : 0.36
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 35.08%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2018-11-23 14:42:00
Last successful heartbeat to OMS : 2018-11-23 14:42:00
Next scheduled heartbeat to OMS : 2018-11-23 14:43:00
---------------------------------------------------------------
Agent is Running and Ready
[oracle@prod04 bin]$ pwd
/u01/cc12agetnt/agent_inst/bin