Installing and Configuring New Relic Nozzle for PCF

This topic describes how to install and configure New Relic Nozzle for Pivotal Cloud Foundry (PCF).

You can either install the New Relic Nozzle for PCF as a tile in Ops Manager, or push it as a regular application.

Install and Configure New Relic Nozzle for PCF as a Tile in Ops Manager

  1. Download the product file from Pivotal Network.

  2. Navigate to the Ops Manager Installation Dashboard and click Import a Product to upload the product file.

  3. Under the Import a Product button, click the + sign next to the version number of New Relic Nozzle for PCF. This adds the tile to your staging area.

  4. Click the newly added New Relic Nozzle for PCF tile.

  5. Follow the steps below to configure the nozzle tile:

    • Under New Relic Firehose Nozzle > Settings > Assign AZs and Networks:
    • Select your desired networks.
    • Click Save.
    • Under New Relic Firehose Nozzle > Settings > New Relic Firehose Nozzle, set the following fields:
    • New RelicInsights Base URL: https://insights-collector.newrelic.com/v1
    • New Relic RPM Account ID: YOUR-NEW-RELIC-RPM-ACCOUNT
    • New Relic Insights Insert Key: YOUR-NEW-RELIC-INSIGHTS-INSERT-KEY
    • UAA Url: YOUR-PCF-DEPLOYMENT'S-UAA-URL
    • Nozzle instance: defaults to 3. Specify between 1 to 6 instance(s) depending on the load of Firehose events.
    • Skip SSL Verification (True/false): Whether to verify SSL connection
    • UAA API User Account Name: YOUR-UAA-USER-NAME
    • UAA API User Account Password: YOUR-UAA-PASSWORD
    • Traffic Controller URL: TRAFFIC-CONTROLLER-URL-FOR-YOUR-PCF-DEPLOYMENT
    • Firehose Subscription ID: Unique Subscription Identifier (i.e. newrelic.firehose)
    • Selected Events: Comma-separated list of event types
    • Admin User: with admin privileges to obtain all application details in all orgs/spaces
    • Admin Password: password for the user with admin user
    • App Detail Collection Interval: interval for querying application details (defaults to 1 minute)
    • If your environment uses a proxy server, add the following environment variables:
    • http_proxy: proxy server address:port
    • no_proxy: comma-separated list of servers to bypass proxy
    • Under New Relic Firehose Nozzle tile > Settings > New Relic Firehose Global Exclusion Filters tab, set the following fields:
    • Global Deployments Exclusion Filters: Comma-separated list of deployments to exclude (optional)
    • Global Origins Exclusion Filters: Select from pull down list of origins to exclude (optional)
    • Global Jobs Exclusion Filters: Select from pull down list of jobs to exclude (optional)
    • Under New Relic Firehose Nozzle tile > Settings > New Relic Firehose ValueMetric Inclusion Filters tab, set the following fields:
    • ValueMetric Deployment Inclusion Filters: Comma-separated list of deployments to include (optional)
    • ValueMetric Origin Inclusion Filters: Select from pull down list of ValueMetric origins to include (optional)
    • ValueMetric Jobs Inclusion Filters: Select from pull down list of ValueMetric jobs to include (optional)
    • ValueMetric Metric Name Inclusion Filters: Select from pull down list of ValueMetric Names to include (optional)


Where to Obtain Configuration Values

The following properties can be obtained either from Ops Manager Elastic Runtime or from New Relic Insights: * User Name: Ops Mgr -> Elastic Runtime -> Credentials -> Job -> UAA -> Opentsdb Nozzle Credentials -> Link to Credential -> identity * Password: Ops Mgr -> Elastic Runtime -> Credentials -> Job -> UAA -> Opentsdb Nozzle Credentials -> Link to Credential -> password * UAA URL: https://uaa.<your-pcf-domain>cf curl /v2/info * Traffic Controller URL: wss://doppler.<pcf-domain>:<ssl-port>cf curl /v2/info * Firehose Subscription ID: A unique ID (i.e. newrelic.firehose) * Skip SSL: If SSL is disabled, this value should be set to true. * Selected Events: A comma-separated list of any of the following Firehose event types: - ValueMetric - CounterEvent - ContainerMetric - HttpStartStop - LogMessage * Insights Base URL: https://insights-collector.newrelic.com/<API-Version> (API version is currently v1) * Insights RPM ID: The first number that you find in your RPM Url (i.e. https://insights.newrelic.com/accounts/<rpm-id>/...) * Insights Insert Key: An insert key from https://insights.newrelic.com/accounts/<rpm-id>/manage/api_keys. * Admin User Name: Ops Mgr -> Elastic Runtime -> Credentials -> Job -> UAA -> Admin Credentials -> Link to Credential -> identity * Admin Password: Ops Mgr -> Elastic Runtime -> Credentials -> Job -> UAA -> Admin Credentials -> Link to Credential -> password

  1. As an admin user in the New Relic UI, you can go to New Relic Insights > Manage Data > API Keys to obtain an insert key. If you have an existing key, you can use it. If you do not already have one, you can create a fresh insert key specifically for this purpose.

  2. Click “Save.

  3. Return to the Ops Manager Installation Dashboard and click Apply Changes.

Install and Configure New Relic Nozzle for PCF as an Application

When pushing New Relic Nozzle for PCF as an application, you need to have a manifest with the following properties:

    applications:
    - name: newrelic-firehose-nozzle
      memory: 512M
      instances: 3
      health-check-type: none
      host: cf-firehose-nozzle-${random-word}
      env:
        NOZZLE_USERNAME: NOZZLE-USER
        NOZZLE_PASSWORD: NOZZLE-PASSWORD
        NOZZLE_API_URL: https://api.YOUR-PCF-DOMAIN
        NOZZLE_UAA_URL: https://uaa.YOUR-PCF-DOMAIN
        NOZZLE_TRAFFIC_CONTROLLER_URL: wss://doppler.YOUR-PCF-DOMAIN:SSL-PORT
        NOZZLE_FIREHOSE_SUBSCRIPTION_ID: newrelic.firehose
        NOZZLE_SKIP_SSL: true/false
        NOZZLE_SELECTED_EVENTS: Comma-separated list of event types
        NOZZLE_ADMIN_USER: <admin-user> with admin privileges to obtain all application details in all orgs/spaces
        NOZZLE_ADMIN_PASSWORD: <admin-password> password for the user with admin privileges
        NOZZLE_APP_DETAIL_INTERVAL: interval for querying application details (defaults to 1 minute)
        NEWRELIC_INSIGHTS_BASE_URL: https://insights-collector.newrelic.com/v1
        NEWRELIC_INSIGHTS_RPM_ID: NEW-RELIC-RPM-ACCOUNT-ID
        NEWRELIC_INSIGHTS_INSERT_KEY: INSIGHTS-INSERT-KEY

        # http_proxy: PROXY-SERVER-ADDRESS:PORT
        # no_proxy: COMMA-SEPARATED-LIST-OF-SERVERS-TO-BYPASS-PROXY

        NOZZLE_SELECTED_EVENTS: Comma-separated list of firehose event types

        NOZZLE_GLOBAL_DEPLOYMENT_EXCLUSION_FILTERS: Comma-separated list of deployments to exclude (optional)
        NOZZLE_GLOBAL_ORIGIN_EXCLUSION_FILTERS: JSON array of origins to exclude (optional)
        NOZZLE_GLOBAL_JOB_EXCLUSION_FILTERS: JSON array of jobs to exclude (optional)

        NOZZLE_VALUEMETRIC_DEPLOYMENT_INCLUSION_FILTERS: Comma-separated list of deployments to include (optional)
        NOZZLE_VALUEMETRIC_ORIGIN_INCLUSION_FILTERS: JSON array of valuemetric origins to include (optional)
        NOZZLE_VALUEMETRIC_JOB_INCLUSION_FILTERS: JSON array of valuemetric jobs to include (optional)
        NOZZLE_VALUEMETRIC_METRIC_INCLUSION_FILTERS: JSON array of valuemetric metric names to include (optional)

Note: In order to automate the cf push deployment process as much as possible, create an application manifest.yml file. Update the manifest as required for your environment. Make sure to assign proper values to all required environment variables. Any property values within angle brackets must be changed to the correct values for your environment.

Note: When you are pushing the nozzle as an app, the product and release folders are not required. Make sure to remove these folders from the directory where you run cf push to reduce the size of the upload, or use .cfignore file.

Application Build and Deploy

The application is already built and ready to run on PCF. If you make any changes to the code, or would like to run on other operating systems, you can rebuild the binary.

$ env GOOS=<OS-name> GOARCH=amd64 go build -o nr-nozzle
$ cf push

You can obtain a complete list of valid OS-name and ARCH types from Go Lang docs.

Once you build the binary and update the manifest.yml file with proper values, you can cf push the tile as an application.

Using Proxy Servers

If you need to use a proxy server in your environment, use the following environment variables:

  • http_proxy
  • no_proxy

You can specify the values for these properties during the setup of the tile in Ops Manager. If you use the app version of the Nozzle (running by cf push), you can set these environment variables at the end of the manifest.yml in the env section, or you can set them directly by running cf set-env as a CLI command.

Notes

  • These environment variables must be in lower case.
  • You must set http_proxy to your proxy server address and port (i.e. http://my_proxyserver:my_proxy_port).
  • You must set no_proxy to any address that you need to bypass. In order for the nozzle to work properly with proxies, you must bypass the doppler server (doppler.YOUR-PCF-DOMAIN.com). Make sure you do not include the protocol and the port for no_proxy. Just add the server name.
Create a pull request or raise an issue on the source for this page in GitHub