Installing infrastructure monitoring of Docker containers when running on Mac

Infrastructure Question Template

Hi,

Q: Can it be done and how?

Background: For a POC using my local development workstation, I would like to include infrastructure telemetry into my free New Relic account. Following the NR guided install and if the conditions were right, this supposedly could have been one click. Unfortunately for me not today.

Default step would be to install onto the local host outside of the Docker containers. Unable to install on the host Mac OS which is Darwin and is unsupported by New Relic.

Other options to consider:

  • Can a separate Docker container be used to collect the telemetry?
  • It would be messy but can a New Relic extension be installed into each of the Docker containers.

Docker (Linux) containers:

  • docksal/web:2.1-apache2.4
  • docksal/cli:php7.4-3
  • docksal/solr:1.0-solr3
  • memcached:1.4-alpine
  • docksal/db:1.1-mysql-5.6

Pertinent information;

  • Mac OS 10.15.2
  • Docker 20.10.7, build f0ddf350
  • Docksal/fin (Docker wrapper) 1.106.0
  • Infrastructure agent version: NA
  • Infrastructure agent log snippets: NA
  • Infrastructure integration (cloud or on-host) information

Helpful Resources

Please run New Relic Diagnostics On your host and share the results of that here. NA

newrelic/infrastructure:latest is the Docker image that would seem to support a shared Docker container.

Because my host is a Mac, the agent container will generate error messages since there is the host file system @ root does not have the expected directories:
time="2021-08-18T21:01:58Z" level=warning msg="can't get disk usage. Ignoring it" component=StorageSampler error="no such file or directory" mountPoint=/host/containers/services

time="2021-08-18T21:01:58Z" level=warning msg="can't get disk usage. Ignoring it" component=StorageSampler error="no such file or directory" mountPoint=/host/containers/services/docker

Hey there @kevin.s.wiechmann,

After speaking with our team, it doesn’t seem like this is something that could be done without a fairly large lift on your end. Since running the infrastructure agent in a container and monitoring your MacBook isn’t supported, we’d recommend either of these solutions:

  1. Update your MacBook to the latest version of MacOS (or up to any of the compatible OS versions listed here: Requirements for the infrastructure agent | New Relic Documentation)
  1. Run a service that exposes the metrics you’re looking for through a shell session. Once the data is exposed, you may be able to use a Flex Integration (New Relic Flex: Build your own integration | New Relic Documentation) to collect it and ingest it using a docker container. This entire solution would have to be built on your end, and wouldn’t be supported by the Global Technical Support team.

I’m sorry that we don’t have more options available to you, but please feel free to open a new post or reply to this one if you run into any problems in the future.