Introduction
Oracle have a nice small tool called ASR-Gateway (Oracle Auto Service Request) which (as the name already says) opens
automatically a Service Request at Oracle (support.oracle.com) if a hardware component fails on a Engineered System like ExaData or PCA (and the others too 🙂 ).
In a customer project, this ASR-Gateway failed sometimes or was not running as expected.
To monitor them, we implemented a simple service-test in our primary monitoring tool for all Oracle related stuff called Oracle Enterprise Manager CloudControl (OEM).
Instead of installing a full monitoring agent on the ASR-Gateway we use a simpler approach. we setup a key-based authentication between the OEM-Server and ASR-Gateway.
Prepare OS for key-based ssh authentication
On OMS-Host (or where the Beacon is running)
# login as user where the agent is running # (in my case this is the user oracle) $> su - oracle # if no ssh-key was created previously, then create one first $> ssh-keygen $> cat $HOME/.ssh/id_rsa.pub ssh-rsa ABCDEFGHIJKLMNOPow+Mw5== oracle@oem01.gabrielkeusen.com
On ASR-Host
# Add the key above to the list of authorized keys. # (in my case, the root-user is running ASR) $> vi $HOME/.ssh/authorized_keys
Setup ASR-Gateway Monitoring with OEM 13c
So, once the OMS is able to login to ASR-Gateway-Host, we can setup the Service-Monitoring.
Navigate in the OMS Console to
Targets -> Services -> Create -> Generic Service (Test Based) and enter a fancy Name for the Service.
Fill the fields with the following Parameter:
Test-Type: Custom Script
Test-Name: i.e iLoveASR
Command-Script:
ssh root@asr_gw.gabrielkeusen.com /opt/asrmanager/util/check_asr_status.sh | grep "FAIL" | exit $(wc -l)
Interval: 15 Minutes (this should be often enough)
Choose a Test-Beacon.
Add the Beacon which will perform the test.
In a Test-Environment you can savely use the default beacon. In our case, we setup a dedicated one.
After selecting a beacon, you can directly test the service by clicking on „Verify Service Test“
Done! 🙂
Next Step: Setup the notification if the service is marked as DOWN.
Have fun with Oracle Enterprise Manager!