Configuring the EM Plug-in for Files and Directories to monitor files in your organization

by bluemedora_editor on May 1, 2013
The Oracle Enterprise Manager Plug-in for Files and Directories from Blue Medora provides in-depth monitoring of files and directories on both an individual and collective basis at the file-system level of Windows, Linux, AIX, and Solaris servers. A simple directive file defines which files and directories to monitor via regular expressions as well as a number of other useful features.

With The Blue Medora Plug-in for Files and Directories, you gain the ability to monitor:
  • File or directory size in bytes, kilobytes, megabytes, and gigabytes.
  • The number of files in a particular directory.
  • The number or size of files matching a naming pattern in a particular directory.
  • The number or size of files matching a naming pattern in a directory and its subdirectories (recursion).
  • The number of files in the entire file system matching a naming pattern.
  • Whether a file or directory exists.
  • Whether a file or directory has been removed.
  • Whether a file, file set, or directory is growing or shrinking.
  • Delta Changes (Size).

Key Features:

  • Less complexity, increased security, more uniform operations management with significant cost reduction via elimination of redundant infrastructure and multiple platform-specific tools.
  • Leverage EM’s visualization capabilities.
  • Deliver immediate value with out-of-the-box thresholds, expert recommendations, and BI Publisher based reporting.
  • Inspect only the files and directories that you want with directory recursion and regular expressions.
This specific post will cover the process of Manually Adding the Files and Directories target and provides a guide to using the new target instance of the Oracle Enterprise Manager Plug-in for Files and Directives available from Blue Medora. In order to configure the plug-in we need to import and deploy the plug-in on OEM, this is covered as part of our two part series. Part 1 covers importing the plug-in in an EM12c Software Library and Part 2 covers deploying the plugin to Management Servers (OMS) and Management Agents (OMA). The information posted here is intended to supplement, not replace, the online User Guide available on the Blue Medora product page.  The demo environment these screen shots are captured from is an EM12c system running on a Windows 64-bit Server. This post assume you have already executed all the steps covered in Part 1 and Part 2 of this Blog series.

Manually Adding the Files and Directories target

  • From the EM12c Web UI, navigate to Setup-Add Target -> Add Targets Manually.

 

  • Select Add Non-Host Targets by Specifying Target Monitoring Properties. From the Target Type drop-down menu, select Files and Directories. Specify the desired OMA and click Add Manually.

 

  • Specify monitoring properties for the Files and Directories target type. Click OK.
    • Target Name: name of the Plug In target type instance.
    • Directive File Path: specify the path of the Files and Directories file on OMA server.

 

  • Next the ‘Add Target – Confirmation’ dialog box appears. It should indicate that Files and Directories was added successfully. Click Close to continue.

 

Now that we have successfully installed the plug-in. The below example demonstrates, a monitoring scenario that shows the Files and Directories plugin when combined with EM incident actions provides alerts for scenarios such as missing files and directories. The following steps will show you how to use the Files and Directories plug-in.
  • Navigate to the following path on OMA server C:\oracle\plugins\bm.em.fdm.agent.plugin_12.1.0.3.0\scripts
In this path, you will find the files and directories fdm_directives_sample.csv file which is used to monitor files and directories.
  • Open the fdm_directives_sample.csv file and ADD the path of the files you would like to monitor and then Save the file.
Add entries that you need to monitor to this file using the below format. Fields are comma separated and commas are not supported within any field except regex. Alias and Path are the only required fields.
Format: alias,path[,subdirectories,regex]
Example:
  1. JKS File,C:\TEMP\oracle\agent_inst\sysman\config\montrust\AgentTrust.jks,, (Monitors AgentTrust.jks file only)
  2. Config Directory,C:\oracle\agent_inst\sysman\config,yes, (Monitors all files in config directory and its subdirectories)

 

  • From the EM12c Web UI, navigate to Targets-Add Target -> All Targets.

 

  • Click on the target name of the plug-in. This will take us to Files and Directories Plugin.

 

  • A good way to utilize this information is by using OEM thresholds. We can set threshold by navigating to the path FDM -> Monitoring -> Metrics and Collection Settings.

 

  • Next select ‘All Metrics’ from the view drop down. Then click on three pencil icon for Path Exists metric, this will allow you to edit the metric.

 

  • Click on Add button, then in the new row, enter Alias and Critical threshold. For this example I have used alias as “JKS File” and critical threshold as “NO”. Click Continue.

 

  • Information that settings has been modified but not saved to the repository appears. Click OK to save and then Click OK on confirmation update succeeded page. Changes will be reflected in the next data collection cycle.

 

  • Next, for the incident to trigger, Goto OMA server and move AgentTrust.jks file from the path. Now, path exists = “No” scenario is valid. An incident ticket is created.

 

  • Click on the incident ticket. The incident ticket window displays information about the ticket raised for path exists equal to No.

 

Also, following are some Scenarios and Usecases that can be implemented. This section contains more advanced scenarios that may be used as example directives.
  • Monitoring a single log file
A user wants to monitor an application log file, enterprise_log_file.log, contained in the enterprise_application/logs directory. They are not interested in anything else in the folder. A directive line to monitor such a scenario would look like this:
Example: Enterprise Log File, /opt/enterprise_application/logs/enterprise_log_file.log,no,
  • Monitoring log files with a date pattern
A user wants to monitor the size of the current log and all the logs that have been rolled, to keep an eye on their size. The log files have a six digit date pattern so that the date is inserted before the file extension.
Example: Enterprise Log Files,/opt/enterprise_application/logs,no,enterprise_log_file_\d{6}\.log+
  • Monitoring the size of a directory
Now the user wants to monitor the size of an entire log directory. They also wish to know if the log files are growing at a rate more than one megabyte every ten minutes. There are also logs that reside deeper in the directory structure, so monitoring just the directory specified explicitly in the path will not suffice.
Example: Enterprise Log Directory, C:\Program Files\enterprise_application\logs,yes
  • 4. Monitoring larger directories in addition to smaller ones
Monitoring a larger directory is not any harder, but the user should take care not to overextend the capabilities of the system they are trying to monitor. Consider an example where a user wants to measure a file on the same system as the previous example but they did not want to poll a large directory every 10 minutes. The user would set up another target, create a new directives file, and configure the plugin to run a collection e very 60 minutes. The separate file would contain the large directory only to be polled every hour. The original plugin’s directive file:
Example: Enterprise Log Directory, C:\Program Files\opt\enterprise_application\logs,yes,
The second plugin’s directive file:
Example: Enterprise Applications, C:\Program Files, yes,
Again, the user would have to configure two separate instances of the plugin for this scenario to work. This would include two different configurations and two different directives files (otherwise, both plugins would perform all the directives in the shared file).
This completes the process of implementing Files and Directories plug-in to an EM12c OMS and OMA. Through the information provided in blog series you should be able to import, deploy and implement Files and Directives plug-in available from Blue Medora and also perform some basic functionality and implement few of the scenarios mentioned.

 

Get started

Try BindPlane for free. No credit card required.

Sign up
True Visibility
BindPlane for VMware vRealize Operations

True Visibility allows cloud management teams to use VMware vRealize’s powerful machine learning and capacity planning engine across their entire hybrid cloud environment.

Azure Monitor...everything
BindPlane for Microsoft Azure Monitor

Make Azure Monitor your first-pane-of-glass across your entire multi-cloud, multi-database or hybrid platform environment.

Thank you for contacting us. Your information was received. We'll be in touch shortly.