From ce6492feba8d9c3aefffa269cd3e1d4ecf237c24 Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Wed, 26 Aug 2020 18:38:47 +0200 Subject: [PATCH] OSS compliance edits (#66) * OSS compliance edits --- .github/ISSUE_TEMPLATE/bug-report.md | 30 +++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 38 ----------- .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/enhancement.md | 27 -------- .github/ISSUE_TEMPLATE/feature_request.md | 24 +++++++ CODE_OF_CONDUCT.md | 2 +- README.md | 80 ++++++++++++++--------- SECURITY.md | 13 ---- 8 files changed, 109 insertions(+), 110 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/bug-report.md delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/enhancement.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 SECURITY.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md new file mode 100644 index 00000000..06001c9c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -0,0 +1,30 @@ +--- +name: "Bug report \U0001F41B" +about: Create a report to help us improve +title: '' +labels: bug +assignees: '' +--- + +[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) + +## Description +[NOTE]: # ( Describe the problem you're encountering. ) +[TIP]: # ( Do NOT share sensitive information, whether personal, proprietary, or otherwise! ) + +## Expected Behavior +[NOTE]: # ( Tell us what you expected to happen. ) + +## [NR Diag](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) results +[NOTE]: # ( Provide any other relevant log data. ) +[TIP]: # ( Scrub logs and diagnostic information for sensitive information ) + +## Steps to Reproduce +[NOTE]: # ( Please be as specific as possible. ) +[TIP]: # ( Link a sample application that demonstrates the issue. ) + +## Your Environment +[TIP]: # ( Include as many relevant details about your environment as possible including the running version of New Relic software and any relevant configurations. ) + +## Additional context +[TIP]: # ( Add any other context about the problem here. For example, relevant community posts or support tickets. ) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 71eb0035..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -name: Bug report -about: Describe a scenario in which this project behaves unexpectedly -title: '' -labels: bug, needs-triage -assignees: '' - ---- - -[NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ ) - -## Description - -[NOTE]: # ( Describe the problem you're encountering. ) -[TIP]: # ( Do NOT give us access or passwords to your New Relic account or API keys! ) - -## Steps to Reproduce - -[NOTE]: # ( Please be as specific as possible. ) - -## Expected Behavior - -[NOTE]: # ( Tell us what you expected to happen. ) - -## Relevant Logs / Console output - -[NOTE]: # ( Please provide specifics of the local error logs, Browser Dev Tools console, etc. if appropriate and possible. ) - -## Your Environment - -[TIP]: # ( Include as many relevant details about your environment as possible. ) - -* ex: Browser name and version: -* ex: Operating System and version: - -## Additional context - -[TIP]: # ( Add any other context about the problem here. ) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..397b5b26 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: false +contact_links: + - name: Troubleshooting + url: https://github.com/newrelic/nri-prometheus/blob/master/README.md#support + about: Check out the README for troubleshooting directions diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md deleted file mode 100644 index 0907a9ff..00000000 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ /dev/null @@ -1,27 +0,0 @@ ---- -name: Enhancement request -about: Suggest an idea for a future version of this project -title: '' -labels: enhancement, needs-triage -assignees: '' - ---- - -[NOTE]: # ( ^^ Provide a general summary of the request in the title above. ^^ ) - -## Summary - -[NOTE]: # ( Provide a brief overview of what the new feature is all about. ) - -## Desired Behavior - -[NOTE]: # ( Tell us how the new feature should work. Be specific. ) -[TIP]: # ( Do NOT give us access or passwords to your New Relic account or API keys! ) - -## Possible Solution - -[NOTE]: # ( Not required. Suggest how to implement the addition or change. ) - -## Additional context - -[TIP]: # ( Why does this feature matter to you? What unique circumstances do you have? ) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..57447999 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,24 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' +priority: '' +--- + +## Is your feature request related to a problem? Please describe. +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +## Feature Description +A clear and concise description of the feature you want or need. + +## Describe Alternatives +A clear and concise description of any alternative solutions or features you've considered. Are there examples you could link us to? + +## Additional context +Add any other context here. + +## Priority +Please help us better understand this feature request by choosing a priority from the following options: +[Nice to Have, Really Want, Must Have, Blocker] diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 4fb72572..846e2ad2 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -2,4 +2,4 @@ We believe participation in our community should be a harassment free experience for everyone. -Learn more about our guidelines and principles by reading our [Code of Conduct](https://opensource.newrelic.com/code-of-conduct/) on our Open Source Website. \ No newline at end of file +Learn more about our guidelines and principles by reading our [Code of Conduct](https://opensource.newrelic.com/code-of-conduct/) on our Open Source Website. diff --git a/README.md b/README.md index 4c8781e5..ad4a81c6 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,47 @@ -[![Community Project header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Project.png)](https://opensource.newrelic.com/oss-category/#community-project) +[![New Relic Experimental header](https://github.com/newrelic/open-source-office/raw/master/examples/categories/images/Experimental.png)](https://github.com/newrelic/open-source-office/blob/master/examples/categories/index.md#category-new-relic-experimental) -# New Relic Prometheus OpenMetrics Integration +# New Relic Prometheus OpenMetrics integration [![Build Status](https://travis-ci.org/newrelic/nri-prometheus.svg?branch=main)](https://travis-ci.org/newrelic/nri-prometheus.svg?branch=main) [![CLA assistant](https://cla-assistant.io/readme/badge/newrelic/nri-prometheus)](https://cla-assistant.io/newrelic/nri-prometheus) -Fetch metrics in the Prometheus metrics format, inside or outside Kubernetes, and send them to the New Relic Metrics platform. +Fetch metrics in the Prometheus metrics format, inside or outside Kubernetes, and send them to the New Relic platform. -## How to use it? +## Installation and usage -For documentation about how to use it please refer to [New Relic's documentation website](https://docs.newrelic.com/docs/new-relic-prometheus-openmetrics-integration-kubernetes). +For documentation about how to use the integration, refer to [our documentation website](https://docs.newrelic.com/docs/new-relic-prometheus-openmetrics-integration-kubernetes). Find out more about Prometheus and New Relic in [this blog post](https://blog.newrelic.com/product-news/how-to-monitor-prometheus-metrics/). -## Development +## Building -This integration requires having a Kubernetes cluster available to deploy & run -it. For development, we recommend using [Docker](https://docs.docker.com/install/), [Minikube](https://minikube.sigs.k8s.io/docs/start/) & [skaffold](https://skaffold.dev/docs/getting-started/#installing-skaffold). +Golang is required to build the integration. We recommend Golang 1.11 or higher. -However, at the moment the tests are totally isolated and you don't need a cluster to run them. +This integration requires having a Kubernetes cluster available to deploy and run it. For development, we recommend using [Docker](https://docs.docker.com/install/), [Minikube](https://minikube.sigs.k8s.io/docs/start/), and [skaffold](https://skaffold.dev/docs/getting-started/#installing-skaffold). -### Prerequisites +After cloning this repository, go to the directory of the Prometheus integration and build it: -1. **Go 1.13**. This project uses the [error - wrapping](https://golang.org/doc/go1.13#error_wrapping) support, which makes - it incompatible with previous Go versions. +```bash +$ make +``` + +The command above executes the tests for the Prometheus integration and builds an executable file called `nri-prometheus` under the `bin` directory. -### Running the tests & linters +To start the integration, run `nri-prometheus`: + +```bash +$ ./bin/nri-prometheus +``` -You can run the linters with `make validate` and the tests with `make test`. +If you want to know more about usage of `./bin/nri-prometheus`, pass the `-help` parameter: -### Build the binary +```bash +$ ./bin/nri-prometheus -help +``` -To build the project run: `make build`. This will output the binary release at `bin/nri-prometheus`. +External dependencies are managed through the [govendor tool](https://github.com/kardianos/govendor). Locking all external dependencies to a specific version (if possible) into the vendor directory is required. -### Build the docker image +### Build the Docker image In case you wish to push your own version of the image to a Docker registry, you can build it with: @@ -46,19 +53,18 @@ And push it later with `docker push` ### Executing the integration in a development cluster -- You need to configure how to deploy the integration in the cluster. Copy -deploy/local.yaml.example to deploy/local.yaml and edit the placeholders. - - To get the Infrastructure License key, visit: +- You need to configure how to deploy the integration in the cluster. Copy deploy/local.yaml.example to deploy/local.yaml and edit the placeholders. + - To get the New Relic license key, visit: `https://newrelic.com/accounts/`. It's located in the right sidebar. - After updating the yaml file, you need to compile the integration: `GOOS=linux make compile-only`. - Once you have it compiled, you need to deploy it in your Kubernetes cluster: `skaffold run` ### Running the Kubernetes Target Retriever locally -It can be useful to run the Kubernetes Target Retriever locally against a remote/local cluster to debug the endpoints that are discovered. -The program located in `/cmd/k8s-target-retriever` is made for this. +It can be useful to run the Kubernetes Target Retriever locally against a remote/local cluster to debug the endpoints that are discovered. The binary located in `/cmd/k8s-target-retriever` is made for this. + +To run the program, run the following command in your terminal: -To run the program,run the following command in your terminal: ```shell script # ensure your kubectl is configured correcly & against the correct cluster kubectl config get-contexts @@ -74,6 +80,8 @@ To run the tests execute: $ make test ``` +At the moment, tests are totally isolated and you don't need a cluster to run them. + ## Support Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels. @@ -82,36 +90,46 @@ Should you need assistance with New Relic products, you are in good hands with s > New Relic offers NRDiag, [a client-side diagnostic utility](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) that automatically detects common problems with New Relic agents. If NRDiag detects a problem, it suggests troubleshooting steps. NRDiag can also automatically attach troubleshooting data to a New Relic Support ticket. If the issue has been confirmed as a bug or is a Feature request, please file a Github issue. +## Support + +Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels. + +> New Relic offers NRDiag, [a client-side diagnostic utility](https://docs.newrelic.com/docs/using-new-relic/cross-product-functions/troubleshooting/new-relic-diagnostics) that automatically detects common problems with New Relic agents. If NRDiag detects a problem, it suggests troubleshooting steps. NRDiag can also automatically attach troubleshooting data to a New Relic Support ticket. + +If the issue has been confirmed as a bug or is a Feature request, please file a Github issue. + **Support Channels** * [New Relic Documentation](https://docs.newrelic.com): Comprehensive guidance for using our platform * [New Relic Community](https://discuss.newrelic.com): The best place to engage in troubleshooting questions * [New Relic Developer](https://developer.newrelic.com/): Resources for building a custom observability applications * [New Relic University](https://learn.newrelic.com/): A range of online training for New Relic users of every level +* [New Relic Technical Support](https://support.newrelic.com/) 24/7/365 ticketed support. Read more about our [Technical Support Offerings](https://docs.newrelic.com/docs/licenses/license-information/general-usage-licenses/support-plan). ## Privacy At New Relic we take your privacy and the security of your information seriously, and are committed to protecting your information. We must emphasize the importance of not sharing personal data in public forums, and ask all users to scrub logs and diagnostic information for sensitive information, whether personal, proprietary, or otherwise. -We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address and email address. +We define “Personal Data” as any information relating to an identified or identifiable individual, including, for example, your name, phone number, post code or zip code, Device ID, IP address, and email address. -Review [New Relic’s General Data Privacy Notice](https://newrelic.com/termsandconditions/privacy) for more information. +For more information, review [New Relic’s General Data Privacy Notice](https://newrelic.com/termsandconditions/privacy). -## Contributing +## Contribute -We encourage your contributions to improve the Prometheus integration! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. +We encourage your contributions to improve this project! Keep in mind that when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project. -If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company, please drop us an email at opensource@newrelic.com. +If you have any questions, or to execute our corporate CLA (which is required if your contribution is on behalf of a company), drop us an email at opensource@newrelic.com. **A note about vulnerabilities** -As noted in our [security policy](/SECURITY.md), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals. +As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals. If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic). -If you would like to contribute to this project, please review [these guidelines](./CONTRIBUTING.md). +If you would like to contribute to this project, review [these guidelines](./CONTRIBUTING.md). To all contributors, we thank you! Without your contribution, this project would not be what it is today. ## License + nri-prometheus is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index a5435819..00000000 --- a/SECURITY.md +++ /dev/null @@ -1,13 +0,0 @@ -# Reporting security vulnerabilities - -New Relic is committed to the security of our customers and your data. We believe that engaging with security researchers through our coordinated disclosure program is an important means to achieve our security goals. - -If you believe you have found a security vulnerability in one of our products or websites, we welcome and greatly appreciate you reporting it to New Relic through our [coordinated disclosure page on HackerOne](https://hackerone.com/newrelic). - -## Coordinated disclosure program - -New Relic has partnered with HackerOne to make it as easy as possible for researchers to report security vulnerabilities to us. In recognition of the effort involved in finding these issues, we may provide bounties for eligible reports. - -Please visit our [coordinated disclosure page on HackerOne](https://hackerone.com/newrelic) for full details of our policies and to see previously disclosed reports. - -Please ensure that you're familiar with [our policies](https://hackerone.com/newrelic) before initiating any security testing, and only test against accounts you control. \ No newline at end of file