Defining New Relic Observer jobs

The New Relic Observer is installed as part of the core installation procedure. Use New Relic Observer when you have a New Relic account with a New Relic Infrastructure subscription. Using New Relic Observer, you can define jobs that dynamically load New Relic Infrastructure resource data via New Relic for analysis by Netcool Agile Service Manager.

Before you begin

Important: The New Relic Observer supports the cloud/SaaS New Relic version.

Ensure you have the New Relic account and New Relic Infrastructure subscription details to hand, such as the account name, account ID, and New Relic Insights API query key.

Remember: Swagger documentation for the observer is available at the following default location: https://<your host>/1.0/newrelic-observer/swagger
Restriction: New Relic applies a 1000 results limit on all New Relic Query Language (NRQL) queries. To accommodate this limit when retrieving data from the SystemSample, StorageSample, ProcessSample and NetworkSample event tables, the New Relic Observer uses the following NRQL query time clause:
"SINCE 4 hours ago LIMIT 1000"

About this task

The Observer uses the New Relic Infrastructure subscription and makes active New Relic Query Language (NRQL) calls over REST to New Relic Insights to download New Relic Infrastructure resource data.

The New Relic Observer loads the following New Relic Infrastructure resources and their relationships to the Agile Service Manager core topology service:
  • Host
  • Storage
  • OS
  • Network Interfaces
  • Processes

The New Relic Observer job extracts New Relic Infrastructure resources from New Relic using New Relic Query Language (NRQL) over REST. The observer loads and updates the resources and their relationships within the Agile Service Manager core topology service.

newrelic_observer_common.sh
The configuration file you use to customize New Relic Observer settings.
The parameters defined here are then used by the newrelic_observer_load_start.sh script to trigger the New Relic Observer jobs.
Tip: Alternatively, you can set the appropriate environment variables. If an environment variable is set, it takes precedence over the configuration file settings.
You define and start the following job. You must edit the parameters in the configuration file before running this job.
Full Topology Upload job
A transient (one-off) job that loads all requested topology data.
This job is started by the newrelic_observer_load_start.sh script.

Procedure

To edit the parameters in the configuration file

  1. Open the newrelic_observer_common.sh configuration file and edit (at least) the following Load parameters:
    accountName
    New Relic account name or tenant name
    accountId
    New Relic account ID.
    To obtain the account ID, first log into the New Relic login page:
    https://login.newrelic.com/login and then obtain the account ID from this URL:
    https://rpm.newrelic.com/accounts/<accountId>
    insightsQueryAPIKey
    New Relic Insights Query API Key in encoded format.
    A new Relic user with a new Relic Infrastructure subscription is required to generate a new Relic Insights query API Key as outlined here: https://docs.newrelic.com/docs/insights/insights-api/get-data/query-insights-event-data-api
    filterCriteria
    Extend the result set returned to Agile Service Manager.
    The default is 'SINCE 4 hours ago LIMIT 1000'.
    For more information, see the documentation for New Relic Query Language.

To start the Load job

  1. To start the New Relic Observer Full Topology Upload job, use the following command:
    $ASM_HOME/bin/newrelic_observer_load_start.sh

Results

This job loads all requested topology data. Run this job whenever you need New Relic topology data refreshed.

What to do next

You can also use the following scripts:
newrelic_observer_load_stop.sh
Stops the Load job
newrelic_observer_job_list.sh
Lists the status of current jobs
newrelic_observer_log_level.sh
Sets the log level
Remember: As an alternative to being configured using the Observer Configuration UI, observer jobs have scripts to start and stop all available jobs, to list the status of a current job, and to set its logging levels. These scripts can be run with -h or --help to display help information, and with -v or --verbose to print out the details of the actions performed by the script, including the full cURL command. For the on-prem version of Agile Service Manager, observer scripts are configured for specific jobs by editing the script configuration files.