GithubHelp home page GithubHelp logo

newrelic / nri-flex Goto Github PK

View Code? Open in Web Editor NEW
104.0 36.0 119.0 9.03 MB

An application-agnostic, all-in-one New Relic integration integration

Home Page: https://docs.newrelic.com/docs/introduction-new-relics-flex-integration

License: Apache License 2.0

Dockerfile 0.45% Makefile 2.72% Go 95.26% Shell 1.38% Batchfile 0.19%
flex integration infrastructure insights ingest api jmx nrlabs

nri-flex's Introduction

New Relic Open Source community plus project banner.

Build Status Coverage Status

New Relic Flex

Flex is an application-agnostic, all-in-one New Relic integration with which you can instrument any app that exposes metrics over a standard protocol (HTTP, file, shell) in a standard format (for example, JSON or plain text): you create a config file, start the Infrastructure agent, and data starts pouring into New Relic.

Flex can take any input using data source APIs, process it through functions, and send metric samples to New Relic as if they came from an integration.

For a quick introduction on Flex, read our blog post. You can also have a look at the 200+ example integrations!

What you need

Flex requires a New Relic account and is compatible with the following operating systems/platforms:

  • Linux
  • Windows
  • Kubernetes

For more information on compatible distros and versions, see the Infrastructure agent compatibility page.

Installation

Flex comes bundled with the New Relic infrastructure agent. To install the infrastructure agent, see Install the infrastructure agent.

If you're using Kubernetes, see Configure Flex in Kubernetes.

Getting started

The Flex step-by-step tutorial is a great starting point.

Example integrations

All examples are located in /examples.

Note that some examples may use features that are experimental (not officially supported) or deprecated.

Documentation

Development

While developing your own Flex integrations, you can use Flex without the New Relic Infrastructure agent for debugging. For more information, see Development.

Support

Should you need assistance with New Relic products, you are in good hands with several support diagnostic tools and support channels.

If the issue has been confirmed as a bug or is a feature request, 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 HackerOne.

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-flex is licensed under the Apache 2.0 License.

nri-flex's People

Stargazers

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

nri-flex's Issues

NRI-FLEX Version missing nri-flex.exe for windows

Hello,
The new version of NRI-FLEX is missing some files like the exe and nri-flex-definition.yml files.
I follow the instructions and try to download the release from here.
Can you please point me out to a stable build.

The version i try to use is
[https://github.com/newrelic/nri-flex/releases/tag/v0.9.7]

"database: ping error" but no error code

I'm working with a customer on retrieving data from a PostgreSQL server. We're currently getting the following logs:

INFO[0000] com.newrelic.nri-flex                         GOARCH=amd64 GOOS=linux version=1.3.2
DEBU[0000] config: git sync configuration not set
WARN[0000] config: testing agent config, agent features will not be available
DEBU[0000] config: running async                         name=VPNTTG
DEBU[0000] config: processing apis                       apis=1 name=VPNTTG
DEBU[0000] fetch: collect data                           name=VPNTTG
DEBU[0000] database: process queries                     database=postgres name=VPNTTG
DEBU[0000] database: db.Ping finished
DEBU[0000] database: ping error                          database=postgres err="<nil>" name=VPNTTG
DEBU[0000] processor-data: running data handler          name=VPNTTG
DEBU[0000] config: finished variable processing apis     apis=1 name=VPNTTG
INFO[0000] flex: completed processing configs            configs=1

Notice the DEBU[0000] database: ping error database=postgres err="<nil>" name=VPNTTG message.

This triggered me to jump into the code to see what's happening and I noticed the following line.

This line is in a if pingError != nil { section, so I was wondering if we should replace 'err' with 'pingError' or add 'pingError' to the logging message.

The goal is to improve the debug output as I currently have no idea why the flex config is failing, though it is probably a database connection error.

Intermittant errors when running on windows host

I have powershell scripts successfully reporting data into New Relic using the Flex plugin on some windows hosts, but I am receiving occational errors

error = exit status 1
error exec = & "C:/Program Files/New Relic/newrelic-infra/integrations.d/tm1-validation.ps1"

Running the script on the host returns no errors, and all the data I'm expecting is showing up in New Relic. Is there a way I get debug these errors?

store_lookups: not parsing all values in subsequent call

I'm attempting to use the new "create lookups from plain arrays" feature in v0.8.6. Below is the sample payload returned from the Burrow API that contains a consumers array.

{
  "error": false,
  "message": "consumer list returned",
  "consumers": [
    "burrow-kafka-test",
    "test-group-1",
    "test-group-2"
  ],
  "request": {
    "url": "/v3/kafka/kafka-test/consumer",
    "host": "ubuntu-kafka"
  }
}

What I believe is happening though is that Flex is selecting the first item in the array and that's it. In my query output, you can see there is only 1 event per group, per interval. I would expect to see 3 events every minute.

image

Perhaps something isn't quite right in my config? See below:

integrations:
  - name: nri-flex
    interval: 60s
    config:
      name: Burrow
      global:
        base_url: http://kafka1.abc.com:8000/v3/
      apis:
        - event_type: kafkaClusterNameSample
          url: kafka
          store_lookups:
            clusters: clusters
        - event_type: kafkaConsumerNameSample
          url: kafka/${lookup:clusters}/consumer
          store_lookups:
            consumers: consumers
        - event_type: kafkaConsumerGroupLagSample
          url: kafka/${lookup:clusters}/consumer/${lookup:consumers}/lag
          strip_keys:
            - status>partitions
          rename_keys:
            status.cluster: cluster
            status.group: group
            status.status: status
        - event_type: kafkaPartitionSample
          url: kafka/${lookup:clusters}/consumer/${lookup:consumers}/lag
          inherit_attributes: true
          start_key:
            - status
            - partitions
          rename_keys:
            parent.1.cluster: cluster

Send an event to Insights when http request fails

Right now, an HTTP request failure is only visible in the form of debug statements that can only be seen when Flex is run on verbose mode.

https://github.com/newrelic/nri-flex/blob/master/internal/inputs/http.go#L151
This appears to be where http error handling logic resides. I'm wondering if this is a good place to add additional logic to push http errors to Insights for users who may want to alert off of failed http requests. This is a common use case for users who use Flex for http health checks.

ping example

Hi,

I tried to simulate a host unreachable/not resolvable to see the output for the ping example. But when I'm doing that I'm getting this error:

When doing a ping to a ip that's not reachable:
DEBU[0000] commands: executing count=1 name=pingFlex DEBU[0014] command: failed err="signal: killed" exec="ping -c 5 7.7.7.7" suggestion="if you are handling this error case, ignore" DEBU[0014] command: timed out err="context deadline exceeded" exec="ping -c 5 7.7.7.7"

When doing a ping to a DNS name that's not reachable:
DEBU[0000] command: failed err="exit status 2" exec="ping -c 5 host.dummy.com" suggestion="if you are handling this error case, ignore"

How can I catch these exceptions in the config? When doing the ping command from cli I'm getting the output that should be parsed.

Thanks.

Create include_filter and exclude_filter functions

The sample_filter function skips creating the sample (i.e. exclude_filter). This is great for static data sets or when you only need to filter out a few things. If I am only interested in one key and one value, an option to have an include_filter would be ideal. This would be a better option if the data sets are dynamic (i.e. new values are added all the time) or there are many values (i.e. 1000 unique values).

reuse of nagios scripts and catch exit code

Hi,

I want to reuse some old nagios scripts in nri-flex without the need of the nri-nagios ohi. The script is returning an output message and an exit code.

DEBU[0000] command: failed err="exit status 3" exec="/usr/lib64/cmbmonit/plugins/check_load -w 5,3,2 -c 0,6,4" suggestion="if you are handling this error case, ignore"
DEBU[0000] command: running /usr/lib64/cmbmonit/plugins/check_load -w 5,3,2 -c 0,6,4

I want to catch the whole output of the command but I can't make it work. I'm not sure if it's related to the exit code the script is throwing or wrong syntax.

Can someone points me to the wright direction?

Thanks!

sample_include_match_all_filter breaks sample_include_filter when ${lookup.LinkSample:name} is used

Regardless whether sample_include_match_all_filter is present or not, the following line will become true in when ${lookup.xxxxxx} is being used in yml. Because the API block is replicated when using ${lookup.xxxxxx} and api.SampleIncludeMatchAllFilter becomes not null.

if api.SampleIncludeMatchAllFilter != nil || len(api.SampleIncludeMatchAllFilter) != 0 {

Upgrade go-mssqldb package

The MS SQL pinned package is rather old and does not include recent improvements for NTLMv2 support for instance. Please upgrade to latest.

execution order defined scripts

Hi,

I have a question about the execution order of scripts nri-flex is using.

Today we are using the nagios OHI to execute some scripts/checks but I noticed the nagios OHI is executing defined scripts/checks serial. For example if we have a script defined for 10 assets. The script will run asset per asset. If a script is timing out on for example asset 5. Asset 6 - 10 the script will not be executed waiting on the timeout on asset 5. This means in some cases we don't have samples/metrics in some time windows ... what's not good.

I was wondering how the nri-flex is executing scripts/commands that should run on multiple hosts. Also serial? Or will the nri-flex starts the script/command in parallel over all defined hosts?

Thanks.

Verbose flag has stopped showing topical data

in previous releases of nri-flex, we could easily troubleshoot issues with individual config files by using a snippet like this:

.\nri-flex.exe --verbose --pretty --config_file "path\to\config.yml"

This would output the JSON payload that was generated by the config and sent to NRDB, which made it very easy to see issues with formatting. Additionally, the actual execution of the command was listed in this output as well; which could show syntax issues being sent in things like the run: function.

Request that this functionality be restored to alleviate frustration, increase UX, and reduce development time for users.

ref:
image

Add information on how to test flex integrations locally to the troubleshooting documentation.

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

Nope

Feature Description

https://github.com/newrelic/nri-flex/blob/master/docs/troubleshooting.md

I was having issues with a flex integration and after going through the getting started and troubleshooting docs I was not aware that it was possible to test flex integrations locally. Having information about how to test locally to the troubleshooting section would have been incredibly helpful.

Priority

Nice to have

Port data collection interval issues using flex

Hello,
I am using flex on windows OS to collect port data. However, the collection interval is experiencing an increasing issue.

  • Provider: AzureVirtualMachine
  • Windows OS: Windows Server 2016 Datacenter
  • NewRelic Infra Agent: 1.8.14
  • nri-flex: nri-flex-windows-0.8.5

Using Flex to collect port data.

Although the interval in the nri-flex-definition.yml configuration file is set to 30 seconds.
However, when queried from INSIGHTS, the data collection interval continues to increase from 40 seconds to 1 minute to 2 minutes.

  1. VM-port.yml
    01, port-yml

  2. nri-flex-definition.yml
    02, nri-flex-definition yml

  3. The system, network, and storage utilization rate of the server is not high.
    03, System Usage

04, Network Usage

05, Storage Usage

  1. The 8080,8090,8585,14233 set in the VM-port.yml file have the same issue, and the 14233 port is used as an example to show the data collection interval.
    When the port data was first collected, it was collected about 40 seconds interval.
    06, insight - 1

  2. Over time, data is collected about 1 minutes interval.
    06, insight - 2

  3. Currently, data is collected about 2 minutes interval.

Although the interval is set to 30 in the nri-flex-definition.yml configuration file
Why does the increase port data collection interval continue?

07, insight - 3

Thank you

add_attribute/dedupe_lookups not working

hey, i tried almost all features under the Data parsing and transformation functions. I was unable to make either add_attribute or dedupe_lookups to work. I ended up using custom_attributes instead of add_attribute, so not too worry about that one. But dedupe_lookup will come in very handy, this is how I was trying to use it:

  • event_type: JenkinJobsLookup
    url: /api/json?tree=jobs[name]
    store_lookups:
    name: name
  • event_type: Jenkins
    url: /job/${lookup:name}/wfapi/runs
    dedupe_lookups:
    • name

Additional Supporting Details

Hi there, I posted privately to the FLEX original creator and he suggested me to post here for further improvements.

  1. It's probably a good idea to expand more on examples especially regular expression.
    For example, here is the cmd, here is the output, and how this regex will perform to put the data into NR?

  2. Please put a prerequisite knowledge required to get FLEX working. This is targeted predominantly for traditional ops persona who might not having strong DevOps skillset.

  3. How do you check if the integration is done correctly? how does failure looks like?

  4. Offer basic troubleshooting tips to check if FLEX is working correctly.

  5. The more examples we have, the better it is the adoption will be and more people can use it to develop their own integration.

Functions to trim keys and values

It would be helpful to have functions to trim leading/trailing white space from keys and values.
From an order of operations perspective, this should probably be done very early on and certainly prior to the existing convert_space function, which would still be useful for handling spaces within keys.

Local build fails because version is not being handled

When building a binary locally Flex throws:

time="2020-02-21T16:24:18-08:00" level=fatal msg="flex: failed to initialize integration" error="flex: failed to create integration integration version cannot be empty"

In the past this was never the case, it would attach the git sha, and hyphenate with dirty if required.
The version handling needs to be reverted to the prior way it was handled so local dev/testing is not blocked.

HTTP request handling broken during refactor

Internal discussion: https://newrelic.slack.com/archives/CPVCA6Y86/p1596379457402500?thread_ts=1596373059.401200&cid=CPVCA6Y86

Automatic pagination walk is no longer working as expected which breaks how normal http functionality should work as there are missing payloads from the initial request.
eg. looks like it ignores the initial results, and are not appended and you just get the last set.

I reverted to my prior http code which was before GA, and everything worked as expected. Haven't figured out which changes caused this issue.

Add go snowflake driver to flex binary - enabling the database API to be used with snowflake.

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

Currently flex can execute queries directly with MySql, Postgres etc. I'd like the same functionality available for Snowflake, which is a very popular data warehousing solution that many customers are adopting

Feature Description

The ability to use the database API to query Snowflake. To achieve this, the go snowflake driver would need to be included in flex.

Describe Alternatives

I've already got a flex integration that uses an external Node.js script that uses the node snowflake driver, but this setup is more complex than it should be.

Additional context

None

Priority

Really want.

error in clock-drift-ntp integration

Error:

time="2020-08-06T06:45:22-05:00" level=warning msg="can't instantiate integrations from file" component=integrations.Manager error="can't instantiate integration: can't find an executable given the name: nri-flex" file="C:\Program Files\New Relic\newrelic-infra\integrations.d\clock-drift-ntp.yml"

clock-drift-ntp.yml content:



integrations:

  • name: nri-flex
    config:
    name: clockDriftNTP
    apis:
    - name: clockDriftNTP
    shell: powershell
    commands:
    - run: "w32tm /stripchart /computer:pool.ntp.org /samples:1 /dataonly"

Any help is greatly appreciated

Thanks
Sibu Skariah

powershell :returns 'nil'

I'm running into an issue where $_CreationTime, $._FullName, or any other obj I try to use return 'nil'

$filePattern = "*.db"
$createtime = $filePattern.CreationTime

$directory | Get-ChildItem -Recurse | Where-Object { $.PsIsContainer -eq $false -and $.Name -like $filePattern} | Measure-Object | Select-Object -Property @{ expression = { $directory }; name = "directoryName" },@{ expression = { $.FullName}; name = "fileName" },@{ expression = { $filePattern }; name = "filePattern" },@{ expression = { $.Count }; name = "fileCount" },@{ expression = { $createtime}; name = "createtime" } | ConvertTo-Json

Here is new relic agent output:
level=warning msg="cannot handle plugin output" data prefix=integration/com.newrelic.nri-flex error="json: cannot unmarshal array into Go value of type externalPlugins.PluginOutputIdentifier" plugin name=nri-flex

Thanks in advance

Simplify custom_attributes & add_attribute

Suggestion to simplify these 2 capabilities. Per internal discussion: https://newrelic.slack.com/archives/CPVCA6Y86/p1593643334253500

They share similar purpose, but add_attribute has more functionality, but doesn't appear to allow manually defined custom_attributes.

Our other agents use custom_attributes terminology, so not sure if we stick with that name, or the fact that add_attribute does more than what custom_attributes does elsewhere and we use that instead.

Thoughts, Ideas?

cc/ @bpschmitt @haihongren @ardias @thezackm

Two column issue of facet in nri-flex

Hello,
I configured Flex to collect disk usage for multiple accounts in one account.

OS: Amazon Linux 1
NewRelic Infra Agent: newrelic-infra-1.11.37-1.el6.x86_64
nri-flex: GOARCH=amd64 GOOS=linux version=1.3.0

The yml configuration file in the /var/db/newrelic-infra/custom-integrations/ flexConfigs folder.

name: bespin_all_accounts
variable_store:
  graphql_API_URL: https://api.newrelic.com/graphql
lookup_file: /var/db/newrelic-infra/custom-integrations/flexConfigs/bespin_accounts_lookup.json ### location of lookup file
apis:
  - name: storagesampleview
    event_type: customglobalstorage
    url: ${var:graphql_API_URL}
    method: POST
    payload: >
      {"query":
      "{  actor {    account(id: ${lf:account_id})
      {nrql
      (query: \"from StorageSample select latest(operatingSystem) as operatingSystem,latest(displayName) as displayName ,latest(agentVersion) as agentVersion,latest(coreCount) as coreCount, latest(diskUsedPercent) as diskUsedPercent , latest(diskTotalBytes) as diskTotalBytes , latest(diskUsedBytes) as diskUsedBytes facet displayName, mountPoint limit max   \")
      {results} id  name }  }}", "variables":""}

    headers:
      API-Key: ${lf:personal_API_key}
      Content-Type: application/json
    value_parser:
      displayName: "nil"
    remove_keys:
      - facet
      - api.StatusCode
    rename_keys:
      data.actor.account.id: accountID
      data.actor.account.name: accountName

facet displayName, mountPoint

An issue occurs when two facet columns are entered in the query of the payload in the yml file.

image

If the facet is entered as a single column, the issue like the image above does not occur.
Regarding, is it possible to set facet displayName, mountPoint of query to be properly displayed in INSIGHTS?

For reference, executing the nri-flex command in the terminal returns the execution result as follows.
displayNamemountPointSamples": "[map[:DEV-DSDEVDB1] map[:F:]]

[root@GLOBALVIEW bin]# ./nri-flex --config_file /var/db/newrelic-infra/custom-integrations/flexConfigs/bespin_collect_hosts.yml -pretty

INFO[0000] com.newrelic.nri-flex                         GOARCH=amd64 GOOS=linux version=1.3.0
INFO[0002] flex: completed processing configs            configs=3
{
        "name": "com.newrelic.nri-flex",
        "protocol_version": "3",
        "integration_version": "1.3.0",
        "data": [
                {
                        "metrics": [
                                                                {
                                        "accountID": 000,
                                        "accountName": "TEST",
                                        "agentVersion": "1.10.30",
                                        "coreCount": 2,
                                        "diskTotalBytes": 64298676224,
                                        "diskUsedBytes": 62125727744,
                                        "diskUsedPercent": 96.620537,
                                        "displayName": "DEV-DSDEVDB1",
                                        "displayNamemountPointSamples": "[map[:DEV-DSDEVDB1] map[:F:]]",
                                        "event_type": "customglobalstorage",
                                        "integration_name": "com.newrelic.nri-flex",
                                        "integration_version": "1.3.0",
                                        "operatingSystem": "windows"
                                },

Thank you

Nri flex not sending the data

I am running flux in docker container and rabbitmq external check is running in the container I am getting yaml error and system matrix is not going

/ # /usr/bin/newrelic-infra -config s
INFO[0000] runtime configuration agentUser=root component=“New Relic Infrastructure Agent” executablePath= maxProcs=1 pluginDir="[/etc/newrelic-infra/integrations.d /var/db/newrelic-infra/integrations.d]"
INFO[0000] Checking network connectivity… component=AgentService service=newrelic-infra
INFO[0000] Initializing component=AgentService elapsedTime=375.676437ms service=newrelic-infra
WARN[0000] can’t load integrations file component=integrations.Manager error=“yaml: unmarshal errors:\n line 4: cannot unmarshal !!seq into string” file=nri-flex-config.yml folder=/etc/newrelic-infra/integrations.d
INFO[0000] New Relic Infrastructure Agent Running component=AgentService elapsedTime=551.206809ms service=newrelic-infra
INFO[0000] Starting up agent… component=Agent
WARN[0000] failed to start monitoring for shutdown component=NotificationHandler error=“no systemd found”
INFO[0000] Agent plugin plugin=metadata/attributes

nri-flex-config-linux.yml

integration_name: com.newrelic.nri-flex

instances:
– name: nri-flex
command: metrics

LOGS INSIDE THE CONTAINER

/var/db/newrelic-infra/custom-integrations # ./nri-flex -config_file flexConfigs/rabbitmq-http.yml -verbose -pretty
INFO[0000] com.newrelic.nri-flex GOARCH=amd64 GOOS=linux version=0.8.5
DEBU[0000] config: git sync configuration not set
DEBU[0000] discovery: finding flex container id output=/docker/6712f62228db8e89XX
cread=/proc/1/cpuset
DEBU[0000] discovery: flex container id found containerId=6712f62228db8e89XXX
DEBU[0000] docker: setting client with API version negotiation
DEBU[0000] discovery: containers 4 filtered containers 3
DEBU[0000] discovery: no configs found dir=flexContainerDiscovery/ message="if you are using v2 discovery then ignore"
INFO[0000] flex: config files loaded 1
DEBU[0000] config: running async name=rabbitFlex
DEBU[0000] config: processing apis apis=0 name=rabbitFlex
DEBU[0000] config: finished processing apis apis=0 name=rabbitFlex
INFO[0000] flex: completed processing configs=1
{
"name": "com.newrelic.nri-flex",
"protocol_version": "3",
"integration_version": "0.8.5",
"data": [
{
"metrics": [
{
"event_type": "flexStatusSample",
"flex.ContainerId": "6712f62228db8e89XXX",
"flex.Hostname": "ip-10-19-XX",
"flex.IntegrationVersion": "0.8.5",
"flex.counter.ConfigsProcessed": 1,
"flex.counter.EventCount": 0,
"flex.counter.EventDropCount": 0,
"flex.time.elaspedMs": 6,
"flex.time.endMs": 1576166271517,
"flex.time.startMs": 1576166271511
}
],
"inventory": {},
"events": []
}
]
}

Config File Not Found - Unhandled Exception?

When you run nri-flex and it can't find its default config directories, it throws a panic. I'm not sure if that's by-design or not, but it'd be nice if that exception were handled with an error message instead of a panic.

To reproduce, put nri-flex somewhere where flexConfigs/ doesn't exist and run it. You'll see this:

C02X7DGMJG5J:nri-flex_darwin-v0.4.2-pre aisaacson$ ./nri-flex -verbose
12:28:48.951114 [DEBUG] store file (/var/folders/lm/_tdvxpz57x52g08yzfvw2nj00000gn/T/nr-integrations/com.kav91.nri-flex.json) is older than 1m0s, skipping loading from disk.
[DEBUG] com.kav91.nri-flex: v0.4.2-pre
[DEBUG] open /proc/1/cpuset: no such file or directory - potentially not running within a container
[DEBUG] failed to read config dir: flexConfigs/
[FATAL] can't continue: open flexConfigs/: no such file or directory
panic: open flexConfigs/: no such file or directory

goroutine 1 [running]:
nri-flex/vendor/github.com/newrelic/infra-integrations-sdk/log.Fatal(0x1709f60, 0xc0004f8ff0)
	/go/src/nri-flex/vendor/github.com/newrelic/infra-integrations-sdk/log/log.go:107 +0xcb
nri-flex/internal/logger.Flex(0x1664262, 0x5, 0x1709f60, 0xc0004f8ff0, 0xc000430a80, 0x27, 0x0)
	/go/src/nri-flex/internal/logger/logger.go:50 +0x3b7
main.runIntegration()
	/go/src/nri-flex/cmd/flex/nri-flex.go:77 +0x7e2
main.main()
	/go/src/nri-flex/cmd/flex/nri-flex.go:28 +0xdc

Add search and replace functionality

I was in need of transforming a string (value) by doing a replacement of one of the characters. The value_transformer function only allows you to append to an existing value and not do a replace. Notes from Kav on this: "I feel that we should rework value transformer or maybe this could just be a new function, to target regex groups, then you supply an array of values that will be used to substitute each group."

Flex panics if insights api url is not resolved (DNS)

time="2020-03-23T14:39:16+11:00" level=info msg="flex: completed processing configs" configs=89
time="2020-03-23T14:39:16+11:00" level=debug msg="posting 90 events to insights"
time="2020-03-23T14:39:16+11:00" level=debug msg="http: insights - bytes 12871 events 0"
time="2020-03-23T14:39:16+11:00" level=error msg="http: failed to send" error="Post https://insights-collector.newrelic.com/v1/accounts/2625115/events: dial tcp: lookup insights-collector.newrelic.com on 192.168.84.41:53: no such host"
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x40 pc=0xd01163]
goroutine 1 [running]:
github.com/newrelic/nri-flex/internal/outputs.postRequest(0xc00003800d, 0x42, 0xc000036011, 0x25, 0xc000a88000, 0x1b1a5, 0x1c000, 0x0, 0x0)
    /home/travis/gopath/src/github.com/newrelic/nri-flex/internal/outputs/http.go:48 +0x7e3
github.com/newrelic/nri-flex/internal/outputs.SendBatchToInsights(0xc00018ac00, 0x5a, 0x80, 0x0, 0x0)
    /home/travis/gopath/src/github.com/newrelic/nri-flex/internal/outputs/insights.go:55 +0x20c
github.com/newrelic/nri-flex/internal/integration.RunFlex(0x0, 0xc0003c4e10, 0xf7c453)
    /home/travis/gopath/src/github.com/newrelic/nri-flex/internal/integration/integration.go:122 +0x3c6
main.main()
    /home/travis/gopath/src/github.com/newrelic/nri-flex/cmd/nri-flex/nri-flex.go:32 +0x2c4```

Problem with YAML validation on manual nri-flex executions

Description

When passing YAML configurations to Flex, manual executions of the Flex binary fail during testing if the name element of the Integrations SDK portion of the config is not preceded with a hyphen. Automatic execution of Flex via the infrastructure agent still sends data to NRDB as expected.

This experience restricts the user's ability to manually test Flex config files that are generated via automation, namely Ansible scripts in this scenario.

Expected Behavior

Manual execution of the Flex binary during testing should replicate the same execution used by the infrastructure agent.

ref:

./nri-flex --verbose --pretty --config_path /etc/newrelic-infra/integrations.d/sampleConfig.yml

Troubleshooting or NR Diag results

manual execution currently results in the following error printed in terminal:

"config: flexConfig requires name"

Steps to Reproduce

Sample Config:

# Ansible managed
integrations:
- config:
    apis:
    - commands:
      - custom_attributes:
          host: "localhost"
          port: 80
        run: timeout 5 bash -c 'nc -zv localhost 80 > /tmp/.nri_flex_tcp_localhost_80 2>&1 && echo -e "status::open\nmessage::$(cat /tmp/.nri_flex_tcp_localhost_80)" || echo -e "status::open\nmessage::$(cat /tmp/.nri_flex_tcp_localhost_80)"' || echo -e 'status::closed\nmessage::Connection timed out'
        split_by: '::'
      name: TCPPortCheck
    name: TCPPortCheck
  name: nri-flex

Additional context

reference code: HERE identified by @Kav91 during troubleshooting.

if strings.Contains(ymlStr, "- name: nri-flex") { should be updated to remove the requirement of a hyphen.

Request yml confirmation of flex bundled with agent

Hello, I'm dokyun

As flex is bundled with the newrelic agent, the yml configuration file syntax has changed and is being modified.

But I failed to modify the syntax of the portTestWithLookup.yml configuration file.
Where can I change to fix this?

# rpm -qa | grep newrelic
newrelic-infra-1.10.26-1.el7.x86_64

# vi /etc/newrelic-infra/integrations.d/testLookup.json

[
    {
        "name":"google.com",
        "addr":"google.com:80"
    },
    {
        "name":"yahoo",
        "addr":"yahoo.com:80"
    }
]

# vi /etc/newrelic-infra/integrations.d/portTestWithLookup.yml

integrations:
  - name: nri-flex
    config:
     name: portTestWithLookup
     lookup_file: testLookup.json ### location of lookup file
     apis:
      - event_type: portTest
        timeout: 1000 ### default 1000 ms increase if you'd like
        commands:
         - dial: ${lf:addr}
      custom_attributes: ### add some additional attributes if you'd like
       name: ${lf:name}

Please help me, Thank you

BLOCKING: Failure calling 'java -jar ./nrjmx/nrjmx.jar' when using Cassandra JMX config

Summary

The nrjmx.jar file is not installed during a default package manager install. According to the NRJMX documentation, the nrjmx.jar file is not created until maven is run. It is not desirable to have a custom build if it is not necessary.

Request

Make the location of the nrjmx path configurable.

Issue

When using a default configuration of a flex jmx sample, flex calls to the nrjmx.jar file and receives an error as the file is not in the specified location. The call should be directly to the nrjmx binary which is installed by the package manager in /usr/bin/nrjmx by default.

Call Fails

java -jar ./nrjmx/nrjmx.jar -hostname rancher-test -port 7199

Call Suceeds

/usr/bin/nrjmx -hostname rancher-test -port 7199

Log Message Output

time="2020-01-21T17:49:14Z" level=debug msg="Integration command wrote to stderr" instance=nri-flex integration=com.newrelic.nri-flex prefix=integration/com.newrelic.nri-flex stderr="time=\"2020-01-21T17:49:14Z\" level=info msg=com.newrelic.nri-flex GOARCH=amd64 GOOS=linux version=0.8.3-pre\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"config: git sync configuration not set\"\ntime=\"2020-01-21T17:49:14Z\" level=info msg=\"flex: config files loaded 1\"\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"config: running async\" name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"config: processing apis\" apis=1 name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"fetch: collect data\" name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"commands: executing\" count=2 name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"commands: completed jmx command: echo 'org.apache.cassandra.metrics:type=ColumnFamily,keyspace=*,scope=*,name=TotalDiskSpaceUsed' | java -jar ./nrjmx/nrjmx.jar -hostname rancher-test -port 7199\"\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"command: failed\" err=\"exit status 1\" exec=\"org.apache.cassandra.metrics:type=ColumnFamily,keyspace=*,scope=*,name=TotalDiskSpaceUsed\" suggestion=\"if you are handling this error case, ignore\"\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"commands: completed jmx command: echo 'org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency' | java -jar ./nrjmx/nrjmx.jar -hostname rancher-test -port 7199\"\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"command: failed\" err=\"exit status 1\" exec=\"org.apache.cassandra.metrics:type=ClientRequest,scope=Read,name=Latency\" suggestion=\"if you are handling this error case, ignore\"\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"processor: running data handler\" name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=debug msg=\"config: finished processing apis\" apis=1 name=cassandraFlex\ntime=\"2020-01-21T17:49:14Z\" level=info msg=\"flex: completed processing\" configs=1\n" working-dir=/var/db/newrelic-infra/custom-integrations

Flex Source Code [link]

Below is the source code which is calling a .jar file rather than the binary.

*runCommand = fmt.Sprintf("echo '%v' | java -jar %vnrjmx.jar", *runCommand, load.DefaultJmxPath)`

Different behaviours for Powershell

I have two different integrations.yaml configuration to run a Power-shell script but the behaviour is different for each configuration.

Description

First Configuration:
I saw this configuration from some older issues, but one of the issues with this configuration is that the file pathing does not accept spaces. I would need to run the Power-Shell script in the New Relic Infra Agent folder, but the space between Program Files is not allowing me.

apis:
        - name: Tm1Validation
          commands:
            - run: powershell -file C:\validation.ps1

Edit: This actually doesn't work perfectly yet, it still gives an exit status 1 but I can see the output of it in error_message. The output is just jumbled up.

Second Configuration:
This is the newer configuration that i saw in some of the examples, but the problem with this configuration is that for some of the machines, it'll just give an error of exit status 1 with no error message. So i'm not even sure whats wrong with that. The Power-Shell script works fine when I'm running it locally. I have also gone through the logs with verbose: 1 option in the infra agent configuration yaml.

apis:
        - name: Validation
          shell: powershell
          commands:
            - run: "& \"C:/Program Files/New Relic/newrelic-infra/integrations.d/validation.ps1\""

Expected Behavior

I expect both of these configurations to behave the same and for the second configuration to work for all machines.

Troubleshooting or NR Diag results

This is the only relevant logs that I found when using the second configuration from verbose: 1.

time="2020-08-24T21:35:52Z" level=debug msg="time=\"2020-08-24T21:35:52Z\" level=debug msg=\"command: failed\" err=\"exit status 1\" exec=\"& \\\"C:/Program Files/New Relic/newrelic-infra/integrations.d/validation.ps1\\\"\" suggestion=\"if you are handling this error case, ignore\"" component=integrations.runner.Group integration_name=nri-flex
time="2020-08-24T21:35:52Z" level=debug msg="time=\"2020-08-24T21:35:52Z\" level=debug msg=\"processor-data: running data handler\" name=flexIntegrations" component=integrations.runner.Group integration_name=nri-flex
time="2020-08-24T21:35:52Z" level=debug msg="time=\"2020-08-24T21:35:52Z\" level=debug msg=\"config: finished variable processing apis\" apis=1 name=flexIntegrations" component=integrations.runner.Group integration_name=nri-flex
time="2020-08-24T21:35:52Z" level=debug msg="time=\"2020-08-24T21:35:52Z\" level=info msg=\"flex: completed processing configs\" configs=1" component=integrations.runner.Group integration_name=nri-flex

Whats weird to me is the first line of log where it's talking about some kind of error, but I don't see any error logs at all.

Steps to Reproduce

This was done with a power-shell validation script.

Your Environment

All the machines are running Windows Server 2012 with Infrastructure agent version 1.12.1

Additional context

error calling MarshalJSON for type / json: unsupported value: +Inf

Details

  • version=0.9.3
  • GOARCH=amd64
  • GOOS=linux
  • Kubernetes
  • Helm Charts

Redacted Log

error_json_marshal.txt

Summary

Using the integration for Consul, there is an error that happens when marshaling the JSON that is to be sent via the infra-agent.

Error Message

FATA[0000] flex: unable to publish                       err="error marshalling to JSON: json: error calling MarshalJSON for type *metric.Set: json: unsupported value: +Inf"

Duplicate executions/results as result of store_lookups

I am using the following yml:

name: glusterVolumes
apis:
  - name: glusterVolumes
    commands:
      - run: gluster volume info | tail -n +2
        split_by: ": "
        split_output: ^\s*$ # regex to split by line
    convert_space: "_"
    snake_to_camel: true
    remove_keys:
      - ^brick.*$
    store_lookups:
      volumeName: volumeName
  - name: glusterPartitions
    commands:
              #strip first 2 lines; remove spaces separating keys and values; remove trailing spaces; remove word "Brick " in front of actual brick name
      - run: gluster volume status ${lookup:volumeName} detail | tail -n +3 | sed 's|\s\{1,\}:\s|:|g' | sed 's|\s\{1,\}$||g' | sed 's|:Brick |:|g'
        split_by: ":"
        split_output: ^--*$
    convert_space: "_"
    snake_to_camel: true
    custom_attributes:
      volumeName: ${lookup:volumeName}

The glusterVolumes command results in the following output:

Volume Name: partition000
Type: Replicate
Volume ID: c7d69ab4-4aec-4e74-a648-497774bfb449
Status: Started
...
diagnostics.client-log-level: WARNING

Volume Name: partition001
Type: Replicate
Volume ID: d5654ea6-04fc-43df-bb45-7f4145f632cb
Status: Started
...
diagnostics.client-log-level: WARNING

Which is 2 volumeName values: partition000 and partition001.

The glusterPartitions command for partition000 results in:

Brick:dwxvalgovgluster1:/mount/cps/dwxval_gov_gluster_p/partition000/dwxvalgovgluster1
TCP Port:49152
RDMA Port:0
Online:Y
...
Free Inodes:130968952
------------------------------------------------------------------------------
Brick:dwxvalgovgluster2:/mount/cps/dwxval_gov_gluster_p/partition000/dwxvalgovgluster2
TCP Port:49152
RDMA Port:0
Online:Y
...
Free Inodes:130968952

For partition001 the results are:

Brick:dwxvalgovgluster1:/mount/cps/dwxval_gov_gluster_p/partition001/dwxvalgovgluster1
TCP Port:49153
RDMA Port:0
Online:Y
...
Free Inodes:130969170
------------------------------------------------------------------------------
Brick:dwxvalgovgluster2:/mount/cps/dwxval_gov_gluster_p/partition001/dwxvalgovgluster2
TCP Port:49153
RDMA Port:0
Online:Y
...
Free Inodes:130969170

Based on this, I would expect the flex execution to result in 2 glusterVolumesSample events and 4 glusterPartitionsSample events. Strangely, however, I am getting 6 glusterPartitionsSample events.
I have attached the "pretty" json output from nri-flex. It is interesting that the flexStatusSample event confirms 6 partition samples:

					"flex.counter.ConfigsProcessed": 1,
					"flex.counter.EventCount": 8,
					"flex.counter.EventDropCount": 0,
					"flex.counter.glusterPartitionsSample": 6,
					"flex.counter.glusterVolumesSample": 2,

pretty_json.txt

Kubernetes Envvar not interpolating correctly

When attempting to use nri-flex to inherit a kubernetes envvar and apply that to a config (through envvar substitution), nri-flex fails to properly parse and replace the envvar in the config.

Example:

---
name: linkerdFlex
global:
    headers:
      accept: application/json
custom_attributes:
  cluster: "$$NEW_RELIC_METADATA_KUBERNETES_CLUSTER_NAME"
apis:
  - event_type: LinkerdContainerSample
    url: http://${auto:host}:9990/admin/metrics.json

Trying various iterations of this still does not work:
Screen Shot 2019-12-18 at 8 10 27 PM

Kubernetes config:

apiVersion: apps/v1
kind: DaemonSet
metadata:
  name: nri-linkerd
  namespace: default
  labels:
    name: nri-linkerd
spec:
  selector:
    matchLabels:
      name: nri-linkerd
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        name: nri-linkerd
    spec:
      containers:
        - name: nri-linkerd
          image: privaterepo/nri-linkerd:latest
          imagePullPolicy: Always
          env:
          - name: NRIA_LICENSE_KEY
            valueFrom:
              secretKeyRef:
                 key: NRIA_LICENSE_KEY
                 name: newrelic-license
          volumeMounts:
            - name: dockersock
              mountPath: /var/run/docker.sock
              readOnly:  true
            - name: proc
              mountPath: /host/proc
              readOnly: true
          resources:
            limits:
              memory: 150M
            requests:
              cpu: 100m
              memory: 30M
      hostNetwork: true
      hostPID: true
      volumes:
        - name: dockersock
          hostPath:
            path: /var/run/docker.sock
        - name: proc
          hostPath:
            path: /proc

Powershell integration not respecting set timeout

Description

I have a windows integration that returns some software versions. On hosts where this takes less than 10 seconds, it's fine, but if it takes longer than 10 seconds, the flex integration returns exit code 1. I have tried increasing the timeout but regardless of the value used, the integration fails after 10 seconds

Expected Behavior

The timeout value is respected to support longer running integrations on windows

Troubleshooting or NR Diag results

nri-flex_debug.log

pa-baseline_ps1.txt
integration_yml.txt

It seems the problem is with Get-SEPVersion. On some hosts, it's fine, but in many cases $SEPService=(Get-WmiObject -Class Win32_Product | Where-Object -FilterScript {$_.Name -eq "symantec endpoint protection"}) takes considerably longer due to additional software installed on the host

I've simplified it to run a powershell script that sleeps for 15 seconds and I get the same result

Steps to Reproduce

  1. create a windows integration that takes longer than 10 seconds to return
  2. execute the integration either with the infrastructure agent or using nri-flex.exe

--> should get exit code 1 instead of results from the integration

Your Environment

Additional context

Ping sample

I am trying to get ping sample working for New Relic on Windows servers. I can do it successfully on my Red Hat servers but on Windows I get nothing. I know Flex is working on Windows as I use it successfully to monitor ports. I would just like to get the continuous ping to work. I have attached the .yml file which I have changed to .txt so I can upload here and this is located on the Windows server. The ip address listed is for that server.

ping-example.txt

Installation requires "restart"; not "start"

ref: https://newrelic-flex.s3-ap-southeast-2.amazonaws.com/install_linux_s3.sh

from the README.md the installation method for Flex is as follows:
sudo bash -c "$(curl -L https://newrelic-flex.s3-ap-southeast-2.amazonaws.com/install_linux_s3.sh)"

the ending of that installation shell script has this snippet:

echo "### Starting NR Infrastructure Agent"
if [ -f /etc/systemd/system/newrelic-infra.service ]; then
    service newrelic-infra start
fi
if [ -f /etc/init/newrelic-infra.conf ]; then
    initctl start newrelic-infra
fi

The expected outcome of this is that any new Flex Configs added to /var/db/newrelic-infra/custom-integrations/flexConfigs/ would automatically start sending data to Insights. However, if the infrastructure agent is already running, the "start" command doesn't work and a "restart" (or "stop/start") is required before data is sent.

Events not loading from windows host

I'm working through the tutorial, and I'm not seeing anything in NR insights.

Host Infrastructure agent: 1.11.4

Created integrations.yml in C:\Program Files\New Relic\newrelic-infra\integrations.d\

File contains what is in the tutorial:

integrations:
  - name: nri-flex
    config:
      name: just-testing

No events show in in New Relic Insights when i try NSQL FROM flexStatusSample SELECT * LIMIT 1

I've turned on verbose logging for the agent and I get this error:

time="2020-03-24T23:39:33Z" level=debug msg="Found integration config file" component=PluginRegistry configFile="C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\integrations.yml"
time="2020-03-24T23:39:33Z" level=debug msg="Ignoring v4 integration. To be loaded later." component=PluginRegistry file="C:\\Program Files\\New Relic\\newrelic-infra\\integrations.d\\integrations.yml"

I can't find what the reference to v4 integration means. Any help would be appreciated.

experimental command declarations

currently the examples given that have experimental features or commands do not declare that. For example the port test example (https://github.com/newrelic/nri-flex/blob/master/examples/flexConfigs/port-test-example.yml) uses the -dial command. If I am missing the dependencies it will not work and will never know why and end up wasting time trouble shooting. On top of that it if you go to the command docs (https://github.com/newrelic/nri-flex/blob/master/docs/apis/commands.md) -dial is not there. Would nice to have it there, but listed as experimental so that I can know how it works, what it does and the dependencies.

In any case people should know in advance if they are using some thing that is not GA

can't instantiate integration nri-flex

Here is the error:

Jun 10 13:39:22 i-0a7f791152c231c60 newrelic-infra-service: time="2020-06
-10T13:39:22Z" level=info msg="Checking network connectivity..." componen
t=AgentService service=newrelic-infra
Jun 10 13:39:22 i-0a7f791152c231c60 newrelic-infra-service: time="2020-06
-10T13:39:22Z" level=info msg=Initializing component=AgentService elapsed
Time=352.15592ms service=newrelic-infra
Jun 10 13:39:22 i-0a7f791152c231c60 newrelic-infra-service: time="2020-06
-10T13:39:22Z" level=warning msg="can't instantiate integrations from fil
e" component=integrations.Manager error="can't instantiate integration: c
an't find an executable given the name: nri-flex" file=/etc/newrelic-infr
a/integrations.d/logstash-config.yml

Here is the yml:

integrations:

  • name: nri-flex
    config:
    name: just-testing

This is on Amazon Linux AMI

$ uname -a
Linux hostname_blah 4.14.133-113.112.amzn2.x86_64 #1 SMP Tue Jul 30 18:29:50 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

With these newrelic package versions:

$ yum list |grep newre
newrelic-infra.x86_64 1.8.23-1 @newrelic-infra
newrelic-infra.x86_64 1.11.45-1.el7 newrelic-infra
newrelic-infra-integrations.x86_64 1.7.0-1 newrelic-infra
newrelic-infra-integrations-beta.x86_64
1.0.0-1 newrelic-infra
newrelic-infra-rootless.x86_64 0.0.rootless_rc1.15-1 newrelic-infra
newrelic-infra-rootless-beta.x86_64 0.0.rootless_rc1.16-1 newrelic-infra
nri-apache.x86_64 1.5.0-1 newrelic-infra
nri-cassandra.x86_64 2.4.2-1 newrelic-infra
nri-consul.x86_64 2.1.1-1 newrelic-infra
nri-couchbase.x86_64 2.3.6-1 newrelic-infra
nri-docker.x86_64 1.3.0-1 newrelic-infra
nri-elasticsearch.x86_64 4.3.0-1 newrelic-infra
nri-f5.x86_64 2.1.0-1 newrelic-infra
nri-haproxy.x86_64 2.1.0-1 newrelic-infra
nri-jmx.x86_64 2.4.4-1 newrelic-infra
nri-kafka.x86_64 2.13.4-1 newrelic-infra
nri-memcached.x86_64 2.1.1-1 newrelic-infra
nri-mongodb.x86_64 2.5.0-1 newrelic-infra
nri-mssql.x86_64 0.1.5-1 newrelic-infra
nri-mysql.x86_64 1.4.0-1 newrelic-infra
nri-nagios.x86_64 2.6.0-1 newrelic-infra
nri-nginx.x86_64 2.0.1-1 newrelic-infra
nri-oracledb.x86_64 2.5.0-1 newrelic-infra
nri-postgresql.x86_64 2.4.0-1 newrelic-infra
nri-rabbitmq.x86_64 2.2.2-1 newrelic-infra
nri-redis.x86_64 1.4.0-1 newrelic-infra

Any help tracking the cause here would be appreciated

netdial_test.go unit test failure on Go 1.13

The unit test in netdial_test.go fails on Go 1.13. The issue is that on Go 1.13, the error message is slightly different. On Go 1.12.9, it looks like this:

dial tcp: lookup fake12311290.com: no such host

On Go 1.13, the error message looks like this:
dial tcp: lookup fake12311290.com on 10.50.112.247:53: no such host

Go 1.13 has added the IP:Port for the DNS server that responded.

[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 5 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 [![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

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

Add Response Code to all URL API requests

The ability to collect the api.StatusCode data point has been enabled for all URL API requests. However, this only works with requests that return outputs that Flex works with natively (like JSON).

This feature request is to add support for all URL requests, regardless of output type. The use case is to create a very simple replica of the Synthetics Ping Monitor that will allow users to quickly return the response code of any URL via Flex.

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.