среда, 2 февраля 2011 г.

EM Grid Control


 Установка агентов для мониторинга

Setup/Extensibility/Self Update
установим в offline

Выгружаем каталог em_catalog.zip по ссылке
Выбираем: Browse
Устанавливаем: Upload



Setup/Extensibility/Self Update

Нажимаем: Check Updates

Выгружаем по ссылке файл:
https://updates.oracle.com/Orion/Download/download_patch/p9348486_112000_Generic.zip

Переносим этот файл на сервер с OMS

cd $OMS_HOME/bin

./emcli login -username=sysman

./emctl status oms -details

./emctl synchronize

./emcli import_update_catalog -omslocal -file='/u01/app/oraagent/agentshared/p9348486_112000_Generic.zip'


На странице Self Update для Agent Software  в столбце Available Updates будет уже не 0

Заходим в  Agent Software
Выбираем необходимый дистрибутив
И скачиваем его : Download
по полученной ссылке

Выгрузив всех нужных агентов, копируем их на OMS хост
и выполним импорт с помощью утилиты emcli:


cd $OMS_HOME/bin

./emcli login -username=sysman

./emcli import_update -omslocal -file='/u01/app/oraagent/agentshared/p17014943_112000_Generic.zip'
./emcli import_update -omslocal -file='/u01/app/oraagent/agentshared/p17014940_112000_Generic.zip'
....

Далее заходим в Agent Software
Выбираем необходимый дистрибутив
И применяем изменения: Apply


Начиная с версии 12с агенты не могут быть выгружены без наличия OMS

Установка агента на целевой хост
Setup/Add Target/Add Targets Manually

Выбрать: Install Agent on Host
Выбрать: + Add

Введите имя хоста и платформу 
Next


Введите информацию для установки :

Installation Base Directory  : /u01/app/oraagent
Instance Directory           : /u01/app/oraagent/agent_inst (default)
Named Credential         : (click the "+" button and add the credentials of the "oracle" user)
Privileged Delegation Setting: (leave blank)
Port                         : 3872

Next
Deploy Agent
Continue, All hosts
Done

Проверим статус агента на удаленном хосте

cd  /u01/app/oraagent/agent_inst/bin
./emctl status agent

Выполним от root скрипт
/u01/app/oraagent/core/13.1.0.0.0/root.sh


Заходим  Targets/Hosts
И видим этот хост


Чтобы агент автоматически обнаружил все цели на хосте, которые он может мониторить
необходимо перейти


Setup/Add Target/Add Targets Manually

Выбрать: Add Using Guided Process

Выбрать типы целей для обнаружения:
(например: Oracle Database, Listener and Automatic Storage Manager) 
Add

Выбрать имя хоста. 
Next

Сконфигурировать каждую найденную цель. 
Configure

Next
Save
Close

Заходим  Targets > Databases
И видим эту БД








Версия 11

1. После инсталляции Grid Control server 11.1.0.1.0 создайте директорию в $OMS_HOME/sysman/agent_download:
cd /app/oracle/product/Middleware/oms11g/sysman/agent_download
mkdir 11.1.0.1.0

Для Linux:

Download the Linux_x86_64_Grid_Control_agent_download_11_1_0_1_0.zip file from OTN:
http://www.oracle.com/technology/software/products/oem/htdocs/agentsoft.html

Copy the downloaded file to the /sysman/agent_download/11.1.0.1.0 directory.

Go to this directory by executing the following:

cd /sysman/agent_download/11.1.0.1.0

When you are here, confirm that the size and checksum calculation of the downloaded file match the information specified on the OTN download page.

Unzip this file by executing the following:

unzip Linux_x86_64_Grid_Control_agent_download_11_1_0_1_0.zip


Для Solaris:

Download the Solaris_Grid_Control_agent_download_11_1_0_1_0.zip file from OTN:
http://www.oracle.com/technology/software/products/oem/htdocs/agentsoft.html

Copy the downloaded file to the /sysman/agent_download/11.1.0.1.0 directory.

Go to this directory by executing the following:

cd /sysman/agent_download/11.1.0.1.0

When you are here, confirm that the size and checksum calculation of the downloaded file match the information specified on the OTN download page.

Unzip this file by executing the following:

unzip Solaris_Grid_Control_agent_download_11_1_0_1_0.zip



Для Windows:

Download the Win32_Grid_Control_agent_download_11.1.0.1.0.zip file from OTN:
http://www.oracle.com/technology/software/products/oem/htdocs/agentsoft.html

Copy the downloaded file to the /sysman/agent_download/11.1.0.1.0 directory.

Go to this directory by executing the following:

cd /sysman/agent_download/11.1.0.1.0

When you are here, confirm that the size and checksum calculation of the downloaded file match the information specified on the OTN download page.

Unzip this file by executing the following:

unzip Win32_Grid_Control_agent_download_11.1.0.1.0.zip

After unzipping, the agentdownload.vbs will be available at /sysman/agent_download/11.1.0.1.0/win32/agentdownload.vbs.

Download the agentDownload.vbs by using cp, rcp, scp, FTP, or wget utility on the machine where you want to install the Management Agent.


.
.
.

$ vi /app/oracle/product/Middleware/oms11g/sysman/agent_download/11.1.0.1.0/agent_download.rsp

s_OMSHost="oragrid.sun.ru"
s_OMSPort="4889"
### s_encrSecurePwd=""

$ vi /app/oracle/product/Middleware/oms11g/sysman/agent_download/11.1.0.1.0/linux_x64/agentDownload.linux_x64

s_OMSHost="oragrid.sun.ru"
s_OMSPort="4889"



1. Установка на Linux

# su -

#useradd -u 703 -g oinstall -G dba oraagent
#passwd oraagent
#mkdir -p /u01/app/oraagent
#chown oraagent:oinstall /u01/app/oraagent



# vi .bash_profile

### Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

### User specific environment and startup programs
AGENT_HOME=/u01/app/oraagent/product/11.1.0/agent11g
export AGENT_HOME
PATH=/u01/app/oraagent/product/11.1.0/agent11g/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
export PATH


# vi /etc/oratab

*:/u01/app/oraagent/product/11.1.0/agent11g:N
+ASM:/u01/app/oragrid/product/11.2.0/grid:N
testasm:/u01/app/oradb/product/10.2.0/db_1:N
oradb1:/u01/app/oracle/product/10.2.0/db_2:N
oradb2:/u01/app/oracle/product/10.2.0/db_2:N
oradb3:/u01/app/oracle/product/10.2.0/db_2:N

# su - oraagent

$ cd /tmp
$ wget --no-check-certificate https://oragrid.sun.ru:1159/agent_download/11.1.0.1.0/linux_x64/agentDownload.linux_x64
$ chmod +x agentDownload.linux_x64
$ ./agentDownload.linux_x64 -b /u01/app/oraagent/product/11.1.0 -m oragrid.sun.ru -r 1159 -y


# su -
# /u01/app/oraagent/product/11.1.0/agent11g/root.sh


# su - oraagent

$ emctl stop agent
$ emctl start agent
$ emctl status agent

Конфигурацию изменяем так:
$ emctl stop agent
$ vi /u01/app/oraagent/product/11.1.0/agent11g/sysman/emd/targets.xml
$ emctl start agent
$ emctl status agent

2. Установка на Solaris 10

#useradd -c '' -d /export/home/oraagent -g oinstall -m -u 1300 -s /usr/bin/bash oraagent
#passwd oraagent


#mkdir –p /u01/app/oraagent
#chown -R oraagent:oinstall /u01/app/oraagent
#chmod -R 775 /u01/app/oraagent


# vi .bash_profile

### User specific environment and startup programs
AGENT_HOME=/u01/app/oraagent/product/11.1.0/agent11g
export AGENT_HOME
PATH=/u01/app/oraagent/product/11.1.0/agent11g/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/bin
export PATH

# vi /etc/oratab

*:/u01/app/oraagent/product/11.1.0/agent11g:N
+ASM:/u01/app/oragrid/product/11.2.0/grid:N
testasm:/u01/app/oradb/product/10.2.0/db_1:N
oradb1:/u01/app/oracle/product/10.2.0/db_2:N
oradb2:/u01/app/oracle/product/10.2.0/db_2:N
oradb3:/u01/app/oracle/product/10.2.0/db_2:N

# su - oraagent

$ cd /tmp
$ wget --no-check-certificate https://oragrid.sun.ru:1159/agent_download/11.1.0.1.0/solaris/agentDownload.solaris
$ chmod +x agentDownload.solaris
$ ./agentDownload.solaris -b /u01/app/oraagent/product/11.1.0 -m oragrid.sun.ru -r 1159 -y

# su -
# /u01/app/oraagent/product/11.1.0/agent11g/root.sh


# su - oraagent

$ emctl stop agent
$ emctl start agent
$ emctl status agent

Для версии агента 11g, версии листенера 10.2 и ОС Solaris SPARC обнаружен баг.
Bug 10070623: STATUS DOWN FOR LISTENER 10.2 MANAGED BY AGENT 11G

Временно эту проблему можно обойти так:

$ emctl stop agent
$ vi /u01/app/oraagent/product/11.1.0/agent11g/bin/emctl

и закомментируем следующие строки:

#if [ "$LD_LIBRARY_PATH_64" = "" ] ; then
#LD_LIBRARY_PATH_64=$ORACLE_HOME/lib:$ORACLE_HOME/perl/lib:$OUILOC/lib/solaris
#else LD_LIBRARY_PATH_64=$ORACLE_HOME/lib:$ORACLE_HOME/perl/lib:$OUILOC/lib/solaris:$LD_LIBRARY_PATH_64
#fi

$ emctl start agent


Установка на Windows:

Создаем директорию:
/u01/app/oraagent/product/11.1.0

Run agentDownload.vbs by executing the following:
cscript.exe agentDownload.vbs -b /u01/app/oraagent/product/11.1.0 -m oragrid.sun.ru -r 1159


Клонирование агента (agent cloning - поддерживается с версии 10.2.0.5)

1.Zip an already installed agent home.(I personally used tar and gzip)

2.Scp or ftp to standalone host you want it installed on,
uncompress in the same location. (at this point I uninstalled the older agent,
removed any leftover files, unzipped, untarred new agent in the same directory).

3.$AGENT_HOME/oui/bin/runInstaller -clone -forceClone ORACLE_HOME= ORACLE_HOME_NAME= -noconfig -silent

например так:
$AGENT_HOME/oui/bin/runInstaller -clone -forceClone ORACLE_HOME=/u01/app/oraagent/product/11.1.0/agent11g ORACLE_HOME_NAME=agent11g1 -noconfig -silent

4.$AGENT_ORACLE_HOME/bin/agentca -f (configures the agent)

5.$AGENT_ORACLE_HOME/root.sh (as root) 



6. Установка DST для агента:

для Linux:

cd /tmp

unzip p12949905_111070_Linux-x86-64.zip
unzip p7695070_111070_Linux-x86-64.zip

cd /tmp/7695070
$AGENT_HOME/OPatch/opatch apply
cd /tmp/12949905
$AGENT_HOME/OPatch/opatch apply


для Solaris:

cd /tmp

unzip p12949905_112030_SOLARIS64.zip
unzip p7695070_11107_Solaris-64.zip

cd /tmp/7695070
$AGENT_HOME/OPatch/opatch apply
cd /tmp/12949905
$AGENT_HOME/OPatch/opatch apply





 Проверяем проходит ли upload:

-bash-3.00$ emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 11.1.0.1.0
OMS Version : 11.1.0.1.0
Protocol Version : 11.1.0.0.0
Agent Home : /u01/app/oraagent/product/11.1.0/agent11g
Agent binaries : /u01/app/oraagent/product/11.1.0/agent11g
Agent Process ID : 13449
Parent Process ID : 13440
Agent URL : http://sf480.domain.ru:3872/emd/main/
Repository URL : https://oragrid.domain.ru:1159/em/upload/
Started at : 2011-02-18 15:22:26
Started by user : oraagent
Last Reload : 2011-02-18 15:22:26
Last successful upload : (none)
Last attempted upload : (none)
Total Megabytes of XML files uploaded so far : 0.00
Number of XML files pending upload : 27
Size of XML files pending upload(MB) : 2.47
Available disk space on upload filesystem : 91.75%
Last attempted heartbeat to OMS : 2011-02-18 15:26:42
Last successful heartbeat to OMS : unknown
---------------------------------------------------------------
Agent is Running and Ready
-bash-3.00$ emctl upload agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.

Если upload не прошел, то запускаем его вручную:

-bash-3.00$ emctl upload
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload error: uploadXMLFiles skipped :: OMS version not checked yet. If this issue persists check trace files for ping to OMS related errors.

Если получим такое сообщение, то попытаемся это вылечить примерно так :

-bash-3.00$ emctl stop agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.

-bash-3.00$ emctl unsecure agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Checking Agent for HTTP... Done.
Agent is already unsecured.

-bash-3.00$ emctl secure agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Agent is already stopped... Done.
Securing agent... Started.
Enter Agent Registration Password :
Securing agent... Successful.

-bash-3.00$ emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting agent .............. started.

-bash-3.00$ emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 11.1.0.1.0
OMS Version : 11.1.0.1.0
Protocol Version : 11.1.0.0.0
Agent Home : /u01/app/oraagent/product/11.1.0/agent11g
Agent binaries : /u01/app/oraagent/product/11.1.0/agent11g
Agent Process ID : 13830
Parent Process ID : 13821
Agent URL : https://sf480.domain.ru:3872/emd/main/
Repository URL : https://oragrid.domain.ru:1159/em/upload
Started at : 2011-02-18 15:33:29
Started by user : oraagent
Last Reload : 2011-02-18 15:33:29
Last successful upload : (none)
Last attempted upload : (none)
Total Megabytes of XML files uploaded so far : 0.00
Number of XML files pending upload : 35
Size of XML files pending upload(MB) : 3.19
Available disk space on upload filesystem : 91.75%
Last successful heartbeat to OMS : 2011-02-18 15:33:42
---------------------------------------------------------------
Agent is Running and Ready

-bash-3.00$ emctl upload
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
EMD upload completed successfully

-bash-3.00$
-bash-3.00$ emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 11.1.0.1.0
OMS Version : 11.1.0.1.0
Protocol Version : 11.1.0.0.0
Agent Home : /u01/app/oraagent/product/11.1.0/agent11g
Agent binaries : /u01/app/oraagent/product/11.1.0/agent11g
Agent Process ID : 13830
Parent Process ID : 13821
Agent URL : https://sf480.domain.ru:3872/emd/main/
Repository URL : https://oragrid.domain.ru:1159/em/upload
Started at : 2011-02-18 15:33:29
Started by user : oraagent
Last Reload : 2011-02-18 15:33:29
Last successful upload : 2011-02-18 15:34:32
Total Megabytes of XML files uploaded so far : 3.18
Number of XML files pending upload : 2
Size of XML files pending upload(MB) : 1.38
Available disk space on upload filesystem : 91.75%
Last successful heartbeat to OMS : 2011-02-18 15:33:42
---------------------------------------------------------------
Agent is Running and Ready
-bash-3.00$

Cleanup the agent

1. Stop the agent on the target node
$AGENT_HOME/bin/emctl stop agent

2. Delete any pending upload files from the agent home

$AGENT_HOME/sysman/emd/state/*
$AGENT_HOME/sysman/emd/collection/*
$AGENT_HOME/sysman/emd/upload/*
$AGENT_HOME/sysman/emd/lastupld.xml
$AGENT_HOME/sysman/emd/agntstmp.txt
$AGENT_HOME/sysman/emd/blackouts.xml
$AGENT_HOME/sysman/emd/protocol.ini

3. Issue an agent clearstate from the agent home
$AGENT_HOME/bin/emctl clearstate agent

4. Secure (if necessary) and Start the agent
$AGENT_HOME/bin/emctl secure agent
$AGENT_HOME/bin/emctl start agent

5. force an upload
$AGENT_HOME/bin/emctl upload agent


Deinstall the agent.

$ cd $AGENT_HOME/oui/bin

If using the agent install guide on this site, then the $AGENT_HOME will be /u01/app/oracle/agent11g

$ ./runInstaller -deinstall -silent REMOVE_HOMES={$AGENT_HOME} -removeallfiles

NB The {} are part of the command and do need to be specified.
If using the agent install guide on this site, then the $AGENT_HOME will be /u01/app/oracle/agent11g

$ cd /u01/app/oraagent/product/11.1.0
$ rm -rf .gcinstall_temp
$ rm agentDownload*.log

Remove the targets from the Grid Control frontend:

Select the Targets tab in the Grid Control frontend.
Select Hosts from the breadcrumb menu.
Click on the host where the agent has been deinstalled.
In the host window, click Targets
Click the Select All link to select all targets on the host.
Click Remove
On the Confirmation screen, review the targets to be removed and if happy, click Yes
When returned to the Targets screen for the host, click on the agent to be removed.
On the Agent screen select the tick box for the host and click remove
Click on the Targets tab.
Select All Targets from the breadcrumb menu.
Ensure the radial button for the agent to be removed is selected and click remove




Комментариев нет:

Отправить комментарий