Coder Social home page Coder Social logo

apache_exporter's Introduction

GitHub stats

apache_exporter's People

Contributors

agebhar1 avatar andreaspb avatar blkperl avatar dborysenko avatar dependabot[bot] avatar dimaguy avatar dswarbrick avatar filippog avatar ghanendaghestani avatar grobie avatar jdvr avatar jvilhuber avatar kanga333 avatar lucian-vanghele avatar lusitaniae avatar maladev avatar mcasviper avatar mihailim avatar neezgee avatar nh2 avatar nvanheuverzwijn avatar osmuogar avatar rainerjung avatar rajatvig avatar richvdh avatar roidelapluie avatar shahincsejnu avatar thes1lv3r avatar tokuhirom avatar v-zhuravlev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apache_exporter's Issues

Error in scraping apache: 404 Not Found

Hi,
I am running the exporter in a Linux server with apache running as a service. The exporter is returning 404 Not Found while it is scraping the apache. I have the same configuration running in other similar servers and it works fine.
The error message is listed below:
level=error msg="Error scraping apache: Status 404 Not Found... The requested URL was not found on the server. Please check the spelling of you entered it manually" source="apache_exporter.go:295"

grafana dashboard

hi ~

i used apache_exporter 0.6 , but i use grafana dashboard 3894

this dashboard only apache_up/down working

and other all show "no data potins"

it what happend ? or i need down to use apache expoeter 0.5 ?

Image 4

strconv.ParseFloat: parsing \"\":

I'm unable to scrape apache 2.4.16

time="2016-09-09T20:13:48+02:00" level=info msg="Error scraping apache: strconv.ParseFloat: parsing "": invalid syntax" file="apache_exporter.go" line=156
time="2016-09-09T20:13:54+02:00" level=info msg="Error scraping apache: strconv.ParseFloat: parsing "": invalid syntax" file="apache_exporter.go" line=156
time="2016-09-09T20:14:48+02:00" level=info msg="Error scraping apache: strconv.ParseFloat: parsing "": invalid syntax" file="apache_exporter.go" line=156

This is my apache output.

127.0.0.1
ServerVersion: Apache/2.4.16 (Unix) OpenSSL/1.0.2h
ServerMPM: worker
Server Built: Jul 4 2016 22:40:23
CurrentTime: Friday, 09-Sep-2016 20:19:59 CEST
RestartTime: Thursday, 08-Sep-2016 21:25:12 CEST
ParentServerConfigGeneration: 1
ParentServerMPMGeneration: 0
ServerUptimeSeconds: 82486
ServerUptime: 22 hours 54 minutes 46 seconds
Load1: 0.50
Load5: 0.17
Load15: 0.16
Total Accesses: 1508
Total kBytes: 8023
CPUUser: 1.36
CPUSystem: .61
CPUChildrenUser: 0
CPUChildrenSystem: 0
CPULoad: .00238828
Uptime: 82486
ReqPerSec: .0182819
BytesPerSec: 99.5993
BytesPerReq: 5447.98
BusyWorkers: 1
IdleWorkers: 191

Apache_up shows 0 even my apache_exporter is on

When I type my apache_exporter on URL, I can see it is ON right now.
1

HOWEVER, I try to figure its graph out, it tells apache_up is 0.
2

Even though I can access my web server and it works normally.

What should I do to solve this problem?

http_* metrics missing from Apache Exporter 0.7.0

All http_* metrics do not get shown in apache exporter version 0.7.0 ... Only until version 0.5.0 are they still shown.
Since the documentation mentions them, customers keep complaining why they can not be viewed.

Grafana dashboard multiple series error.

Hi, I'm using this dashboard 3894 and it works great. I'm running the exporter as sidecar on kubernetes. Problem is when kubernetes restarts deployment it gives random name and grafana dashboard is getting Multiple series error. Anyone know how can I fix this error?
image

Edit: I guess correct place to ask is rfmoz/grafana-dashboards#30

Error running through Docker

when I use the command: "docker run -d -p 9117:9117 apache_exporter", all I get is this error: standard_init_linux.go:185 exec user process caused "exec format error.

This is my Dockerfile:
FROM quay.io/prometheus/busybod:latest

COPY apache_exporter.go /bin/apache_exporter

ENTRYPOINT ["/bin/apache_exporter"]
EXPOSE 9117

Collecting metrics from multiple containers

Hi,

How do we collect metrics from single box when multiple containers are running on it ?

For example: If 9 containers are running in 2 machines, Those 9 container will be using a random service ports selected by orchestration tool.

In that scenario, How do we collect Apache stats from those 2 boxes (machine-wise/aggregate reports).

Thanks for any help !!

How to get target as a element?

I'm using grafana to plot some graphs with the exporter information, but the data inserted into prometheus doesn't have "target" as an element and I want to have these as value in grafana. Is it possible?

If so, can you provide an sample of prometheus.yml for that?

Thanks in advance.

Add header support

Hello.
Thank you for this project!
I wondered if you could support adding multiple headers via CLI options.
e.g.
apache_exporter --header "Accept: */*" --header "User-Agent: something" --scrape_uri ...

The reason behind this is that we have a modSecurity (WAF) in "Front" of the Apache server and it logs false alerts for missing Accept header. Of course you could add an accept header by default, but it's probably better to make it configurable.

What do you think?

Allow "scrape_uri" to be passed via URL as target

It is a bit of a Prometheus anti-pattern to configure in the exporter itself what should be monitored. That configuration should be retrieved by Prometheus using service-discovery, and passed on to the exporter. A good example of this is the blackbox_exporter, which uses the "target" parameter to identify what service to probe.

So, I suggest that apache_exporter also implements a "target" parameter, and uses that instead of the default or what is given in --scrape_url, if defined.

This would also solve #37, and simplify deployment (if server-status is accessible from a single host, you only need to deploy it once).

run 'go mod tidy; go mod vendor' to sync

Hi,
Running the make command in docker, I get the following error.
I found discussions about tools.go but found no solution.
Any help appreciated, total Go Newbie here.

docker run --rm -v /home/julien/Containers/apache_exporter:/usr/local/go/src/github.com/Lusitaniae/apache_exporter -w /usr/local/go/src/github.com/Lusitaniae/apache_exporter golang make
go: inconsistent vendoring in /usr/local/go/src/github.com/Lusitaniae/apache_exporter:
	go.mod requires github.com/Lusitaniae/apache_exporter  but vendor/modules.txt does not include it.
	run 'go mod tidy; go mod vendor' to sync
>> formatting code
go: inconsistent vendoring in /usr/local/go/src/github.com/Lusitaniae/apache_exporter:
	go.mod requires github.com/Lusitaniae/apache_exporter  but vendor/modules.txt does not include it.
	run 'go mod tidy; go mod vendor' to sync
make: *** [Makefile:35: format] Error 1

Important metrics are missing

Hi There,

I have installed go package for this apache_exporter in my centos machine and also enabled the server-status for apache instance.

Apache server-status page is giving the required metric like "10 requests currently being processed, 90 idle workers"

Whereas apache_exporter page is missing to give any metric to find out how many requests are currently being processed and how many are being in idle state (Missing - apache_accesses_total ).
image
image
image

Request your help in this.

Thanks
Anka

Using "-insecure" parameter cause a 401 during scrape

While testing #29 I have discovered a weird issue, when running binary using -insecure as first argument. I get a 401 during the scrape, This are the outputs for the different tests:

./apache_exporter -insecure "false" -scrape_uri "http://prom:prom@localhost/server-status?auto"
INFO[0000] Starting apache_exporter (version=0.4.0, branch=HEAD, revision=7131d6b924ccd3919c366626eca19022a18da811)  source="apache_exporter.go:291"
INFO[0000] Build context (go=go1.9.1, user=root@612a33366ebc, date=20171007-10:55:46)  source="apache_exporter.go:292"
INFO[0000] Starting Server: :9117                        source="apache_exporter.go:294"
ERRO[0001] Error scraping apache: Status 401 Unauthorized (401): <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>401 Unauthorized</title>
</head><body>
<h1>Unauthorized</h1>
<p>This server could not verify that you
are authorized to access the document
requested.  Either you supplied the wrong
credentials (e.g., bad password), or your
browser doesn't understand how to supply
the credentials required.</p>
<hr>
<address>Apache/2.4.18 (Ubuntu) Server at localhost Port 80</address>
</body></html>
  source="apache_exporter.go:273"
> ./apache_exporter -scrape_uri "http://prom:prom@localhost/server-status?auto"                  
INFO[0000] Starting apache_exporter (version=0.4.0, branch=HEAD, revision=7131d6b924ccd3919c366626eca19022a18da811)  source="apache_exporter.go:291"
INFO[0000] Build context (go=go1.9.1, user=root@612a33366ebc, date=20171007-10:55:46)  source="apache_exporter.go:292"
INFO[0000] Starting Server: :9117                        source="apache_exporter.go:294"

In each case, start the exporter and access to http://localhost:9117/metrics in the browser.

The Apache configuration is copied from #29.
Does it make sense for you? I have also tried -insecure false and -insecure true, any combination result in the same problem.

It seems like the -scrape_uri is ignore when insecure is set.
I am using this binary https://github.com/Lusitaniae/apache_exporter/releases/download/v0.4.0/apache_exporter-0.4.0.linux-amd64.tar.gz

[Feature request] Expose metrics for `configtest` results

As the Apache server configuration can be changed and reloaded on live, it could be useful to expose some metrics to monitor this.

By running an apachectl configtest command every time the exporter is scraped, we could expose the following metrics:

  • apache_configtest_last_check_successful will return 0 if the configuration is invalid and 1 if everything is okay.

  • apache_configtest_last_check_success_timestamp_seconds will return the timestamp in seconds of the last time the check was successful.

These metrics might help us to prevent an Apache server to reload a faulty configuration or alert us before it happens.

I'll start writing a Pull Request to implement this. I'm open to suggestions and comments.

apache_exporter binary file release

Would you mind to add binary release file in release too? This would be much better, than getting the .go and compiling it (takes much more time + dependencies).

Container Run Issue

Hello,
after building a "go" binary i suceeded to build also a docker image. But as i wanted to run the container i recieved this message:
"docker: Error response from daemon: Container command '/apache_exporter' not found or does not exist".

support for Host header

some Apache deployments require using a Host header when accessing the status page. It would be great if apache_exporter were able to support this. I've reviewed the code, it is simple, and this ought to be an easy task, though I was not 100% sure how to specify this when using the http client. I attempted to pipe in that header when making the request to apache, but I have not spent enough time with golang to be very effective.

The context is running multiple instances of apache, where each instance of apache has its own apache_exporter scrapping mod_status. apache_exporter refers to each instance by IP port directly, rather than going through a load balancer or other routing layers.

Can we monitor apache tomcat 9 using this exporter ?

Can we monitor apache tomcat 9 using this exporter? If we can monitor can you provide the details of how to monitor?

I tried whatever there in the README.MD file. For httpd it is working fine, but I need to monitor the Tomcat application.

I am using centos 7
webserver httpd
application server Apache Tomcat

In httpd we have http://url/server-status
whereas in apache tomcat application we have http://url/manager/status/all where we get all parameters of server status

I tried
./apache_exporter -scrape_uri="http://tomcat:[email protected]:8080/manager/status/all/

The exporter is showing apache_up 1, but I am not able to get the metrics

Thanks in Advance

exporter does not listen to TERM signal

We have in stalled the exporter as sidecar on an apache 2.4 in the openshift (terraform) environment. The Pod does not stop by the TERM signal but waits for the kill event which is triggerd after a minute

type prometheus.Counter has no field or method Set

Hi, Guys.

I'm using debian 8.2( jessie) and apache 2.4.10, and i added apache mod status.
And i'm using ExtendedStatus On, which enables a lot of variables on status page. But when i run go run apache_exporter, in order to test this, i got this result:

# command-line-arguments
./apache_exporter.go:194: e.accessesTotal.Set undefined (type prometheus.Counter has no field or method Set)
./apache_exporter.go:202: e.kBytesTotal.Set undefined (type prometheus.Counter has no field or method Set)
./apache_exporter.go:210: e.uptime.Set undefined (type prometheus.Counter has no field or method Set)

Thanks in advance.

mod_cache exporter

Which are interesting Apache metrics too.
I wrote such an exporter for Munin (GPLv2), but contribution under MIT is a bit less appealing.

But basically, it's : htcacheclean -a -p /cache/path | egrep -o "<regexp-of-choice-N>" | sort | uniq --count
for the N regexps the user is interested in.

Scrape server with self signed certificate

Im unable to get apache status on a server running on a self signed certificate. Is there any way to skip this? Scraper seems to fail at this point

func (e *Exporter) Collect(ch chan<- prometheus.Metric) {
	e.mutex.Lock() // To protect metrics from concurrent collects.
	defer e.mutex.Unlock()
	if err := e.collect(ch); err != nil {
		log.Errorf("Error scraping apache: %s", err)
		e.scrapeFailures.Inc()
		e.scrapeFailures.Collect(ch)
	}
	return
}

Is there a way to skip SSL validation?

Error scraping apache: strconf.ParseFloat

Contstantly getting the error:
INFO[0020] Error scraping apache: strconv.ParseFloat: parsing "": invalid syntax file=apache_exporter.go line=156

Startup command is:
./apache_exporter -log.level debug -scrape_uri "https://my.domain.name/server-status?auto"

The output of the server-status is:

my.domain.name
ServerVersion: Apache/2.4.23 (Unix) OpenSSL/1.0.2h
ServerMPM: worker
Server Built: Aug 31 2016 10:54:08
CurrentTime: Thursday, 08-Sep-2016 15:09:32 CEST
RestartTime: Thursday, 08-Sep-2016 15:08:07 CEST
ParentServerConfigGeneration: 1
ParentServerMPMGeneration: 0
ServerUptimeSeconds: 85
ServerUptime: 1 minute 25 seconds
Load1: 0.00
Load5: 0.01
Load15: 0.05
Total Accesses: 10
Total kBytes: 38
CPUUser: .05
CPUSystem: 0
CPUChildrenUser: 0
CPUChildrenSystem: 0
CPULoad: .0588235
Uptime: 85
ReqPerSec: .117647
BytesPerSec: 457.788
BytesPerReq: 3891.2
BusyWorkers: 2
IdleWorkers: 48
Scoreboard: R_______________________K_______________....................................................................................................
TLSSessionCacheStatus
CacheType: SHMCB
CacheSharedMemory: 512000
CacheCurrentEntries: 0
CacheSubcaches: 32
CacheIndexesPerSubcaches: 88
CacheIndexUsage: 0%
CacheUsage: 0%
CacheStoreCount: 0
CacheReplaceCount: 0
CacheExpireCount: 0
CacheDiscardCount: 0
CacheRetrieveHitCount: 0
CacheRetrieveMissCount: 1
CacheRemoveHitCount: 0
CacheRemoveMissCount: 0

-version flag

please include a -version flag. It will be useful for all administrators of production systems and for debugging purposes.

CentOS 7.4 can't load package

go env

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/src/github.com/apache_exporter/"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build597971533=/tmp/go-build -gno-record-gcc-switches"
[root@osboxes apache_exporter]# go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/src/github.com/apache_exporter/"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build442579677=/tmp/go-build -gno-record-gcc-switches"

echo $GOPATH

/src/github.com/apache_exporter

echo $GOROOT

/usr/local/go

echo $PATH

:/usr/local/go/bin:/usr/local/go/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/home/osboxes/.local/bin:/home/osboxes/bin:/usr/local/go/bin

go list | grep -v /vendors/

_/src/github.com/apache_exporter

make

formatting code
can't load package: package /src/github.com/apache_exporter: cannot find package "/src/github.com/apache_exporter" in any of:
/usr/local/go/src//src/github.com/apache_exporter (from $GOROOT)
/src/github.com/apache_exporter/src/
/src/github.com/apache_exporter (from $GOPATH)
make: *** [format] Error 1

Sorry to waste your time, but i'm not sure what's causing this. It seems like the '_' is being added to the path causing it to fail but i'm not familiar with go or apache_exporter.

server-status lost Metrics

图片

in my Apache server-status we found lost some Metrics

Server Version: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0g mod_cluster/1.2.9.Final

apache_up gauge doesn't reset to 0 when both apache and exporter are compose services

I'm running apache_exporter and apache httpd as separate services defined in a single docker-compose.yml:

  httpd:
    image: custom/httpd:2.4
    container_name: httpd
    ports:
      - 80:80
    restart: unless-stopped
    networks:
      - some-network

  apache-exporter:
    image: custom/apache_exporter
    container_name: apache-exporter
    entrypoint: '/bin/apache_exporter -scrape_uri "http://httpd/server-status/?auto"'
    ports:
      - 9117:9117
    restart: unless-stopped
    depends_on:
      - httpd
    networks:
      - some-network

Everything runs as expected immediately after:

docker-compose up -d

However, after
docker-compose stop httpd

the following metrics are still being reported:

apache_cpuload 0.00441176
apache_exporter_build_info{branch="master",goversion="go1.8.7",revision="6195241a96c02af175ba2842dfd883682133b066",version="0.7.0"} 1
apache_up 1
apache_workers{state="busy"} 1
apache_workers{state="idle"} 74

The values remain the same with every refresh.

I'm guessing this is happening because the NewRequest call is resulting in error which terminates collection before the up gauge can be set to 0, but i'm not sure where to look for the error message.

docker logs apache-exporter

does not appear to capture the error.

mod proxy status export

mod-proxy hooks in mod-status to provide additional metrics of interest.
Would be nice if those could be parsed and exported too.

Collecting metrics from multiple targets (à la blackbox_exporter)

Hi,

I'd like to do something like the blackbox_exporter does: collecting metrics from multiple Apache instances, and parameterize the actual target with the query.

Example: scraping http://localhost:9117/metrics?target=http%3A%2F%2Fexample.com/server-status%2F%3Fauto should be equivalent (*) to apache_exporter -scrape_url 'http://example.com/server-status/?auto', but with the extended functionality of making the target parameter... well, parameterizable.

(*) modulo the relabeling required

This has the huge advantage of deploying only one apache_exporter instance (and not one alongside each Apache server/container). It basically resolves #32.

The modifications necessary for this are manageable:

@@ var ( @@
+	targetsEndpoint  = flag.String("telemetry.targets", "/probe", "Path under which to expose dynamic metrics.")

@@ func main() { @@
+	http.HandleFunc(*targetsEndpoint, func(w http.ResponseWriter, r *http.Request) {
+		target := r.FormValue("target")
+		if target == "" {
+			http.Error(w, "bad request: missing target parameter", http.StatusBadRequest)
+			return
+		}
+		reg := prometheus.NewRegistry()
+		exporter := NewExporter(target)
+		reg.MustRegister(exporter)
+		h := promhttp.HandlerFor(reg, promhttp.HandlerOpts{})
+		h.ServeHTTP(w, r)
+	})

Eventually (after polishing and testing), I'd like to open a PR. However, it makes the -scrape_url superflous, and the /metric endpoint (mostly) useless, so I'm asking for guidance. Do you think you'd merge a pull request with these changes, or do you think this would be better a seperate exporter altogether?

Apache RAM/fds usage metrics

Would it be possible to add apache RAM and fds usage? So far I see process RAM/fds metrics, but I think process means metrics of the exporters and not apache server.

Hard Dependency on Service

The apache_exporter has a hard dependency on the apache service, so if the service goes down, the apache_exporter goes down. I don't think that is optimal as it is inconvenient to have to restart the exporter every time the service goes down. Please let me know if there are any fixes. Thanks!

CentOS 6.8 Requirement for ld-musl-x86_64.so.1

Hi,

I was able to build this just fine but when I attempt to run it on a CentOS 6.8 system, it fails to run because of a missing library ld-musl-x86_64.so.1. I had to build this library from scratch and deploy it along with the apache_exporter using the code I found here:
https://www.musl-libc.org/download.html

Can you explain why this might be the case? Strange that a Go app would require a C library.

New 0.3 release

Hello,

would it be possible to tag the last commits with 0.3 (where it makes sense) and make a new release?

Thanks!

Luca

About apache_accesses_total

Can I check the number of individual connections for the VirtualHost URL?
Could you tell me how to do it?

Thank you.

first path segment in URL cannot contain colon

Using v.8 that has been release just 2 days ago, I am facing a problem where apache_exporter cannot scrap metrics. It exposes them quite well but I get only increase in apache_exporter_scrape_failures_total.

Looking at k8s dasboard, and pod deployment I use

        command:
          - /bin/apache_exporter
          - --insecure
          - --scrape_uri="http://localhost/server-status/?auto"

which leads to

time="2020-03-30T10:24:22Z" level=info msg="Starting apache_exporter (version=, branch=, revision=)" source="apache_exporter.go:360"
time="2020-03-30T10:24:22Z" level=info msg="Build context (go=go1.13.9, user=, date=)" source="apache_exporter.go:361"
time="2020-03-30T10:24:22Z" level=info msg="Starting Server: :9117" source="apache_exporter.go:362"
time="2020-03-30T10:24:22Z" level=info msg="Collect from: \"http://localhost/server-status/?auto\"" source="apache_exporter.go:363"
time="2020-03-30T10:24:22Z" level=info msg="listening and wait for graceful stop" source="apache_exporter.go:367"
time="2020-03-30T10:24:38Z" level=error msg="Error scraping apache: error building scraping request: parse \"http://localhost/server-status/?auto\": first path segment in URL cannot contain colon" source="apache_exporter.go:335"

Any idea?

Multi-Stage Dockerfile

Hey there!

I recently used apache_exporter in a virtual instance which does not have Go environment. I was unable to build the binary by myself and had to use a docker container with the Go environment, build the app and then build the final image.

In the README, it is specified that the image has to be built from the Dockerfile, but it seems that beforehand the binary has to be already generated.

In this case it may be interesting to have a multi-stage Dockerfile that will handle the compilation part with Go environment and then the busybox part that would retrieve the binary file.

Configure logging levels

Follow up of #42.

Add the following flag and its functionality

-  -log.level value
-    	Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal, panic]. (default info)

I see an example on the Mysqld Exporter
https://github.com/prometheus/mysqld_exporter/blob/master/mysqld_exporter.go#L190

Which uses
https://github.com/prometheus/common/blob/master/log/log.go#L57

Which would require replacing stdlib's flag with https://github.com/alecthomas/kingpin

Include user/password for server-status page

Given the fact that sever-status page could be a security issue configure authentication for this page is necessary and even it is recommended. It would be great to include a user/password parameter and include it as part of the request to the apache server.

Add ReqPerSec metric

If possible, add ReqPerSec metric which is directly exported via /server-status?auto

No apache metrics are exported

As stated in the title, no apache metrics are exported.

The only apache_ metrics i see are:

# HELP apache_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, and goversion from which apache_exporter was built.
# TYPE apache_exporter_build_info gauge
apache_exporter_build_info{branch="HEAD",goversion="go1.12.6",revision="6195241a96c02af175ba2842dfd883682133b066",version="0.7.0"} 1
# HELP apache_exporter_scrape_failures_total Number of errors while scraping apache.
# TYPE apache_exporter_scrape_failures_total counter
apache_exporter_scrape_failures_total 100

Which are totally irrelevant for monitoring.
The rest of the metrics are about go and i don't care about that either.

I have extended stats enabled and the status page itself returns the correct metrics:

Total Accesses: 70
Total kBytes: 642
CPULoad: .0956641
Uptime: 1453
ReqPerSec: .0481762
BytesPerSec: 452.449
BytesPerReq: 9391.54
BusyWorkers: 2
IdleWorkers: 3
Scoreboard: KW___.............................................

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.