New Relic Infrastructure best practices guide

8 Ways to Increase Your Mean Time Between Loss of Sleep

Want even longer periods of uninterrupted sleep? Here are eight best practices to make dynamic infrastructure and server monitoring even easier with New Relic Infrastructure.

1. Install the Infrastructure agent across your entire environment

New Relic Infrastructure was designed to help enterprise customers monitor their large and dynamically changing environments at scale. In order to facilitate this, the UI is completely driven by tags that let you visualize aggregated metrics, events, and inventory for a large number of servers. To really get the most out of Infrastructure monitoring, we recommend installing it across your entire environment, preferably even across multiple regions and clusters. This will provide a more accurate picture of the health of your host ecosystem and the impact your infrastructure has on your applications.

Want to achieve faster Mean Time To Resolution (MTTR)? Install Infrastructure on database servers, web servers, and any other host that supports your applications. When deploying the agent, leverage custom attributes to tag your hosts so that you can use those for filtering the data presented in the UI and for setting alerts. This is in addition to any Amazon EC2 tags you may be using which will auto-import when you enable the EC2 integration. You may also prefer to keep the agent logs separate from the system logs, which you can do through the configuration.

How to do it

  1. Leverage our install modules for config management tools such as Chef, Puppet and Ansible to easily deploy your agent across all your infrastructure.
  2. Read the instructions in the github repo for your config management tool referenced in the link above and define the custom_attributes you want to use to tag your hosts.
  3. Set the ‘log_file` attribute to your preferred location for the New Relic Infrastructure agent logs.

If you are installing the agent on a single host, the process should only take a few minutes and you can find detailed instructions in our documentation.

2. Configure the native EC2 integration

If you have an AWS environment, in addition to installing the Infrastructure agent on your EC2 instances to monitor them, we also recommend configuring the EC2 integration so that Infrastructure can automatically import all the tags and metadata associated with your AWS instances. This allows you to filter down to a part of your infrastructure using the same AWS tags (example, ECTag_Role=’Kafka’), and slice-and-dice your data in multiple ways. Additionally, our ‘Alerts’ and ‘Saved Filter Sets’ are completely tag-driven and dynamic, so they automatically add/remove instances matching these tags to give our users the most real-time views that scale with your cloud infrastructure.

How to do it

  1. From the New Relic Infrastructure menu bar, select Integrations.
  2. Enable the EC2 integration.
    1. If you have not configured any AWS integration yet, click on the Amazon Web Services EC2 button and follow the steps.
    2. If you have already configured other AWS integrations:
      1. Click on the Manage Services link on the top right.
      2. Select the EC2 checkbox.
      3. Click on Save Changes on the bottom right.
Infrastructure integration setup page
infrastructure.newrelic.com > Integrations.

3. Activate integrations with your Pro subscription

Monitoring your Infrastructure extends beyond just CPU, memory, and storage utilization. That’s why Infrastructure Pro has out-of-the-box Integrations that allow you to monitor all the services that support your hosts as well. Activate any of our 20+ integrations, including AWS Billing, AWS ELB, Amazon S3, MySQL, NGINX, and more, to extend monitoring to your AWS or on-host applications, and access the pre-configured dashboards that appear for each of them.

How to do it

AWS Integrations:

  1. From the New Relic Infrastructure menu bar, select Integrations.
  2. Click on an integration you want to configure.
  3. Follow the on-screen instructions to connect New Relic to your AWS account.
  4. Select the integrations you want to enable.

On-Host Integrations:

  1. From the New Relic Infrastructure menu bar, select Integrations.
  2. Click on the On Host Integrations tab.
  3. Click on the link to Configure any of the integrations and follow the steps in the documentation.
  4. Once the integration starts reporting data it will automatically show as “Active.”
Infrastructure integration enable
infrastructure.newrelic.com > Integrations

4. Create filter sets

With New Relic Infrastructure, users can create filter sets to organize hosts, cluster roles, and other resources based on criteria that matter the most to users. This allows you to optimize your resources by using a focused view to monitor, detect, and resolve any problems proactively. The attributes for filtering are populated from the auto-imported EC2 tags or custom tags that may be applied to hosts. You can combine as many filters as you want in a filter set, and save them to share with other people in your account.

You’ll also be able to see the color-coded health status of each host inside the filter set, so you can quickly identify problematic areas of your infrastructure. Additionally, filter sets can be used in the health map to get an overview of your infrastructure performance at a glance based on the filters that matter to your teams.

infra-filter-set.png
infrastructure.newrelic.com > Compute > Add filter.

How to do it

  1. From the New Relic Infrastructure menu bar, select Compute.
  2. Click on the Add Filter button on the left and specify your filtering criteria.
  3. Click on the edit icon next to New Filter Set and set the name for your filter set.
  4. Click on Save.
  5. Access your filter set by clicking on Saved Filter Sets at the top of the left sidebar.

5. Create alert conditions

With New Relic Infrastructure, you can create alert conditions directly within the context of what you are currently monitoring with New Relic. For example, if you are viewing a filter set comprised of a large number of hosts and notice a problem, you don’t need to create an individual alert condition for every host within. Instead, we recommend initiating the alert condition directly from the chart of the metric you are viewing and creating it based on the filter tags. This will create an alert condition for any hosts that match those tags, allowing Infrastructure to automatically remove hosts that go offline and add new hosts to the alert condition if they match those tags. Alerts configured once for the appropriate tags will scale correctly across all future hosts. And know that you can also leverage existing alert policies for Infrastructure’s alert conditions.

infra-alerts.png
infrastructure.newrelic.com > Integrations

How to do it

For Compute, Network, Storage and Processes Metrics

  1. From the New Relic Infrastructure menu bar, select the tab that contains the metrics you want to alert on.
  2. Click on the bell icon (“Set Alert”) at the top right of a chart.
  3. Name your alert condition.
  4. Add additional filters using the Narrow Down Entities drop down.
  5. Select a metric and provide the threshold details.
  6. Choose an existing alert policy or create a new one.
  7. Click on Create.

For Integrations

  1. From the New Relic Infrastructure menu bar, select Integrations.
  2. Click on the Set Alert link for the integration you want to create an alert for.
  3. Name your alert condition.
  4. Add additional filters using the Narrow Down Entities drop down.
  5. Select a metric and provide the threshold details.
  6. Choose an existing alert policy or create a new one.
  7. Click on Create.

6. View Infrastructure data alongside APM data

The integration between New Relic APM and Infrastructure lets you see your APM data and infrastructure data side by side, so you can find the root cause of problems more quickly, no matter where they originate. This allows users to view the performance relationship of your hosts and the applications running on them, allowing for quicker diagnosis of the issue and impact on the business’ health.

Use health maps to quickly spot any issues or alerts related to the health of your applications and how that connects to the supporting infrastructure. The first boxes starting from the top left are those that require your attention.

infra-health-map.png
infrastructure.newrelic.com > Maps > Health map

How to do it

  1. Click on Health map in the top navigation to access health map.
  2. Select the appropriate application-centric or host-centric view, based on your infrastructure filter sets.
  3. Use the filter to narrow down the cards to the ones you are interested in.
  4. Mouse over the cards to get a tooltip with additional information about the current issues.
  5. Click on the title of a card to navigate to the appropriate APM or Infrastructure page with more details about the application or hosts.

7. Access Infrastructure data in New Relic Insights

Teams that use multiple New Relic products find it useful to create a single dashboard to visually correlate the Infrastructure’s health with Application, Browser and Synthetics metrics. That’s where New Relic Insights comes in. All the granular metrics and events collected by Infrastructure are stored in New Relic Insights and are accessible to you immediately. This data is retained for three months for an Essential subscriptions and 13 months for a Pro subscription. Having access to the raw metrics means you can run more custom queries using NRQL, and also create dashboards to share Infrastructure metrics with your team. Simply click on the ‘View in Insights’ icon above any of the Infrastructure charts to view the query that drives the data.

How to do it

  1. From the New Relic Infrastructure menu bar, select the screen with the chart you are interested in.
  2. Click on the View in Insights icon on the top right of any Infrastructure chart.
  3. Edit the query in Insights to customize it at will.
  4. Use the Add to Dashboard button to save the query for later use.
infra-insights.png
insights.newrelic.com > Query.

8. Update your agents regularly

New Relic’s software engineering team is constantly pushing out improvements and new features to improve our customers’ overall monitoring experience. In order to take advantage of all the awesomeness they’re delivering, we recommend regularly updating to the latest version of the Infrastructure agent.

How to do it

  1. From the New Relic Infrastructure menu bar, select Settings.
  2. From the left sidebar, select Agents to check what agent versions are you using.
  3. If needed, update the agent using the instructions for your operating system.

Want more user tips?

Recommendations for learning more: