GithubHelp home page GithubHelp logo

Comments (2)

Kav91 avatar Kav91 commented on June 12, 2024

Hey @gabrielnewrelic, dedupe_lookups is available to the new native lookups.
In the info about that feature the hyperlink refers to this implementation here -> https://github.com/newrelic/nri-flex/blob/master/docs/basics/functions.md#lookups

Your example is using a lookup generated from store_lookups. This is now simplified with the doc mentioned.

add_attribute is for building new attributes from existing attributes, the functionality is different to custom_attributes.

eg.

integrations:
  - name: nri-flex
    interval: 30s
    config:
      name: addTest
      apis:
        - url: https://jsonplaceholder.typicode.com/users/1
          add_attribute:
            newAttr: myNewAttr_${name}_${username}_${email}

I don't believe there is any issue here, but we should improve the docs to direct users to look at the new lookup feature first. Let me know if that all makes sense or if there is still any issues.

from nri-flex.

gabrielnewrelic avatar gabrielnewrelic commented on June 12, 2024

Hi Kav, thank you for the prompt reply. So I tried a few different things with dedupe_lookups:

- event_type: JenkinJobsLookup
    url: /api/json?tree=jobs[name]
    ignore_output: true
- event_type: JenkinsBuilds
    url: /job/${lookup.JenkinJobsLookupSample:name}/api/json?tree=allBuilds[*]
    dedupe_lookups:
      - name

also tried without Sample

- event_type: JenkinJobsLookup
     url: /api/json?tree=jobs[name]
     ignore_output: true
- event_type: JenkinsBuilds
     url: /job/${lookup.JenkinJobsLookup:name}/api/json?tree=allBuilds[*]
     dedupe_lookups:
       - name

It is not recognizing the variable and return nothing on the second call. I can send you the full example if you want to replicate. Thank you

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.