{"id":636,"date":"2024-07-22T12:39:23","date_gmt":"2024-07-22T12:39:23","guid":{"rendered":"https:\/\/dockerpros.com\/?p=636"},"modified":"2024-07-22T12:39:23","modified_gmt":"2024-07-22T12:39:23","slug":"integration-von-docker-mit-new-relic-fur-erweitertes-monitoring","status":"publish","type":"post","link":"https:\/\/dockerpros.com\/de\/miscellaneous\/integrating-docker-with-new-relic-for-enhanced-monitoring\/","title":{"rendered":"Integration von Docker mit New Relic f\u00fcr verbessertes Monitoring"},"content":{"rendered":"<h1>Integrating Docker with New Relic: A Comprehensive Guide<\/h1>\n<p>In the realm of modern software development and deployment, Docker has emerged as a dominant player in containerization, allowing developers to package applications and their dependencies into isolated units called containers. Meanwhile, New Relic has established itself as a leading observability platform that provides real-time insights into application performance, user interactions, and system health. Integrating Docker with New Relic not only enhances monitoring capabilities but also aids in effective troubleshooting, capacity planning, and performance optimization.<\/p>\n<p>This article delves into the advanced aspects of integrating Docker with New Relic, covering setup, best practices, and advanced monitoring techniques to ensure you get the most out of your containerized applications.<\/p>\n<h2>Table of Contents<\/h2>\n<ol>\n<li><a href=\"#understanding-docker-and-new-relic\">Understanding Docker and New Relic<\/a><\/li>\n<li><a href=\"#setting-up-your-environment\">Setting Up Your Environment<\/a><\/li>\n<li><a href=\"#integrating-new-relic-with-docker\">Integrating New Relic with Docker<\/a>\n<ul>\n<li>3.1 <a href=\"#using-new-relics-official-docker-image\">Using New Relic&#8217;s Official Docker Image<\/a><\/li>\n<li>3.2 <a href=\"#installing-new-relic-agent-in-custom-docker-images\">Installing New Relic Agent in Custom Docker Images<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#configuring-new-relic-for-docker-monitoring\">Configuring New Relic for Docker Monitoring<\/a>\n<ul>\n<li>4.1 <a href=\"#configuring-docker-container-metadata\">Configuring Docker Container Metadata<\/a><\/li>\n<li>4.2 <a href=\"#monitoring-docker-performance-metrics\">Monitoring Docker Performance Metrics<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#utilizing-new-relics-apm-features\">Utilizing New Relic&#8217;s APM Features<\/a>\n<ul>\n<li>5.1 <a href=\"#transaction-tracing\">Transaction Tracing<\/a><\/li>\n<li>5.2 <a href=\"#error-tracking\">Error Tracking<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#advanced-monitoring-techniques\">Advanced Monitoring Techniques<\/a>\n<ul>\n<li>6.1 <a href=\"#using-custom-instrumentation\">Using Custom Instrumentation<\/a><\/li>\n<li>6.2 <a href=\"#integrating-logs-with-new-relic\">Integrating Logs with New Relic<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#best-practices-for-docker-and-new-relic-integration\">Best Practices for Docker and New Relic Integration<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ol>\n<h2>Understanding Docker and New Relic<\/h2>\n<p>Before diving into the integration process, it&#8217;s crucial to understand the core functionalities of Docker and New Relic.<\/p>\n<p><strong>Docker<\/strong> simplifies application deployment through containerization, allowing developers to create lightweight, portable, and consistent environments that can be easily replicated across different stages of development and production.<\/p>\n<p><strong>New Relic<\/strong>, on the other hand, offers a suite of tools designed for monitoring the performance and health of applications and infrastructure. With capabilities such as Application Performance Monitoring (APM), Infrastructure Monitoring, and Error Tracking, New Relic provides developers and operations teams with insights that can enhance performance and reliability.<\/p>\n<h2>Setting Up Your Environment<\/h2>\n<p>To effectively integrate Docker with New Relic, the first step is to prepare your environment. This includes:<\/p>\n<ol>\n<li><strong>Installing Docker<\/strong>: Ensure you have Docker installed on your machine or the target server. You can follow the official <a href=\"https:\/\/docs.docker.com\/get-docker\/\">Docker installation guide<\/a> for your specific operating system.<\/li>\n<li><strong>Creating a New Relic Account<\/strong>: If you don&#8217;t already have an account, sign up for New Relic and obtain your <strong>License Key<\/strong>, which will be necessary for the integration process.<\/li>\n<li><strong>Understanding Your Application<\/strong>: Familiarize yourself with the architecture of your application, including the services and containers involved. This knowledge is crucial for effective monitoring.<\/li>\n<\/ol>\n<h2>Integrating New Relic with Docker<\/h2>\n<h3>Using New Relic&#8217;s Official Docker Image<\/h3>\n<p>New Relic provides an official Docker <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> that simplifies the process of integrating monitoring into your Docker environment. Here\u2019s how to set it up:<\/p>\n<ol>\n<li style=\"list-style-type: none;\">\n<ol>\n<li><strong>Pull the New Relic Docker <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\" target=\"_blank\">Image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>:\n<pre><code class=\"language-bash\">docker pull newrelic\/infrastructure<\/code><\/pre>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<ol>\n<li><strong><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\" target=\"_blank\">Run<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the New Relic Infrastructure Agent<\/strong>:You need to provide your New Relic license key as an environment variable:\n<pre><code class=\"language-bash\">docker <span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\" target=\"_blank\">run<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> -d --name new-relic-infra \n-e NRIA_LICENSE_KEY= \n-e NRIA_DISPLAY_NAME= \nnewrelic\/infrastructure:latest<\/code><\/pre>\n<\/li>\n<li><strong>Verify Integration<\/strong>: After running the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>, log in to your New Relic account and check if the infrastructure information is available in the Infrastructure tab.<\/li>\n<\/ol>\n<h3>Installing New Relic Agent in Custom Docker Images<\/h3>\n<p>For custom applications, it&#8217;s often necessary to install the New Relic agent directly within the application <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>. Here\u2019s a step-by-step guide:<\/p>\n<ol>\n<li><strong>Modify Your <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>: <span class=\"glossaryai-tooltip glossary-term-674\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\" target=\"_blank\">Add<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The ADD instruction in Docker is a command used in Dockerfiles to copy files and directories from a host machine into a Docker image during the build process. It not only facilitates the transfer of local files but also provides additional functionality, such as automatically extracting compressed files and fetching remote files via HTTP or HTTPS.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the necessary installation steps for the New Relic agent. For example, for a <span class=\"glossaryai-tooltip glossary-term-684\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/node\/\" target=\"_blank\">Node<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Node, or Node.js, is a JavaScript runtime built on Chrome's V8 engine, enabling server-side scripting. It allows developers to build scalable network applications using asynchronous, event-driven architecture.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/node\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span>.js application, your <span class=\"glossaryai-tooltip glossary-term-652\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile\/\" target=\"_blank\">Dockerfile<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A Dockerfile is a script containing a series of instructions to automate the creation of Docker images. It specifies the base image, application dependencies, and configuration, facilitating consistent deployment across environments.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/dockerfile\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> might look like this:\n<pre><code class=\"language-Dockerfile\">FROM node:14\n\n# Set the working directory\nWORKDIR \/usr\/src\/app\n\n# Copy package.json and install dependencies\nCOPY package.json .\/\nRUN npm install\n\n# Install New Relic\nRUN npm install newrelic --save\n\n# Copy application files\nCOPY . .\n\n# Set the New Relic license key and application name\nENV NEW_RELIC_LICENSE_KEY=\nENV NEW_RELIC_APP_NAME=\n\n# Start the application\nCMD [\"node\", \"app.js\"]<\/code><\/pre>\n<\/li>\n<li><strong>Build the Docker <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\" target=\"_blank\">Image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>:\n<pre><code class=\"language-bash\">docker build -t my-node-app .<\/code><\/pre>\n<\/li>\n<li><strong><span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\" target=\"_blank\">Run<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> the <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">Container<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span><\/strong>:\n<pre><code class=\"language-bash\">docker <span class=\"glossaryai-tooltip glossary-term-672\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\" target=\"_blank\">run<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">\"RUN\" refers to a command in various programming languages and operating systems to execute a specified program or script. It initiates processes, providing a controlled environment for task execution.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/run\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> -d --name my-node-app-container my-node-app<\/code><\/pre>\n<\/li>\n<li><strong>Monitor in New Relic<\/strong>: As the application runs, it will send performance data to New Relic, which can be accessed through the APM dashboard.<\/li>\n<\/ol>\n<h2>Configuring New Relic for Docker Monitoring<\/h2>\n<h3>Configuring Docker Container Metadata<\/h3>\n<p>To enhance monitoring capabilities, you can configure New Relic to collect metadata about your Docker containers. This metadata can include <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> IDs, <span class=\"glossaryai-tooltip glossary-term-651\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\" target=\"_blank\">image<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">An image is a visual representation of an object or scene, typically composed of pixels in digital formats. It can convey information, evoke emotions, and facilitate communication across various media.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/image\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> names, and labels. To do this:<\/p>\n<ol>\n<li><strong>Modify the Agent Configuration<\/strong>: You can do this in the New Relic infrastructure agent configuration file (<code>newrelic-infra.yml<\/code>). <span class=\"glossaryai-tooltip glossary-term-674\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\" target=\"_blank\">Add<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The ADD instruction in Docker is a command used in Dockerfiles to copy files and directories from a host machine into a Docker image during the build process. It not only facilitates the transfer of local files but also provides additional functionality, such as automatically extracting compressed files and fetching remote files via HTTP or HTTPS.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> sections to specify the metadata you want to collect.<\/li>\n<li><strong>Use Labels for Organization<\/strong>: Ensure your Docker containers are labeled appropriately, as New Relic can use these labels to group and filter your containers in the UI.<\/li>\n<\/ol>\n<h3>Monitoring Docker Performance Metrics<\/h3>\n<p>New Relic can monitor various Docker performance metrics, including CPU usage, memory usage, and <span class=\"glossaryai-tooltip glossary-term-661\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/network\/\" target=\"_blank\">network<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A network, in computing, refers to a collection of interconnected devices that communicate and share resources. It enables data exchange, facilitates collaboration, and enhances operational efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/network\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> I\/O. To set this up:<\/p>\n<ol>\n<li><strong>Enable Docker Metrics in New Relic<\/strong>: Ensure that Docker metrics collection is enabled in the New Relic configuration settings.<\/li>\n<li><strong>Viewing Metrics<\/strong>: Navigate to the Infrastructure tab in New Relic to view the metrics associated with your Docker containers.<\/li>\n<\/ol>\n<h2>Utilizing New Relic&#8217;s APM Features<\/h2>\n<p>One of the standout features of New Relic is its Application Performance Monitoring (APM). When integrated with Docker, APM provides deep insights into your application&#8217;s performance.<\/p>\n<h3>Transaction Tracing<\/h3>\n<p>Transaction tracing allows you to see a detailed view of individual requests and transactions within your application. To leverage this feature:<\/p>\n<ol>\n<li><strong>Enable Transaction Tracing<\/strong> in your New Relic agent configuration.<\/li>\n<li><strong>Analyze Traces<\/strong>: In the New Relic APM dashboard, navigate to the Transactions section to view traced transactions, including response times, errors, and external calls.<\/li>\n<\/ol>\n<h3>Error Tracking<\/h3>\n<p>Monitoring errors is critical in maintaining application health. New Relic provides tools for tracking errors in your Dockerized applications.<\/p>\n<ol>\n<li><strong>Enable Error Tracking<\/strong>: Ensure that error tracking is configured in the New Relic agent settings.<\/li>\n<li><strong>View Error Analytics<\/strong>: Use the Errors tab in the APM dashboard to analyze error rates, affected transactions, and <span class=\"glossaryai-tooltip glossary-term-682\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/stack\/\" target=\"_blank\">stack<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">A stack is a data structure that operates on a Last In, First Out (LIFO) principle, where the most recently added element is the first to be removed. It supports two primary operations: push and pop.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/stack\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> traces for easier troubleshooting.<\/li>\n<\/ol>\n<h2>Advanced Monitoring Techniques<\/h2>\n<p>To maximize the potential of your Docker and New Relic integration, consider the following advanced monitoring techniques:<\/p>\n<h3>Using Custom Instrumentation<\/h3>\n<p>In some cases, you may want to monitor specific functions or business transactions in your application. New Relic allows for custom instrumentation, enabling you to track these metrics easily.<\/p>\n<ol>\n<li><strong><span class=\"glossaryai-tooltip glossary-term-674\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\" target=\"_blank\">Add<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The ADD instruction in Docker is a command used in Dockerfiles to copy files and directories from a host machine into a Docker image during the build process. It not only facilitates the transfer of local files but also provides additional functionality, such as automatically extracting compressed files and fetching remote files via HTTP or HTTPS.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> Custom Instrumentation Code<\/strong>: Depending on your programming language, <span class=\"glossaryai-tooltip glossary-term-674\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\" target=\"_blank\">add<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">The ADD instruction in Docker is a command used in Dockerfiles to copy files and directories from a host machine into a Docker image during the build process. It not only facilitates the transfer of local files but also provides additional functionality, such as automatically extracting compressed files and fetching remote files via HTTP or HTTPS.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/add\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> instrumentation code to capture custom events, metrics, or traces.<\/li>\n<li><strong>Send Custom Events<\/strong>: Use New Relic\u2019s <span class=\"glossaryai-tooltip glossary-term-1249\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/api\/\" target=\"_blank\">API<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">An API, or Application Programming Interface, enables software applications to communicate and interact with each other. It defines protocols and tools for building software and facilitating integration.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/api\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> to send custom events, providing additional data points for analysis.<\/li>\n<\/ol>\n<h3>Integrating Logs with New Relic<\/h3>\n<p>Logs are a vital part of application monitoring. New Relic offers capabilities to ingest and analyze logs from your Docker containers.<\/p>\n<ol>\n<li><strong>Set Up Log Forwarding<\/strong>: Configure your Docker containers to forward logs to New Relic Logs using Fluent Bit or similar log forwarding tools.<\/li>\n<li><strong>Analyze Logs<\/strong>: In New Relic, navigate to the Logs section to search, filter, and analyze logs from your Docker containers.<\/li>\n<\/ol>\n<h2>Best Practices for Docker and New Relic Integration<\/h2>\n<p>To ensure a seamless integration between Docker and New Relic, consider adhering to the following best practices:<\/p>\n<ol>\n<li><strong>Keep Your Agents Updated<\/strong>: Regularly update your New Relic agents to benefit from the latest features and bug fixes.<\/li>\n<li><strong>Use Labels and Tags<\/strong>: Organize your containers using labels and tags to improve monitoring efficiency.<\/li>\n<li><strong>Monitor Resource Usage<\/strong>: Regularly check resource usage metrics to identify performance bottlenecks and optimize <span class=\"glossaryai-tooltip glossary-term-650\"><span class=\"glossaryai-link\"><a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\" target=\"_blank\">container<\/a><\/span><span class=\"gai-content-hidden glossaryai-tooltip-content\"><span class=\"gai-tooltip-body\"><span class=\"glossaryai-tooltip-text\">Containers are lightweight, portable units that encapsulate software and its dependencies, enabling consistent execution across different environments. They leverage OS-level virtualization for efficiency.<span class=\"glossaryai-more-link\"> <a href=\"https:\/\/dockerpros.com\/de\/wiki\/container\/\">More \u00bb<\/a><\/span><\/span><\/span><\/span><\/span> configurations.<\/li>\n<li><strong>Automate Deployments<\/strong>: Incorporate New Relic monitoring into your CI\/CD pipelines to automate the deployment and configuration of your monitoring agents.<\/li>\n<li><strong>Test Instrumentation in Staging<\/strong>: Before deploying your instrumentation in production, test it in a staging environment to ensure that it works as expected.<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>Integrating Docker with New Relic can significantly enhance your monitoring capabilities, allowing you to gain deep insights into application performance, user behavior, and system health. By following the steps outlined in this article, you can effectively set up and configure this powerful integration, harnessing the best of both technologies.<\/p>\n<p>As you embark on this journey, keep in mind the importance of ongoing monitoring, optimization, and adherence to best practices. The landscape of software deployment and monitoring is ever-evolving, and staying informed about the latest features and capabilities of Docker and New Relic will empower you to maintain high-performance applications and deliver exceptional user experiences.<\/p>","protected":false},"excerpt":{"rendered":"<p>Die Integration von Docker mit New Relic erm\u00f6glicht eine nahtlose \u00dcberwachung von containerisierten Anwendungen. Durch die Nutzung der Erkenntnisse von New Relic k\u00f6nnen Entwickler Leistungsmetriken verfolgen, Probleme beheben und die Ressourcennutzung effektiv optimieren.<\/p>","protected":false},"author":1,"featured_media":691,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[],"class_list":["post-636","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.0 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Integrating Docker with New Relic for Enhanced Monitoring - Dockerpros<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dockerpros.com\/de\/miscellaneous\/integration-von-docker-mit-new-relic-fur-erweitertes-monitoring\/\" \/>\n<meta property=\"og:locale\" content=\"de_DE\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Integrating Docker with New Relic for Enhanced Monitoring - Dockerpros\" \/>\n<meta property=\"og:description\" content=\"Integrating Docker with New Relic enables seamless monitoring of containerized applications. By leveraging New Relic&#039;s insights, developers can track performance metrics, troubleshoot issues, and optimize resource usage effectively.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dockerpros.com\/de\/miscellaneous\/integration-von-docker-mit-new-relic-fur-erweitertes-monitoring\/\" \/>\n<meta property=\"og:site_name\" content=\"Dockerpros\" \/>\n<meta property=\"article:published_time\" content=\"2024-07-22T12:39:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"dockerpros\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Verfasst von\" \/>\n\t<meta name=\"twitter:data1\" content=\"dockerpros\" \/>\n\t<meta name=\"twitter:label2\" content=\"Gesch\u00e4tzte Lesezeit\" \/>\n\t<meta name=\"twitter:data2\" content=\"7\u00a0Minuten\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/\"},\"author\":{\"name\":\"dockerpros\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4\"},\"headline\":\"Integrating Docker with New Relic for Enhanced Monitoring\",\"datePublished\":\"2024-07-22T12:39:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/\"},\"wordCount\":1263,\"publisher\":{\"@id\":\"https:\/\/dockerpros.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg\",\"articleSection\":[\"Miscellaneous\"],\"inLanguage\":\"de\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/\",\"url\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/\",\"name\":\"Integrating Docker with New Relic for Enhanced Monitoring - Dockerpros\",\"isPartOf\":{\"@id\":\"https:\/\/dockerpros.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg\",\"datePublished\":\"2024-07-22T12:39:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#breadcrumb\"},\"inLanguage\":\"de\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg\",\"width\":800,\"height\":600,\"caption\":\"integrating-docker-with-new-relic-for-enhanced-monitoring\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dockerpros.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Integrating Docker with New Relic for Enhanced Monitoring\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dockerpros.com\/#website\",\"url\":\"https:\/\/dockerpros.com\/\",\"name\":\"Dockerpros\",\"description\":\"DockerPros \u2013 Your Ultimate Docker Resource Hub\",\"publisher\":{\"@id\":\"https:\/\/dockerpros.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dockerpros.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"de\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dockerpros.com\/#organization\",\"name\":\"Dockerpros\",\"url\":\"https:\/\/dockerpros.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png\",\"width\":532,\"height\":114,\"caption\":\"Dockerpros\"},\"image\":{\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4\",\"name\":\"dockerpros\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"de\",\"@id\":\"https:\/\/dockerpros.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1779972442\",\"contentUrl\":\"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1779972442\",\"caption\":\"dockerpros\"},\"sameAs\":[\"https:\/\/dockerpros.com\/\"],\"url\":\"https:\/\/dockerpros.com\/de\/author\/dockerpros\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Integration von Docker mit New Relic f\u00fcr verbessertes Monitoring - Dockerpros","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/dockerpros.com\/de\/miscellaneous\/integration-von-docker-mit-new-relic-fur-erweitertes-monitoring\/","og_locale":"de_DE","og_type":"article","og_title":"Integrating Docker with New Relic for Enhanced Monitoring - Dockerpros","og_description":"Integrating Docker with New Relic enables seamless monitoring of containerized applications. By leveraging New Relic's insights, developers can track performance metrics, troubleshoot issues, and optimize resource usage effectively.","og_url":"https:\/\/dockerpros.com\/de\/miscellaneous\/integration-von-docker-mit-new-relic-fur-erweitertes-monitoring\/","og_site_name":"Dockerpros","article_published_time":"2024-07-22T12:39:23+00:00","og_image":[{"width":800,"height":600,"url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg","type":"image\/jpeg"}],"author":"dockerpros","twitter_card":"summary_large_image","twitter_misc":{"Verfasst von":"dockerpros","Gesch\u00e4tzte Lesezeit":"7\u00a0Minuten"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#article","isPartOf":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/"},"author":{"name":"dockerpros","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4"},"headline":"Integrating Docker with New Relic for Enhanced Monitoring","datePublished":"2024-07-22T12:39:23+00:00","mainEntityOfPage":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/"},"wordCount":1263,"publisher":{"@id":"https:\/\/dockerpros.com\/#organization"},"image":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg","articleSection":["Miscellaneous"],"inLanguage":"de"},{"@type":"WebPage","@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/","url":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/","name":"Integration von Docker mit New Relic f\u00fcr verbessertes Monitoring - Dockerpros","isPartOf":{"@id":"https:\/\/dockerpros.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage"},"image":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage"},"thumbnailUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg","datePublished":"2024-07-22T12:39:23+00:00","breadcrumb":{"@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#breadcrumb"},"inLanguage":"de","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/"]}]},{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#primaryimage","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/integrating-docker-with-new-relic-for-enhanced-monitoring_636.jpg","width":800,"height":600,"caption":"integrating-docker-with-new-relic-for-enhanced-monitoring"},{"@type":"BreadcrumbList","@id":"https:\/\/dockerpros.com\/fr\/divers\/integrer-docker-avec-new-relic-pour-une-surveillance-amelioree\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dockerpros.com\/"},{"@type":"ListItem","position":2,"name":"Integrating Docker with New Relic for Enhanced Monitoring"}]},{"@type":"WebSite","@id":"https:\/\/dockerpros.com\/#website","url":"https:\/\/dockerpros.com\/","name":"Docker-Profis","description":"DockerPros \u2013 Ihr umfassender Docker-Ressourcen-Hub","publisher":{"@id":"https:\/\/dockerpros.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dockerpros.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"de"},{"@type":"Organization","@id":"https:\/\/dockerpros.com\/#organization","name":"Docker-Profis","url":"https:\/\/dockerpros.com\/","logo":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/","url":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","contentUrl":"https:\/\/dockerpros.com\/wp-content\/uploads\/2024\/07\/Dockerpros_logo_blanco.png","width":532,"height":114,"caption":"Dockerpros"},"image":{"@id":"https:\/\/dockerpros.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/a9b4c3d7f7a8e2b072e77d47b382a3a4","name":"dockerpros","image":{"@type":"ImageObject","inLanguage":"de","@id":"https:\/\/dockerpros.com\/#\/schema\/person\/image\/","url":"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1779972442","contentUrl":"https:\/\/dockerpros.com\/wp-content\/litespeed\/avatar\/d13b9d4f101de1a7535b404e0c59affd.jpg?ver=1779972442","caption":"dockerpros"},"sameAs":["https:\/\/dockerpros.com\/"],"url":"https:\/\/dockerpros.com\/de\/author\/dockerpros\/"}]}},"_links":{"self":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts\/636","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/comments?post=636"}],"version-history":[{"count":0,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/posts\/636\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media\/691"}],"wp:attachment":[{"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/media?parent=636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/categories?post=636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dockerpros.com\/de\/wp-json\/wp\/v2\/tags?post=636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}