Sunday, December 6, 2020

Integrate Oracle DBs with SCOM through Foglight

Problem:

How to get the health state of our Oracle Databases into OpsMgr?

One approach was installing SCOM agents on AIX and purchasing a Management Pack from a specialized vendor.

Main argument to stick on the current solution was because Foglight fully satisfies monitoring Oracle Databases.


Requirement:

Integrate our Oracle DBs’ health state information into SCOM benefiting on Foglights’ data. As the vendor only offered a Management Pack to forward alerts to SCOM, authoring a custom Management Pack seemed to be the only possible way.


Solution Approach:

A registry key on any Windows Server is used to promote it act as the “Foglight MonitoringServer”.

Foglight’s command line tool “foglcmd” is used to export topology and health information into XML files.

A Scheduled Tasks runs periodically “foglcmd” on the “Foglight MonitoringServer” to pull the current data into files.

The “Foglight MonitoringServer” hosts the Management Pack and runs discovery- and monitoring scripts which parse the XML files to feed OpsMgr with the information.


Result:

This management pack provides topology and health state of our Oracle environment to SCOM.

As the source is available, feel free to customize it according to your demand.


Note:

An early stage of the Management Pack as VSAE solution file and XML can be found on Github.  https://github.com/Juanito99/OraDBs_Fogl_OpsMgr

Technical information to use this management pack can be found on: http://www.rjz.de/OraDBsToOpsMgrViaFoglightSetup

Integrate Oracle DBs through Foglight - Setup Guide

Prepararation:

Foglight

A dedicated user account should be created and permitted in Foglight to query information. Add it to the red highlighted group.

Foglight-Monitoring-Server:

Choose one usual Windows Server which is been monitored via SCOM.

  • Set the following registry key to promote it to the “OraglceFoglight Monitoring Server”:

[HKEY_LOCAL_MACHINE\SOFTWARE\ABC\ OracleFoglightMonitoringServer]

  • Copy fglcmd.zip from the foglight server, typically located in <InstallDirectory>\tools to the “Oracle Monitoring Server” and extract it.
  • Add into fglcmd.bat the following line which need to reflect the installed Java Version. – E.g.
    set JAVA_HOME=C:\Program Files\Java\jre1.8.0_102
     
  • Download the internal server certificate of the management server as Base64 and import it to the Java certificate store:
    C:\Program Files\Java\jre1.8.0_102\bin>keytool -importcert -file C:\foglightb64.cer -alias delinfoglight -keystore ../lib/security/cacerts -storepass changeit
     
  • Create a directory C:\Temp\FoglightMonitoring\
  • Create Scheduled Task to run the batch files which retrieves the Oracle environment information from Foglight. – customize the following script: https://github.com/Juanito99/OraDBs_Fogl_OpsMgr/blob/master/Cmd%20for%20Scheduled%20Task/QryFoglightSrv.cmd

    Agent, Database, TableSpace, Servers and Listener are the components which are been queried.

    Each of the components will create one XML file, stored in C:\Temp\FoglightMonitoring\

    • fogoracledboAgentModel.xml
    • fogoracledboDatabase.xml
    • fogoracledboListenerstatus.xml
    • fogoracledboServers.xml
    • fogoracledboTablespace.xml

Internals

About Discoveries

  • MonitoringServer is discovered by via ‘FilteredRegistryProvider’, details above.
  • TableSpace, Servers, Listener, Database, Agent and DatabaseSystem are discovered by ‘TimedPowerShell.DiscoveryProvider’ which used paramerized DiscoverDBOs.ps1
  • DiscoverDBOs.ps1 is exptecting the XML files in C:\Temp\FoglightMonitoring\
  • Relations are discovered by ‘TimedPowerShell.DiscoveryProvider’ which use DiscoverDBORelations.ps1

About Monitors

  • TableSpace, Servers, Listener, Database, Agent are monitored via custom – module monitor. The monitor itself is MonitorDBOAdv.vbs.
  • MonitorDBAdv.vbs uses the ‘aggregateState’ is judge. State changes are according to value.
  • 0-2 = ‘Healthy’,  3 and 4 = ‘Critical’.

About Views

Each element has an own state view located in the dedicated folder ‘ABC Database Oracle Foglight Folder’.

Share:

0 comments:

Post a Comment

Search This Blog

Powered by Blogger.

Blog Archive

Pages