Skip to content

New Relic Integration

New Relic offers a complete SaaS observability stack, ranging from high-volume ingestion of events/metrics/logs/traces to advanced dashboards that can be created ad-hoc using a web UI or from files and templates for an infrastructure-as-code approach.

Overview

Storing metrics in New Relic is not mandatory, but some kind of metrics storage—either in New Relic, InfluxDB, or Prometheus—is needed to take full benefit of Butler SOS' features.

Butler SOS sends data directly to New Relic—you configure the connection and New Relic takes care of the rest.

Data Volumes and Pricing

At the time of this writing, New Relic offers a generous free plan. It's a great starting point for everyone. If there's a need for more dashboard users, the account can be upgraded as needed.

In most cases, Butler SOS will not generate a lot of data and you can stay within New Relic's free tier. The amount of data generated by Sense health metrics and Butler SOS uptime metrics is very small indeed.

Log Events Can Increase Data Volumes

If your Qlik Sense environment generates a lot of log events, data volumes can increase rapidly. For example, if a user connects to Sense and gets an HTTPS certificate warning in the browser, this will also cause warnings and errors in the proxy logs. Multiply this by X users and there can suddenly be thousands of errors and warnings per hour in the Sense logs.

If these are also sent to New Relic, data volumes increase quickly.

New Relic Concepts

New Relic is similar to InfluxDB in that Butler SOS pushes data to both systems.

The basic concepts are:

ConceptDescription
MetricsRepresent a measurement of some kind—number of sessions in the Sense proxy, amount of free RAM on a Sense server, etc.
EventsSomething that happened—warnings and errors in Sense log files can be forwarded to New Relic as events. Various user activities (user session start/stop, etc.) can also be sent as events
AttributesTags attached to metrics or events that act as dimensions for the data. Metrics in visualizations can be grouped by attributes, similar to how Qlik Sense measurements are grouped by dimensions

Attribute Types

  • Static attributes are defined in Butler SOS' config file
  • Dynamic attributes are determined at runtime

Additional Data Formats

These data formats exist in New Relic but are not currently used by Butler SOS (this may change in the future):

  • Logs - Regular lines in a log file, consisting of several fields
  • Distributed tracing - Collects data as requests travel from one service to another, recording each segment of the journey as a span

Configuring New Relic

Credentials

New Relic credentials can be provided in two ways:

  1. In the config file (not recommended for production)
  2. Via command line options (recommended for security)

See Command Line Options for details on the New Relic CLI options.

Config File Settings

The main New Relic settings are in Butler-SOS.newRelic:

yaml
Butler-SOS:
  newRelic:
    enable: true
    event:
      url: https://insights-collector.newrelic.com
      header:
        - name: X-Insert-Key
          value: YOUR_INSERT_KEY
      attribute:
        static:
          - name: environment
            value: production
        dynamic:
          butlerSosVersion:
            enable: true
    metric:
      destinationAccount:
        - Production
      url: https://metric-api.newrelic.com/metric/v1
      # ... additional metric settings

What Data Can Be Sent to New Relic

Butler SOS can send the following data types to New Relic:

Metrics

From Butler-SOS.newRelic.metric.dynamic:

CategoryMetrics
Engine MemoryCommitted, allocated, free memory
Engine CPUCPU usage percentage
Engine CallsTotal API calls to engine
Engine SelectionsTotal selections made
Engine SessionsActive and total sessions
Engine UsersActive and total users
Engine SaturatedSaturation status (0/1)
App CountsActive, loaded, in-memory app counts
App DetailsWhich apps are active/loaded/in-memory
CacheHits, lookups, added, replaced
Proxy SessionsSession counts from proxy service

Events

  • User events - Session start/stop, connection open/close
  • Log events - Errors and warnings from Sense services

Uptime Data

From Butler-SOS.uptimeMonitor.storeNewRelic:

  • Butler SOS memory usage
  • Butler SOS uptime (days, hours, minutes)
  • Butler SOS version

New Relic API Endpoints

Depending on your New Relic account region, use the appropriate API URLs:

US Region

  • Events: https://insights-collector.newrelic.com
  • Metrics: https://metric-api.newrelic.com/metric/v1

EU Region

  • Events: https://insights-collector.eu01.nr-data.net
  • Metrics: https://insights-collector.eu01.nr-data.net/metric/v1

Viewing Data in New Relic

Once data is flowing to New Relic, you can:

  1. Create dashboards using NRQL queries
  2. Set up alerts based on metric thresholds
  3. Explore data using the New Relic query builder

Example NRQL Queries

Active users across all servers:

sql
SELECT sum(active) FROM QlikSenseUsers FACET server_name TIMESERIES

Memory usage trend:

sql
SELECT average(committed) FROM QlikSenseMemory FACET server_name TIMESERIES AUTO

Log events by severity:

sql
SELECT count(*) FROM QlikSenseLogEvent FACET level SINCE 1 hour ago

Comparison with Other Destinations

FeatureNew RelicInfluxDBPrometheus
DeploymentSaaS (managed)Self-hostedSelf-hosted
Setup complexityLowMediumMedium
Built-in dashboardsYesVia GrafanaVia Grafana
Built-in alertingYesVia KapacitorVia Alertmanager
String dataYes (in events)YesNo
Free tierGenerousUnlimited (self-hosted)Unlimited (self-hosted)
Infrastructure requiredNoneInfluxDB serverPrometheus server

Released under the MIT License.