Coder Social home page Coder Social logo

Comments (12)

Lusitaniae avatar Lusitaniae commented on June 2, 2024

I misread your question.

It seems the exporter couldnt connect to Apache.

Do you see any errors when you run the exporter in the command line?

You need to enable server-status handler for Apache to report data. This is the most frequent issue.

You should be able to read Apache data on this url localhost/server-status?auto by defalt

See the previous discussion at #29 (comment)

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

HI @janeunbi

Is it working now?

from apache_exporter.

janey-day avatar janey-day commented on June 2, 2024

hi @Lusitaniae
Thank you for your reply
nope it doesn't work, I can see the all metrics provided.
I can't understand why value of apache_up comes out 0 even the apache_exporter and apache still working on.

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

hi @janeunbi

You're missing all the Apache metrics except for apache_up with reports as 0.

Can you run curl localhost/server-status?auto on the server and share the result?

This is the url the exporter is trying to get metrics from.

from apache_exporter.

janey-day avatar janey-day commented on June 2, 2024

Here's my all the Apache metrics and apache_up status behind the chart.
all
Through this, I can figure it out its metrics works except apache_up metric

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

from apache_exporter.

janey-day avatar janey-day commented on June 2, 2024

Sorry I forgot to attach the files.
I don't know which server I should run "curl localhost/server-status?auto ", so I typed it both prometheus server and web server which installed apache_up.
Here's the pic of prometheus server.
pro
This one is installed apache_up.
web

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

the command is meant to retrieve the status page from Apache itself, so running it in the same machine as apache is the right one.

Looking at that 301 redirect you show on the 2nd screenshot I'd say the rewrite rule you use to enforce https is not working as expected, as you can see there's a slash missing there.


Please also check you have all the configuration required, as described in the official docs.

https://httpd.apache.org/docs/2.4/mod/mod_status.html

<Location "/server-status">
    SetHandler server-status
    Require host example.com
</Location>

or follow a more detailed guide such as

https://www.shellhacks.com/prometheus-apache-exporter-install-config-ubuntu-centos/

from apache_exporter.

janey-day avatar janey-day commented on June 2, 2024

Thank you for trying to help me.
I read your comment over and over, not sure I'm in the right direction.

  1. Which one is 301 redirect? Where is the slash missing?
  2. you mean "https" causing this problem, am I right?
  3. To fix this problem, I need to enable Apache Server Status Page and should make or edit configuration file in the Web server.

p.s. I'm not sure I understand what you said. Unfortunately, web server is belong to my work, I don't think I able to fix that file.
Thank you again

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

@janeunbi, maybe its possible someone else at your company have a look at this?

If the Apache config needs to be fixed to make it work, there's no other way around it.

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

hi @janeunbi

Is this still an issue?

Is there anything I can help with?

from apache_exporter.

Lusitaniae avatar Lusitaniae commented on June 2, 2024

I will close the issue unless you need additional feedback here.

In case you dive into this further, the answer to your questions

  1. the redirect is seen on the 2nd screenshot you've sent
  2. Can be, there's a redirect rule somewhere that is causing the missing slash-
  3. yes, you need to review the web server config.

from apache_exporter.

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.