GithubHelp home page GithubHelp logo

Comments (7)

Kav91 avatar Kav91 commented on June 12, 2024

@dokyun-kim without seeing the verbose log its hard to exactly tell what is going wrong.

I am assuming its because your lookup file is not in the location the Flex binary is anymore, and its not reading the file relative to the path.

I would update lookup_file: to use the full path to rule this out first.

eg.

lookup_file: /etc/newrelic-infra/integrations.d/testLookup.json

cc/ @ardias this is another typical use case where suggesting to debug by running the single config and supplying the output would be useful but we can't suggest that anymore.
This makes it extremely difficult for customers to debug when moving files around and especially when dealing with anything to do with paths in general.

from nri-flex.

ardias avatar ardias commented on June 12, 2024

@dokyun-kim How are you running the example? Are you executing Flex directly (is ./nri-flex -config_path) or are you running the newrelic agent?
The format of the configuration file for Flex has not changed you can still use the examples like before.

If you are using Flex only, for example testing your configurations, see here: https://github.com/newrelic/nri-flex/blob/master/docs/development.md

If you want to use Flex with the agent so you see the data in NR, see here: https://github.com/newrelic/nri-flex/blob/master/docs/basic-tutorial.md

As @Kav91 has said, don't use relative paths, it is better to always use absolute paths when referring to files

@Kav91 We'll try to mitigate these issues in the next phase we are planning for Flex, making the agent have better support for Flex configs

from nri-flex.

dokyun-kim avatar dokyun-kim commented on June 12, 2024

@ardias
I'm using flex through the newrelic latest agent.

And modified lookup_file as follows.
lookup_file: /etc/newrelic-infra/integrations.d/testLookup.json

The following error message was output from the newrelic-infra.log file.

time="2020-03-06T01:01:57Z" level=warning msg="can't load integrations file. This may happen if you are editing a file and saving intermediate changes" component=integrations.Manager error="yaml: line 10: did not find expected '-' indicator" event="\"/etc/newrelic-infra/integrations.d/portTestWithLookup.yml\": DELETE" file_name=/etc/newrelic-infra/integrations.d/portTestWithLookup.yml function=handleFileEvent

In my opinion, nri-flex used to support the following syntax, but it does not seem to support Flex bundled with the newrelic agent.

    commands:
     - dial: ${lf:addr}

Thank you!

from nri-flex.

haihongren avatar haihongren commented on June 12, 2024

@dokyun-kim
The following integration config yml file(new fomat) should allow you continue to run the Flex integration yml files created previously without any modification required.
# more /etc/newrelic-infra/integrations.d/myflex.yml

integrations:
   - name: nri-flex
     exec:
       - /var/db/newrelic-infra/newrelic-integrations/bin/nri-flex
       - --config_dir=/var/db/newrelic-infra/custom-integrations/flexConfigs/
     interval: 60s
     working_dir: /var/db/newrelic-infra/custom-integrations/flexConfigs/

the working_dir should point to where the lookup files are located.
the config_dir should point to where the Flex integration yml files created in previous version.

from nri-flex.

dokyun-kim avatar dokyun-kim commented on June 12, 2024

@haihongren
Hello Haihong

I've confirmed that flex works fine with the method you gave me.

Thank you

from nri-flex.

dokyun-kim avatar dokyun-kim commented on June 12, 2024

@haihongren

As you told me, I used the same method on Windows, but I get an error. Can you please tell me what went wrong?

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

integrations:
   - name: nri-flex
     exec:
       - "C:\Program Files\New Relic\newrelic-infra\custom-integrations\nri-flex.exe"
       - --config_path="C:\Program Files\New Relic\newrelic-infra\custom-integrations\portTestWithLookup.yml"
     interval: 30s

newrelic-infra.log error log

time="2020-03-09T05:56:38Z" level=warning msg="integration exited with error state" component=integrations.runner.Group error="exit status 1" integration_name=nri-flex stderr="time=\"2020-03-09T05:56:38Z\" level=info msg=com.newrelic.nri-flex GOARCH=amd64 GOOS=windows version=1.1.0\ntime=\"2020-03-09T05:56:38Z\" level=fatal msg=\"config: failed to read\" err=\"CreateFile C:\\\\Program Files\\\\New Relic\\\\newrelic-infra\\\\custom-integrations\\\\portTestWithLookup.yml: The system cannot find the file specified.\" file=\"C:\\\\Program Files\\\\New Relic\\\\newrelic-infra\\\\custom-integrations\\\\portTestWithLookup.yml\""

Thank you

from nri-flex.

ardias avatar ardias commented on June 12, 2024

Hi @dokyun-kim
from the error message it seems it is unable to find the file C:\Program Files\New Relic\newrelic-infra\custom-integrations\portTestWithLookup.yml

Can you try copying that file to a folder with a simple name, like for example c:\flex\portTestWithLookup.yml ? It could be a problem with spaces in the name of the folder

from nri-flex.

Related Issues (20)

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.