Git Product home page Git Product logo

Comments (12)

dalareo avatar dalareo commented on September 23, 2024 2

Yes!! It works now. The parameter was allowed in the "metrics_path"

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024 1

OMG! What you're saying is you can't have the query params in path, but you must specify it separately?
And it is working now?

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024 1

OK. Cool. And good to know…

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024

Hello @dalareo !
In targets you must specify the full url (and not path or something else) and it's seems it's not the case here.
In the mentioned article, you have a screenshot of a working configuration… Could you just try to stick to it first, and we will see if there's other errors or problems after that.
Thanks.

from wp-decalog.

dalareo avatar dalareo commented on September 23, 2024

targets field does not accept path nor scheme in its value, only hostname is allowed. If we set the full URL there we get:

2023/03/20 14:32:26 error loading config file /etc/agent/agent.yaml: "http://domain.com/wp-json/decalog/v3/metrics?uuid=44109443-f727-4d93-928f-f3f50b022c74" is not a valid hostname

Full URL is showing the expected metrics collection using the full with curl from grafana-agent or accessing through web browser.

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024

OK. So obviously, there's something wrong/outdated/deprecated in my article 😨
What if you add 127.0.0.1:80 as target?

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024

or whatever is your local ip/port…

from wp-decalog.

dalareo avatar dalareo commented on September 23, 2024

If I add a hostname (IP of servicename:port) no error is thrown but no metrics are shown in Grafana Cloud, only scrape_duration_seconds metrics

Captura de pantalla de 2023-03-20 16-00-12

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024

OK. Let me some minutes to reinstall an agent on a test machine…

In the meantime, just to be sure, can you confirm the url /wp-json/decalog/v3/metrics?uuid=441… in your browser gives you metrics?

from wp-decalog.

dalareo avatar dalareo commented on September 23, 2024

Yes, it works like a charm in my browser. We can help with Php code also if you need to make some changes in the plugin!

Captura de pantalla de 2023-03-20 16-08-06

from wp-decalog.

Pierre-Lannoy avatar Pierre-Lannoy commented on September 23, 2024

Thanks for the confirmation.

Thank you for your offer of help <3
Nevertheless, it is (at 99,9% chance) not a plugin issue but an agent config issue. That's why I will try to found what the hell has changed in the config…

from wp-decalog.

dalareo avatar dalareo commented on September 23, 2024

I've found the point:

- job_name: decalog/scrapping
          static_configs:
            - targets: ['service-name']
              labels:
                process: 'agent'
          metrics_path: "/wp-json/decalog/v3/metrics"
          params:
            uuid: ['uid-code]

from wp-decalog.

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.