Code Monkey home page Code Monkey logo

nri-redis's Introduction

New Relic Open Source community plus project banner.

New Relic integration for Redis

Our Redis integration reports critical performance data from your Redis server to New Relic products. You can view this metric data and inventory data in pre-built dashboards, create alert policies, and create custom queries and charts. You can also specify keys that are important to your application and get information about their length.

Installation and usage

For installation and usage instructions, see our documentation web site.

Building

Golang is required to build the integration. We recommend Golang 1.16 or higher.

After cloning this repository, go to the directory of the Redis integration and build it:

$ make

The command above executes the tests for the Redis integration and builds an executable file called nri-redis under the bin directory.

To start the integration, run nri-redis:

$ ./bin/nri-redis

If you want to know more about usage of ./bin/nri-redis, pass the -help parameter:

$ ./bin/nri-redis -help

Testing

To run the tests execute:

$ make test

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 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

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.

For more information, review New Relic’s General Data Privacy Notice.

Contribute

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 (which is required if your contribution is on behalf of a company), drop us an email at [email protected].

A note about vulnerabilities

As noted in our 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 our bug bounty program.

If you would like to contribute to this project, review these guidelines.

To all contributors, we thank you! Without your contribution, this project would not be what it is today.

License

nri-redis is licensed under the Apache 2.0 License.

nri-redis's People

Contributors

alejandrodnm avatar alvarocabanas avatar ardias avatar brushknight avatar carlosroman avatar carlossscastro avatar davidbrota avatar davidgit avatar ferranorriols avatar fryckbos avatar gsanchezgavier avatar ibirisol avatar jportasa avatar kang-makes avatar katzchang avatar marcsanmi avatar mariomac avatar matiasburni avatar mlong-nr avatar newrelic-coreint-bot avatar paologallinaharbur avatar renovate[bot] avatar roobre avatar rubenruizdegauna avatar sigilioso avatar tylerlubeck avatar utsavtulsyan avatar varas avatar williamchanrico avatar xino12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nri-redis's Issues

Can't connect to external Redis instance

I have the issue reported on NewRelic forum but not sure if here is the more appropriate place to connect:
https://discuss.newrelic.com/t/external-redis-connection-reset/127110

I’m trying to configure the NR Redis agent to monitor a remote Redis instance.

The agent is failing with:

time=“2021-01-14T14:45:46Z” level=error msg=“Integration command failed” error=“exit status 2” instance=redis-test integration=com.newrelic.redis prefix=integration/com.newrelic.redis stderr="[FATAL] can’t continue: read tcp 123.123.123.123:53658->234.234.234.234:123: read: connection reset by peer\npanic: read tcp 123.123.123.123:53658->234.234.234.234:123: read: connection reset by peer\n\ngoroutine 1 [running]:\ngithub.com/newrelic/nri-redis/vendor/github.com/newrelic/infra-integrations-sdk/log.Fatal 1(0x741cc0, 0xc420068870)\n\t/go/src/github.com/newrelic/nri-redis/vendor/github.com/newrelic/infra-integrations-sdk/log/log.go:107 +0xd5\nmain.fatalIfErr(0x741cc0, 0xc420068870)\n\t/go/src/github.com/newrelic/nri-redis/src/redis.go:175 +0x44\nmain.main()\n\t/go/src/github.com/newrelic/nri-redis/src/redis.go:68 +0x15c\n" working-dir=/var/db/newrelic-infra/newrelic-integrations
time=“2021-01-14T14:45:46Z” level=info msg=“Integration health check finished with some errors” instance=redis-test integration=com.newrelic.redis prefix=integration/com.newrelic.redis working-dir=/var/db/newrelic-infra/newrelic-integrations

I don’t see how to specify the username, this could be the issue as I can get a connection from the same machine through a cli tool but by passing in the username and password.

Here is my config with some data replaced:

integration_name: com.newrelic.redis

instances:

    name: redis-test
    command: metrics
    arguments:
    hostname: redis-host.example.com
    port: 1234
    password:
    config_inventory: false
    #keys: ‘{“0”:["<KEY_1>"],“1”:["<KEY_2>"]}’

    remote_monitoring: true

    use_unix_socket: true
    labels:
    environment: test

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

readme-starts-with-community-plus-header #

The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 5 lines do not contain the pattern(s): Open source Community Plus header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-2 to file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Example for how to configure for multiple redis ports/instances on a single host

Is your feature request related to a problem? Please describe.

It's unclear how to configure the newrelic redis integration for multiple redis ports/instances on a single host.

Feature Description

An example of how to configure the integration for multiple redis ports.

Describe Alternatives

I've looked through all the relevant documentation, examples, etc and have also tried several guesses at how to configure this, but so far no luck at getting it to work with multiple redis ports.

Priority

Blocker - I'm only able to use newrelic to monitor one redis instance per host, but I have 10+ redis instances per host.

Labels not attached to agent

Description

I recently installed the extension to monitor a Redis instance, the agent reports data correctly to the website however the labels in the yml are not included

Expected Behavior

Data reported to NR with tags.Environment = staging

Your Environment

Redis 3.2.1
Windows Server 2012 R2

Additional context

I've done a search of the source code and the word 'labels' doesn't seem to occur outside of the sample configs

Document ACL minimum permissions

When merging #126 allowing username/password to access redis we need to document the minimum permissions required to create a user for monitoring purposes

This applies to redis v6+

ACL SETUSER newrelic on >'YOUR_SELECTED_PASSWORD' ~* +INFO +CONFIG|GET +SELECT +TYPE +LLEN +SCARD +ZCOUNT +HLEN

keyspaceHitsPerSecond and other "Per Second" metrics report incorrect values and report inconsistently

Description of the problem

When attempting to use keyspaceHitsPerSecond from the RedisSample, we noticed that the reported value is not the rate (per second) but it is the raw count of hits against the instance since the instance was started. (It matches the keyspace_hits key from the INFO command)

Also, for some reason this metric is not always reported yet other metrics in the RedisSample (Fragmentation Ratio for example) are always reported.

Am I missing something about these keys?

The first screen shot is the timeseries of hits we are seeing in NewRelic. The Second screen shot is the application's perspective where we are seeing they are processing about 20-30 "items" per X time. Yet you can see that the first screen shot shows the hits as 0. For an item to be processed by the app, it has to retrieve a key from Redis. The third screen shot shows that while the rate is not being populated, other metrics from the sample are.

Screen Shot 2019-03-13 at 2 41 17 PM

Screen Shot 2019-03-13 at 2 41 26 PM

Screen Shot 2019-03-13 at 2 43 52 PM

OS
  • All of them
  • Amazon Linux, all versions
  • CentOS, version 6 or higher
  • Debian, version 7 ("Wheezy") or higher
  • Red Hat Enterprise Linux (RHEL), version 6 or higher
  • Ubuntu, versions 12.04, 14.04, and 16.04 (LTS versions)
  • Windows Server, 2008 and 2012 and their service packs

Redis "CONFIG" Command Is Renamed Causing NRI's config_inventory to Fail

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 [...]

Hi, we are starting to use NRI Redis in Tokopedia and our Redis are configured with:

rename-command CONFIG "ZmtlbmZ3ZWZl-CONFIG"

We are renaming redis-cli "CONFIG" command to avoid people/clients doing destructive CONFIG change on-the-fly. E.g. enabling AOF on the fly could pressure disk iops, etc.

Does it makes sense to make this CONFIG key configurable?
image

Feature Description

A clear and concise description of the feature you want or need.

Configurable Redis "CONFIG" sub-command used by nri-redis to get Redis configurations when we enable config_inventory: True.

Documentation
image

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

Tokopedia is moving Redis metrics and logging (everything!) to NR.

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]

Umm.. Really Want

We want to avoid maintaining a separate fork of nri-redis.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 0 0 7 0 7

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-starts-with-community-plus-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-forum-topic #

Contains a link to the appropriate forum.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate forum.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Missing parameters

Issue

Some parameters accepted by the integration:

  • UnixSocketPath Unix socket path on which Redis server is listening.
  • KeysLimit Max number of the keys to retrieve their lengths
  • ConfigInventory Provides CONFIG inventory information. Set it to 'false' in environments where the Redis CONFIG command is prohibited (e.g. AWS ElastiCache)

Priority

Please help us better understand this feature request by choosing a priority from the following options:
Really Want

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

readme-starts-with-community-header #

The README of a community project should have a community project header at the start of the README. If you already have a community project header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 5 lines do not contain the pattern(s): Open source Community header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend the latest code snippet found at https://github.com/newrelic/opensource-website/wiki/Open-Source-Category-Snippets#code-snippet-1 to file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-forum-topic #

Contains a link to the appropriate forum.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate forum.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

docker-compose
tests/integration/docker-compose.yml
  • redis 7.4.0-alpine
  • redis 7.4.0-alpine
  • redis 7.4.0-alpine
dockerfile
build/Dockerfile
  • golang 1.22.6-bookworm
tests/integration/Dockerfile
  • golang 1.22.6-bookworm
github-actions
.github/workflows/automated_release.yaml
  • newrelic/coreint-automation v3
.github/workflows/on_prerelease.yaml
  • newrelic/coreint-automation v3
.github/workflows/on_push_pr.yaml
  • newrelic/coreint-automation v3
.github/workflows/on_release.yaml
  • newrelic/coreint-automation v3
.github/workflows/repolinter.yml
  • newrelic/coreint-automation v3
.github/workflows/security.yaml
  • newrelic/coreint-automation v3
gomod
go.mod
  • go 1.22.6
  • github.com/gomodule/redigo v1.9.2
  • github.com/newrelic/infra-integrations-sdk v3.8.2+incompatible
  • github.com/stretchr/testify v1.9.0
  • github.com/xeipuuv/gojsonschema v1.2.0

  • Check this box to trigger a request for Renovate to run again on this repository

Security vulnerabilities with Go compiler version <1.20.6

Description

I am installing the debian packages for infrastructure-agent and nri-redis in a docker image, but our scans are flagging some high severity Go vulnerabilities.

govulncheck indicates the following problems with the latest version of nri-redis.
Scanning the binary in nri-redis_linux_1.10.0_amd64.tar.gz:

bin % govulncheck --mode binary ./nri-redis                                                                    
Using [email protected] with vulnerability data from https://vuln.go.dev (last modified 2023-07-11 19:19:08 +0000 UTC).

Scanning your binary for known vulnerabilities...

Vulnerability #1: GO-2023-1878
    Insufficient sanitization of Host header in net/http
  More info: https://pkg.go.dev/vuln/GO-2023-1878
  Standard library
    Found in: net/[email protected]
    Fixed in: net/[email protected]
    Example traces found:
      #1: http.Client.CloseIdleConnections
      #2: http.Client.Do
      #3: http.Client.Get
      #4: http.Client.Head
      #5: http.Client.Post
      #6: http.Client.PostForm
      #7: http.Get
      #8: http.Head
      #9: http.Post
      #10: http.PostForm
      #11: http.Request.Write
      #12: http.Request.WriteProxy
      #13: http.Transport.CancelRequest
      #14: http.Transport.CloseIdleConnections
      #15: http.Transport.RoundTrip

Vulnerability #2: GO-2023-1840
    Unsafe behavior in setuid/setgid binaries in runtime
  More info: https://pkg.go.dev/vuln/GO-2023-1840
  Standard library
    Found in: [email protected]
    Fixed in: [email protected]
    Example traces found:
      #1: runtime.runtime/*

Your code is affected by 2 vulnerabilities from the Go standard library.

Twistlock scans also indicate three additional potential build-time vulnerabilities related to the Go compiler version:

Additional context

The resolution seems to be to rebuild the binaries with Go 1.20.6 or newer

For Maintainers Only or Hero Triaging this bug

Suggested Priority (P1,P2,P3,P4,P5):
Suggested T-Shirt size (S, M, L, XL, Unknown):

TLS support

Feature Description

We'd like TLS connection support

Describe Alternatives

There are none.

Additional context

This is already supported by the upstream lib (https://github.com/gomodule/redigo) though, note that the code is currently using https://github.com/garyburd/redigo, which is the archived old version of the same lib.

Priority

Blocker (our redis instances require encryption in flight)

Add support for monitoring multiple instances

Description of the problem

Add support for monitoring multiple instances:

Relates to

#9 and #10 by @TylerLubeck

OS
  • All of them
  • Amazon Linux, all versions
  • CentOS, version 6 or higher
  • Debian, version 7 ("Wheezy") or higher
  • Red Hat Enterprise Linux (RHEL), version 6 or higher
  • Ubuntu, versions 12.04, 14.04, and 16.04 (LTS versions)
  • Windows Server, 2008 and 2012 and their service packs

ACL based authorization

Is your feature request related to a problem? Please describe.

ACL based authorization for Redis
Link: https://redis.io/commands/auth

Feature Description

ACL based authorization is introduced with redis 6. This requires username along with password.

Describe Alternatives

No Alternative, as we are using ACL authorization

Additional context

N/A

Priority

Blocker

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 0 0 7 0 7

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-starts-with-community-plus-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

code-of-conduct-should-not-exist-here #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Did not find a file matching the specified patterns. All files passed this test.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

PR pipeline Linux

Using current Kafka/Redis GHA template migrate current Travis-CI pipeline into GHA


  • remove Travis-CI

Many problems when building from the scratch

  1. === redis === [ validate ]: running gofmt... failed. Incorrect syntax in the following files:
    src/inventory_test.go src/metrics_test.go
    make: *** [Makefile:31: validate-only] Error 1

This is the first problem.

  1. when I remove the validate-only task in the makefile, the following error is :

=== redis === [ validate-deps ]: installing validation dependencies...
go: github.com/Sirupsen/[email protected]: parsing go.mod:
module declares its path as: github.com/sirupsen/logrus
but was required as: github.com/Sirupsen/logrus
make: *** [Makefile:24: validate-deps] Error 1

I think you should update helplers.go module import to the latest version sirupsen, while not Sirupsen.

  1. When I update like above, I also happen to many vendor dependency update warnings. At this time, I remove the directory vendor and make it passed. So, My question is could we remove the vendor dependency and use go mod style? I could use this way to build when I remove validate-only in the makefile and remove vendor directory.

p.s. If the demo could not build smoothly from the scratch, I could not figure out how do we ensure and convince our customers to use it?

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 1 0 6 0 7

Fail #

code-of-conduct-file-does-not-exist #

New Relic has moved the CODE_OF_CONDUCT file to a centralized location where it is referenced automatically by every repository in the New Relic organization. Because of this change, any other CODE_OF_CONDUCT file in a repository is now redundant and should be removed. Note that you will need to adjust any links to the local CODE_OF_CONDUCT file in your documentation to point to the central file (README and CONTRIBUTING will probably have links that need updating). For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view. Found files. Below is a list of files or patterns that failed:

  • CODE_OF_CONDUCT.md
    • 🔨 Suggested Fix: Remove file

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-starts-with-community-plus-header #

The first 5 lines contain all of the requested patterns. (README.md). The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date, and you should update your header with the suggested one below. For more information please visit https://opensource.newrelic.com/oss-category/.

readme-contains-link-to-security-policy #

Contains a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy or ../../security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file can be present in your repository to grant attribution to all dependencies being used by this project. This document is necessary if you are using third-party source code in your project, with the exception of code referenced outside the project's compiled/bundled binary (ex. some Java projects require modules to be pre-installed in the classpath, outside the project binary and therefore outside the scope of the THIRD_PARTY_NOTICES). Please review your project's dependencies and create a THIRD_PARTY_NOTICES.md file if necessary. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

[Repolinter] Open Source Policy Issues

Repolinter Report

🤖This issue was automatically generated by repolinter-action, developed by the Open Source and Developer Advocacy team at New Relic. This issue will be automatically updated or closed when changes are pushed. If you have any problems with this tool, please feel free to open a GitHub issue or give us a ping in #help-opensource.

This Repolinter run generated the following results:

❗ Error ❌ Fail ⚠️ Warn ✅ Pass Ignored Total
0 2 0 4 0 6

Fail #

readme-starts-with-community-plus-header #

The README of a community plus project should have a community plus header at the start of the README. If you already have a community plus header and this rule is failing, your header may be out of date. For more information please visit https://opensource.newrelic.com/oss-category/. Below is a list of files or patterns that failed:

  • README.md: The first 1 lines do not contain the pattern(s): Open source Community Plus header (see https://opensource.newrelic.com/oss-category).
    • 🔨 Suggested Fix: prepend [![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus) to file

readme-contains-link-to-security-policy #

Doesn't contain a link to the security policy for this repository (README.md). New Relic recommends putting a link to the open source security policy for your project (https://github.com/newrelic/<repo-name>/security/policy) in the README. For an example of this, please see the "a note about vulnerabilities" section of the Open By Default repository. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

Passed #

Click to see rules

license-file-exists #

Found file (LICENSE). New Relic requires that all open source projects have an associated license contained within the project. This license must be permissive (e.g. non-viral or copyleft), and we recommend Apache 2.0 for most use cases. For more information please visit https://docs.google.com/document/d/1vML4aY_czsY0URu2yiP3xLAKYufNrKsc7o4kjuegpDw/edit.

readme-file-exists #

Found file (README.md). New Relic requires a README file in all projects. This README should give a general overview of the project, and should point to additional resources (security, contributing, etc.) where developers and users can learn further. For more information please visit https://github.com/newrelic/open-by-default.

readme-contains-discuss-topic #

Contains a link to the appropriate discuss.newrelic.com topic (README.md). New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support. For more information please visit https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code.

third-party-notices-file-exists #

Found file (THIRD_PARTY_NOTICES.md). A THIRD_PARTY_NOTICES.md file must be present in your repository to grant attribution to all dependencies being used by this project. For JavaScript projects, you can generate this file using the oss-cli. For more information please visit https://docs.google.com/document/d/1y644Pwi82kasNP5VPVjDV8rsmkBKclQVHFkz8pwRUtE/view.

Fix hostname argument handling to support IPv6 address family

Description

When an IPv6 address is input to the NRI, it does not format as expected by the connector handler (redis.Dial). Instead, it needs to be formatted as defined in RFC 2732.

time="2021-07-23T19:53:24Z" level=warning msg="integration exited with error state" component=integrations.runner.Runner env=production error="exit status 2" integration_name=nri-redis stderr="[FATAL] can't continue: Redis connection through TCP failed, got error: dial tcp: address fd30:0:0:30::230:6379: too many colons in address\npanic: Redis connection through TCP failed, got error: dial tcp: address fd30:0:0:30::230:6379: too many colons in address\n\ngoroutine 1 [running]:\ngithub.com/newrelic/nri-redis/vendor/github.com/newrelic/infra-integrations-sdk/log.Fatal(0x741b00, 0xc42007c820)\n\t/go/src/github.com/newrelic/nri-redis/vendor/github.com/newrelic/infra-integrations-sdk/log/log.go:107 +0xd5\nmain.main()\n\t/go/src/github.com/newrelic/nri-redis/src/redis.go:63 +0x84d"

Expected Behavior

Connect to a remote entity (host) using IPv6 to retrieve metrics.

Steps to Reproduce

Execute command to a Redis over IPv6 as shown below.

$ nri-redis -hostname ::1

`masterauth` password included in inventory

masterauth password included in inventory

Currently only requirepass is stripped from the inventory, but masterauth remains. This should be stripped as well. Expect a PR shortly.

OS
  • All of them
  • Amazon Linux, all versions
  • CentOS, version 6 or higher
  • Debian, version 7 ("Wheezy") or higher
  • Red Hat Enterprise Linux (RHEL), version 6 or higher
  • Ubuntu, versions 12.04, 14.04, and 16.04 (LTS versions)
  • Windows Server, 2008 and 2012 and their service packs

Release pipeline Linux

Using current Kafka/Redis GHA template migrate current build pipeline into GHA


  • update private release pipeline to use artifacts from GH releases

Redis commandstats metrics

Is your feature request related to a problem? Please describe.

Maintaining and debugging Redis (and Redis Cluster) on production environment will be pleasant if we can see statistics of how much each Redis commands called. The Redis Server has an internal command statistics. We can get it by using INFO commandstats command.

Example:

127.0.0.1:6379> INFO commandstats
# Commandstats
cmdstat_config:calls=1,usec=23,usec_per_call=23.00,rejected_calls=0,failed_calls=0
cmdstat_client:calls=177,usec=431,usec_per_call=2.44,rejected_calls=2,failed_calls=0
cmdstat_cluster:calls=184,usec=8919,usec_per_call=48.47,rejected_calls=0,failed_calls=0
cmdstat_latency:calls=177,usec=461,usec_per_call=2.60,rejected_calls=0,failed_calls=0
cmdstat_auth:calls=407,usec=6638,usec_per_call=16.31,rejected_calls=0,failed_calls=224
cmdstat_ping:calls=3,usec=2,usec_per_call=0.67,rejected_calls=0,failed_calls=0
cmdstat_command:calls=2,usec=1867,usec_per_call=933.50,rejected_calls=1,failed_calls=0
cmdstat_info:calls=183,usec=20578,usec_per_call=112.45,rejected_calls=6,failed_calls=0
cmdstat_slowlog:calls=354,usec=979,usec_per_call=2.77,rejected_calls=0,failed_calls=0
cmdstat_readonly:calls=3,usec=1,usec_per_call=0.33,rejected_calls=0,failed_calls=0

Feature Description

The nri-redis will be much better if it is able to capture the commandstats metrics. So my company will be able to display the detailed command-calls on New Relic dashboard.

Describe Alternatives

FYI, the redis_exporter for Prometheus already exported the metrics, reference:
https://github.com/oliver006/redis_exporter/blob/3e7d7546638b66e1ecba7ddf8c35ca99934c7a6e/exporter/info.go#L88

Additional context

Redis Cluster production. By checking and comparing the commandstats on each redis-node, our administrator can check any is any redis-cluster balanced or not.

Priority

Nice to Have.

Simple GH Action: upload tar, zip, msi into S3 bucket

Goal: be able to upload .tar.gz, .zip, .msi into test download.newrelic.com repo

Steps:

  • Create docker GHA inside of nri-redis repo documentation
  • Mount s3 inside docker container
  • Grab msi, zip, tag.gz from GH
  • Upload artifacts to right locations based on platform and OS
  • Add locking mechanism via s3 consistent read/write s3 feature
  • Request dedicated repo for github action in newrelic org (to be able to publish action and use in other projects)

Notes / ideas:

  • Create base image that contains all scripts and have different tags to run specific upload step (via entrypoint). ex: gha-upload:msi? for uploading msi only. If called with :latest run all upload steps. It will give us some flexibility. gha-upload is just example of name, name of action can be different
  • Make GHA in a way that it know what is our integration artifacts naming format and be able to overwrite it with a parameter if needed.
  • Pass integration name as a parameter.
  • Pass tag as a parameter.
  • List of file masks to upload
  • Grab release assets from corresponding to TAG release page.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.