Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot override default scrapePort #130

Open
nimaafraz opened this issue Nov 12, 2020 · 2 comments
Open

Cannot override default scrapePort #130

nimaafraz opened this issue Nov 12, 2020 · 2 comments

Comments

@nimaafraz
Copy link

I'm running Caliper locally and since the scrapePort for the workers' defaults in 3000, it conflicts with Grafana port (also 3000).
I tried to change it as follows:

monitors:
    transaction:
    - module: prometheus
    options:
      interval: 5
      scrapePort: 4000

But it did not seem to work as the scrapePort for the workers would still start from 300. For now I fixed the issue temporarily by changing the /caliper-benchmarks/node_modules/@hyperledger/caliper-core/lib/worker/tx-observers/prometheus-tx-observer.js,8157,1605195368000:

        if (CaliperUtils.isForkedProcess()) {
            this.scrapePort += workerIndex+1;
        }

Well, it's not an ideal solution I guess.

@davidkel
Copy link
Contributor

This doesn't appear to be relevant to caliper-benchmarks but a potential issue with caliper

@davidkel
Copy link
Contributor

The problem is one of indentation, the options property is associated with the module, but in the above example the options is associated with the transaction property which is not correct. It should be

monitors:
    transaction:
    - module: prometheus
      options:
        interval: 5
        scrapePort: 4000

Then it will pick up the option values for the prometheus module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants