Skip to main content

NewRelic plugin for monitoring MarkLogic.

Features

  • Easy to install

  • Configurable selection of metrics to retrieve

  • Retrieve summary metrics on local cluster, hosts, servers & forests

  • Retrieve detail metrics on databases, forests, hosts, groups & servers

  • Proxy access to NewRelic api

  • Sample monitoring dashboards available at NewRelic plugin central.

Before you start

Docs

Install, configure & run

Install the plugin using any of the following methods.

  • install from pypi repository:

    pip install newrelic-marklogic-plugin

  • install direct from GitHub:

    pip install https://github.com/marklogic-community/newrelic-plugin/archive/master.zip

  • download release (or clone) repository and run the following:

    python setup.py install

Next step is to create and edit configuration file.

  1. Copy etc/newrelic_marklogic.conf.sample and to newrelic_marklogic.conf

  2. Edit newrelic_marklogic.conf ensuring correct MarkLogic connection details and NewRelic license key

Start reporting metrics to NewRelic by running the following:

newrelic_marklogic.py -c newrelic_marklogic.conf

Which samples metrics every period of length duration as set within configuration.

It is recommended to initiate plugin as a background task, run via a scheduler (ex. cron job) or using any other approach appropriate for your environment.

Running with -h flag will emit usage instructions for running plugin:

newrelic_marklogic.py -h

usage: ./newrelic_marklogic.py [-h] [-c config file] [-l log file]

-h print usage instructions  (this message)
-c config file               (default: newrelic_marklogic.conf)
-l log file                  (default: newrelic_marklogic.log)

Usage

The configuration file drives all newrelic-marklogic-plugin features and is split into several sections.

The ‘marklogic’ section contains connection details to MarkLogic server and Management REST API.

[marklogic]

# Scheme to use when accessing MarkLogic management REST API (http|https).
scheme = http

# Host to use when accessing MarkLogic management REST API (FQDN hostname).
host = localhost

# Port to use when accessing MarkLogic management REST API.
port = 8002

# Authentication to use when accessing MarkLogic management REST API (BASIC|DIGEST).
auth= DIGEST

# Username to use when accessing MarkLogic management REST API.
user = admin

# Password to use when accessing MarkLogic management REST API.
pass = admin

# (optional) Either a boolean, in which case it controls whether we verify
# the server's TLS certificate, or a string, in which case it must be a path
# to a CA bundle to use. Defaults to ``False``.
verify = False

The ‘newrelic’ section specifies the New Relic license key. Optionally you may nominate a proxy for accessing the New Relic Plugin API.

[newrelic]

# Your NewRelic license key.
key = ****************************************

# Proxy (ex. http://10.10.1.10:3128).
http_proxy =

The ‘plugin’ section defines sample period for updating New Relic, as well as the logging level for emitting messages about plugin operation.

There are a set of configurations for defining which statuses are captured by New Relic, summarized below.

  • summary_status (True|False): retrieve local cluster summary status.

  • databases (list of databases): retrieve database detailed status.

  • hosts_summary_status (True|False): retrieve summary of all hosts status.

  • hosts (list of hosts): retrieve host detailed status.

  • forests_summary_status (True|False): retrieve summary of all forests status.

  • forests (list of forests): retrieve forest detailed status.

  • groups (list of groups): retrieve group detailed status.

  • servers_summary_status (True|False): retrieve summary of all servers status.

  • servers (list of servers): retrieve server detailed status.

[plugin]

# New Relic plugin display name.
name = myMarkLogicServer

# Unique New Relic plugin guid.
guid = com.marklogic

# Sample period in seconds.
duration = 60

# Set logging level (INFO|DEBUG|ERROR).
log_level = DEBUG

# Local cluster summary.
summary_status = False

# Database(s) detail status.
databases = Documents

# Hosts summary.
hosts_summary_status = True

# Host(s) detail status.
hosts = 127.0.0.1

# Forests summary.
forests_summary_status = True

# Forest(s) detail status.
forests = Documents Meters

# Group(s) detail status.
groups = Default

# Servers summary.
servers_summary_status = True

# Server(s) detail status (must supply group name ex. ServerName:GroupName).
servers = Manage:Default

Create pypi distribution

  1. To create an official distribution, first ensure that all tests are passing:

    python -m unittest discover -s tests

  2. bump version number and create a distro:

    python setup.py sdist

  3. Upload the package to pypitest:

    twine upload --repository-url https://test.pypi.org/legacy/ dist/*

  4. after verifying all is well, generate the distro on pypi:

    twine upload dist/*

Issues, feature requests & contributing

Please file bug reports, feature requests, and contribute with pull requests through GitHub.

Metadata

Release files for newrelic-marklogic-plugin 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newrelic-marklogic-plugin 0.3.0
File Size Uploaded
newrelic_marklogic_plugin-0.3.0.tar.gz 16.4 kB Details

Release files / newrelic_marklogic_plugin-0.3.0.tar.gz

Download URL newrelic_marklogic_plugin-0.3.0.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1119d652c0e1ec5dc11cf4bf7ac734512d487badb45aecc20bd672a6944f4aa5
BLAKE2b-256 checksum
How to use checksums
bd53237e5d81591c1f9072fb539a830a4d3671e31a9e2b803723138b28f40eb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.39.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file

0.2.8

0.2.7

1 release file

0.2.6

1 release file

0.2.5

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page