Skip to main content

Oracle FMW DMS Spy collector utility

Project description

$ dms-collector

DMS is a Weblogic Dynamic Monitoring Service providing a massive amount of sensors about Weblogic and application components performance. It can be accessed in a number of ways, such as Weblogic Scripting Tool (wlst), Java API or DMS Spy application. DMS Spy is used to access DMS metric tables by using a browser while it also provides endpoints to retrieve metric tables in XML format.

dms-collector is a Python utility that retrieves DMS metrics from Weblogic DMS Spy application. It provides an API to access DMS tables' data and a CLI to query the DMS and display the data in CSV.

Installation

You can install the dms-collector with pip as follows:

pip install dms-collector 

Usage

You can use dms-collector CLI to query the DMS Spy running at https://wls-domain with username weblogic and password password1 by running the following command:

$ dms-collector --url https://wls-domain --connect weblogic/password1 --table JVM_Memory
datetime,timezone,Host,Parent,ServerName,pendingFinalization_value,verbose_value,Process,JVM,Name
"22-01-12 11:23:30",+0100,"domain-3.oraclevnc.com","/JVM/MxBeans","AdminServer",0,"TRUE","AdminServer:7101","JVM","memory"
"22-01-12 11:23:30",+0100,"fmw-poc-app10.oraclevcn.com","/JVM/MxBeans","soa_server2",0,"TRUE","soa_server2:8102","JVM","memory"
"22-01-12 11:23:30",+0100,"fmw-poc-app10.oraclevcn.com","/JVM/MxBeans","proc15010",0,"FALSE","machine2:15010","JVM","memory"
"22-01-12 11:23:30",+0100,"domain-3.oraclevcn.com","/JVM/MxBeans","proc69725",0,"FALSE","machine1:69725","JVM","memory"

CLI Options

There are many options that you can use to control, for example, a number of calls the CLI will run, a delay between calls, fields to be included or excluded or rows to be filtered out in the result.

For the full list of options please run dms-collector --help.

Filtering

If you want to exclude certain fields from the output, such as Process and Parent, run the following command:

$ dms-collector --url https://wls-domain --connect weblogic/password1 --table JVM_Memory \
  --exclude Process,Parent

If you want to only return rows that match a certain criteria, such as a server name, run the following command:

$ dms-collector --url https://wls-domain --connect weblogic/password1 --table JVM_Memory \
  --filter "bool(re.match(r\"WLS_SOA[0-9]+\",str(ServerName)))"

The --filter parameter accepts any valid Python expression with variable names matching table's header names. You can use all header names regardless whether they are included or excluded from the output.

Timestamp and Timezone

The dms-collector CLI adds two columns to the CSV output, namely datetime and timezone. This is the current local time when the data is retrieved from the DMS and changes with every iteration. You can change the field names for both columns by using --datetimefield and --timezonefield respectively as well as remove them from the output by using --exclude option.

Delay Time

You can specify a number of seconds the dms-collector CLI should wait between iterations by using --delay parameter. Since reading the data may in some situations take more time to finish, the delay time needs to be adjusted so that dms-collector always retrieves the data at the same time and the overall running time can be determined. The time adjustment is however disabled when the time to retrieve the DMS data takes more than 2/3 of the delay time. You can disable the delay time adjustment by using --nodelayadjust or change the 2/3 limit by --nodelayperc.

Login

dms-collector uses DMS Spy login form by default. If you are collecting data from a DMS Spy of an earlier version such as FMW infrastructure 11g, you need to use --basicauth option which uses HTTP basic authentication.

Changes over previous version 1.1

The version 2.0+ introduces the following changes:

  • It is now possible to use dms-collector as a Python module which provides DmsCollector class that you can integrate into your Python applications.

  • Several command-line arguments were removed such as linux pipelines and emitting the events, DMS reset and time adjustments.

You can still access the previous version in 1.1 branch.

License

free and free as a bird

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dms_collector-2.0.6-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file dms_collector-2.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for dms_collector-2.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 fcb2ac9cfcaa11423f28fb1e2a548c294da03a7025d7f2df6daadddbfdaab7d6
MD5 4c48cd35ec0491a0dd289fd5f73fe6ac
BLAKE2b-256 e1847e684923d47285b0e4df09ee1c78d3d00e86464562581e4f991a5361c194

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page