Skip to content

talwar/nr1-container-explorer

 
 

Repository files navigation

New Relic One Catalog Project header

nr1-container-explorer

CI GitHub release (latest SemVer including pre-releases) Snyk

View and manage millions of containers in context - in New Relic One.

Usage

Container Explorer displays a global view of all of the containers in an account.

CPU, Memory and Disk I/O is presented in a space efficient heat map.

Clicking on a node in the heatmap displays details about that container, and jumps to its host in the entity explorer.

Screenshot

Screenshot

Open Source License

This project is distributed under the Apache 2 license.

Dependencies

Requires New Relic Infrastructure agent deployed on hosts running Docker containers.

Caveats

We generate per-container CPU etc by summarizing all processes in a given containerId. For example, this query will report CPU for a single container for the last minute:

SELECT sum(cpuPercent) FROM ProcessSample WHERE containerId = '${containerId}'
    SINCE 1 minute ago UNTIL 30 seconds ago

However: This will report an accurate value only if the agent reports one ProcessSample per process every 30 seconds. If the agent reports once every 15 second, then we would get 2x the value for this query. I'm looking to add a capability to estimate the reporting rate per process per container, but note that this reporting rate can vary by host depending on agent config.

If a set of viewed containers all report a the same rate heatmap colorization will be consistent irrespective of an agent's reporting rate. But the reported absolute values may be off.

The infrastructure team is working on agent changes that will properly report by container, at which point we can convert to using that data.

Getting started

First, ensure that you have Git and NPM installed. If you're unsure whether you have one or both of them installed, run the following command(s) (If you have them installed these commands will return a version number, if not, the commands won't be recognized):

git --version
npm -v

Next, clone this repository and run the following scripts:

git clone https://github.com/newrelic/nr1-container-explorer.git
cd nr1-container-explorer
npm install
npm start

Visit https://one.newrelic.com/?nerdpacks=local, navigate to the Nerdpack, and ✨

Deploying this Nerdpack

Open a command prompt in the nerdpack's directory and run the following commands.

# this is to create a new uuid for the nerdpack so that you can deploy it to your account
nr1 nerdpack:uuid -g [--profile=your_profile_name]
# to see a list of APIkeys / profiles available in your development environment, run nr1 credentials:list
nr1 nerdpack:publish [--profile=your_profile_name]
nr1 nerdpack:deploy [-c [DEV|BETA|STABLE]] [--profile=your_profile_name]
nr1 nerdpack:subscribe [-c [DEV|BETA|STABLE]] [--profile=your_profile_name]

Visit https://one.newrelic.com, navigate to the Nerdpack, and ✨

Community Support

New Relic hosts and moderates an online forum where you can interact with New Relic employees as well as other customers to get help and share best practices. Like all New Relic open source community projects, there's a related topic in the New Relic Explorers Hub. You can find this project's topic/threads here:

https://discuss.newrelic.com/t/container-explorer-nerdpack/90565

Please do not report issues with Container Explorer to New Relic Global Technical Support. Instead, visit the Explorers Hub for troubleshooting and best-practices.

Issues / Enhancement Requests

Issues and enhancement requests can be submitted in the Issues tab of this repository. Please search for and review the existing open issues before submitting a new issue.

Contributing

Contributions are welcome (and if you submit a Enhancement Request, expect to be invited to contribute it yourself 😁). Please review our Contributors Guide.

Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. If you'd like to execute our corporate CLA, or if you have any questions, please drop us an email at [email protected].

About

Global visibility of the containers across your infrastructure, easily segmented by tags.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 87.5%
  • CSS 12.5%