Comments (7)
@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.
@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.
@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.
@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.
@haihongren
Hello Haihong
I've confirmed that flex works fine with the method you gave me.
Thank you
from nri-flex.
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.
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)
- Add automatic time server discovery for Windows NTP Clock Drift integration HOT 2
- linux-file-count.yml does not work as-is
- Review/create e2e tests to be able to upgrade go version HOT 1
- Upgrade Go version to > 1.15
- Flex IP Discovery on Kubernetes HOT 3
- Flex not working though API call works with Curl -k HOT 1
- Impossible to use the '%' character in a db query (MySQL)
- Running Flex Serverless - Azure Function App?
- Getting Parse errors in case if docker discovery doesn't finds any suitable containers
- Add support for Oracle DB HOT 1
- null value being converted to unicode HOT 8
- [Repolinter] Open Source Policy Issues HOT 1
- Extra middle whitespace in `name: nri-flex` throws an error HOT 3
- "lookups" function fails when looking up more than one value in same command HOT 1
- [Repolinter] Open Source Policy Issues HOT 1
- Sampling rate to New Relic does not go below 15s HOT 2
- [Repolinter] Open Source Policy Issues HOT 1
- Not possible to add user/pass as global to invoke PowerShell script with specific credentials HOT 3
- Swedish characters like Γ₯Àâ is not working in Flex via PowerShell HOT 3
- Recursively get data by using the 'nextCursor' attribute in Nerdgraph API HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nri-flex.