Lusitaniae/apache_exporter

Metric not displayed

Closed this issue · 2 comments

Good afternoon, I cannot understand why the metrics are not displayed.
Here is a list of metrics that are
curl http://127.0.0.1:9117/metrics

HELP apache_accesses_total Current total apache accesses (*)

TYPE apache_accesses_total counter

apache_accesses_total 630

HELP apache_cpuload The current percentage CPU used by each worker and in total by all workers combined (*)

TYPE apache_cpuload gauge

apache_cpuload 0.135029

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.16.6",revision="c64b4496c4658d72c58fbda905a70c06a4b7f0c7",version="0.10.0"} 1

HELP apache_info Apache version information

TYPE apache_info gauge

apache_info{mpm="UNKNOWN",version="UNKNOWN"} 1

HELP apache_scoreboard Apache scoreboard statuses

TYPE apache_scoreboard gauge

apache_scoreboard{state="closing"} 0
apache_scoreboard{state="dns"} 0
apache_scoreboard{state="graceful_stop"} 0
apache_scoreboard{state="idle"} 9
apache_scoreboard{state="idle_cleanup"} 0
apache_scoreboard{state="keepalive"} 0
apache_scoreboard{state="logging"} 0
apache_scoreboard{state="open_slot"} 246
apache_scoreboard{state="read"} 0
apache_scoreboard{state="reply"} 1
apache_scoreboard{state="startup"} 0

HELP apache_sent_kilobytes_total Current total kbytes sent (*)

TYPE apache_sent_kilobytes_total counter

apache_sent_kilobytes_total 10014

HELP apache_up Could the apache server be reached

TYPE apache_up gauge

apache_up 1

HELP apache_uptime_seconds_total Current uptime in seconds (*)

TYPE apache_uptime_seconds_total counter

apache_uptime_seconds_total 511

HELP apache_workers Apache worker statuses

TYPE apache_workers gauge

apache_workers{state="busy"} 1
apache_workers{state="idle"} 9

HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.

TYPE go_gc_duration_seconds summary

go_gc_duration_seconds{quantile="0"} 5.279e-05
go_gc_duration_seconds{quantile="0.25"} 9.7793e-05
go_gc_duration_seconds{quantile="0.5"} 0.000130702
go_gc_duration_seconds{quantile="0.75"} 0.000184945
go_gc_duration_seconds{quantile="1"} 0.001319342
go_gc_duration_seconds_sum 0.032344671
go_gc_duration_seconds_count 190

HELP go_goroutines Number of goroutines that currently exist.

TYPE go_goroutines gauge

go_goroutines 10

HELP go_info Information about the Go environment.

TYPE go_info gauge

go_info{version="go1.16.6"} 1

HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.

TYPE go_memstats_alloc_bytes gauge

go_memstats_alloc_bytes 3.339904e+06

HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.

TYPE go_memstats_alloc_bytes_total counter

go_memstats_alloc_bytes_total 3.39699632e+08

HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.

TYPE go_memstats_buck_hash_sys_bytes gauge

go_memstats_buck_hash_sys_bytes 1.465925e+06

HELP go_memstats_frees_total Total number of frees.

TYPE go_memstats_frees_total counter

go_memstats_frees_total 1.283222e+06

HELP go_memstats_gc_cpu_fraction The fraction of this program's available CPU time used by the GC since the program started.

TYPE go_memstats_gc_cpu_fraction gauge

go_memstats_gc_cpu_fraction 3.766245653547419e-06

HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.

TYPE go_memstats_gc_sys_bytes gauge

go_memstats_gc_sys_bytes 4.91332e+06

HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.

TYPE go_memstats_heap_alloc_bytes gauge

go_memstats_heap_alloc_bytes 3.339904e+06

HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.

TYPE go_memstats_heap_idle_bytes gauge

go_memstats_heap_idle_bytes 6.1923328e+07

HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.

TYPE go_memstats_heap_inuse_bytes gauge

go_memstats_heap_inuse_bytes 4.46464e+06

HELP go_memstats_heap_objects Number of allocated objects.

TYPE go_memstats_heap_objects gauge

go_memstats_heap_objects 5060

HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.

TYPE go_memstats_heap_released_bytes gauge

go_memstats_heap_released_bytes 6.0194816e+07

HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.

TYPE go_memstats_heap_sys_bytes gauge

go_memstats_heap_sys_bytes 6.6387968e+07

HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.

TYPE go_memstats_last_gc_time_seconds gauge

go_memstats_last_gc_time_seconds 1.6342125720429206e+09

HELP go_memstats_lookups_total Total number of pointer lookups.

TYPE go_memstats_lookups_total counter

go_memstats_lookups_total 0

HELP go_memstats_mallocs_total Total number of mallocs.

TYPE go_memstats_mallocs_total counter

go_memstats_mallocs_total 1.288282e+06

HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.

TYPE go_memstats_mcache_inuse_bytes gauge

go_memstats_mcache_inuse_bytes 4800

HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.

TYPE go_memstats_mcache_sys_bytes gauge

go_memstats_mcache_sys_bytes 16384

HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.

TYPE go_memstats_mspan_inuse_bytes gauge

go_memstats_mspan_inuse_bytes 75480

HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.

TYPE go_memstats_mspan_sys_bytes gauge

go_memstats_mspan_sys_bytes 98304

HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.

TYPE go_memstats_next_gc_bytes gauge

go_memstats_next_gc_bytes 5.897232e+06

HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.

TYPE go_memstats_other_sys_bytes gauge

go_memstats_other_sys_bytes 929051

HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.

TYPE go_memstats_stack_inuse_bytes gauge

go_memstats_stack_inuse_bytes 720896

HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.

TYPE go_memstats_stack_sys_bytes gauge

go_memstats_stack_sys_bytes 720896

HELP go_memstats_sys_bytes Number of bytes obtained from system.

TYPE go_memstats_sys_bytes gauge

go_memstats_sys_bytes 7.4531848e+07

HELP go_threads Number of OS threads created.

TYPE go_threads gauge

go_threads 10

HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.

TYPE process_cpu_seconds_total counter

process_cpu_seconds_total 6.54

HELP process_max_fds Maximum number of open file descriptors.

TYPE process_max_fds gauge

process_max_fds 1024

HELP process_open_fds Number of open file descriptors.

TYPE process_open_fds gauge

process_open_fds 10

HELP process_resident_memory_bytes Resident memory size in bytes.

TYPE process_resident_memory_bytes gauge

process_resident_memory_bytes 1.5773696e+07

HELP process_start_time_seconds Start time of the process since unix epoch in seconds.

TYPE process_start_time_seconds gauge

process_start_time_seconds 1.63419064345e+09

HELP process_virtual_memory_bytes Virtual memory size in bytes.

TYPE process_virtual_memory_bytes gauge

process_virtual_memory_bytes 7.31385856e+08

HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.

TYPE process_virtual_memory_max_bytes gauge

process_virtual_memory_max_bytes -1

HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.

TYPE promhttp_metric_handler_requests_in_flight gauge

promhttp_metric_handler_requests_in_flight 1

HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.

TYPE promhttp_metric_handler_requests_total counter

promhttp_metric_handler_requests_total{code="200"} 778
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

But metrics

HELP apache_duration_ms_total Total duration of all registered requests

TYPE apache_duration_ms_total gauge

are not displayed
httpd.x86_64 2.4.6 version
On status page :
SrvPIDAccMCPUSSReqConnChildSlotClientVHostRequest0-0262760/57/57_0.05250.01.071.0710.244.43.28s-msk-v-jf-aap1:443GET /artifactory/api/system/ping HTTP/1.11-0-0/0/45.0.039400.00.001.14127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8OPTIONS * HTTP/1.02-0262780/14/14_0.02440.00.010.0110.244.43.29s-msk-v-jf-aap1:443GET /artifactory/api/system/ping HTTP/1.13-0262790/45/45W0.04000.01.181.18127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8GET /server-status HTTP/1.14-02628024/26/26K0.011311.40.010.0110.244.43.30s-msk-v-jf-aap1:443GET //xray/api/v1/system/ping HTTP/1.15-0-0/0/43.0.039600.00.000.75127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8OPTIONS * HTTP/1.06-0263411/51/51K0.07210.93.463.4610.244.43.30s-msk-v-jf-aap1:443GET /server-status/?auto HTTP/1.17-0-0/0/50.0.059500.00.001.52127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8OPTIONS * HTTP/1.08-0265280/8/8_0.01960.00.010.0110.244.43.29s-msk-v-jf-aap1:443GET /artifactory/api/system/ping HTTP/1.19-0265300/8/8_0.00740.00.010.0110.244.43.28s-msk-v-jf-aap1:443GET /artifactory/api/system/ping HTTP/1.110-0265313/21/21K0.0141212.10.140.1410.243.87.132s-msk-v-jf-aap1:443GET /ui/api/v1/ui/storagesummary/projects HTTP/1.111-0265360/8/8_0.001240.00.020.0210.244.43.28s-msk-v-jf-aap1:443GET /artifactory/api/system/ping HTTP/1.112-0265371/10/10K0.01310.90.030.0310.244.43.30s-msk-v-jf-aap1:443GET /server-status/?auto HTTP/1.113-0-0/0/9.0.008100.00.000.04127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8OPTIONS * HTTP/1.014-0265390/4/4_0.00910.00.000.00127.0.0.1s-msk-v-jf-aap1.raiffeisen.ru:8NULL

is this still an issue?

@Lusitaniae I think I'm having a similar issue.

None of the expected metrics exist.

I am installing by
wget https://github.com/Lusitaniae/apache_exporter/releases/download/v1.0.1/apache_exporter-1.0.1.linux-amd64.tar.gz
tar xvfz apache_exporter-1.0.1.linux-amd64.tar.gz
cp apache_exporter-1.0.1.linux-amd64/apache_exporter /usr/local/bin/

rather than building from go.

would that cause this issue?

My output is:

`# HELP apache_exporter_build_info A metric with a constant '1' value labeled by version, revision, branch, goversion from which apache_exporter was built, and the goos and goarch for the build.

TYPE apache_exporter_build_info gauge

apache_exporter_build_info{branch="HEAD",goarch="amd64",goos="linux",goversion="go1.19.11",revision="92eeaa4d50aea1ba26b0392534a7b33fd19c9002",tags="netgo",version="1.0.1"} 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 1303

HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.

TYPE go_gc_duration_seconds summary

go_gc_duration_seconds{quantile="0"} 6.6859e-05
go_gc_duration_seconds{quantile="0.25"} 0.000177412
go_gc_duration_seconds{quantile="0.5"} 0.000275214
go_gc_duration_seconds{quantile="0.75"} 0.000439931
go_gc_duration_seconds{quantile="1"} 0.010819656
go_gc_duration_seconds_sum 0.098762856
go_gc_duration_seconds_count 145

HELP go_goroutines Number of goroutines that currently exist.

TYPE go_goroutines gauge

go_goroutines 12

HELP go_info Information about the Go environment.

TYPE go_info gauge

go_info{version="go1.19.11"} 1

HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.

TYPE go_memstats_alloc_bytes gauge

go_memstats_alloc_bytes 5.784288e+06

HELP go_memstats_alloc_bytes_total Total number of bytes allocated, even if freed.

TYPE go_memstats_alloc_bytes_total counter

go_memstats_alloc_bytes_total 3.38701712e+08

HELP go_memstats_buck_hash_sys_bytes Number of bytes used by the profiling bucket hash table.

TYPE go_memstats_buck_hash_sys_bytes gauge

go_memstats_buck_hash_sys_bytes 4622

HELP go_memstats_frees_total Total number of frees.

TYPE go_memstats_frees_total counter

go_memstats_frees_total 1.035826e+06

HELP go_memstats_gc_sys_bytes Number of bytes used for garbage collection system metadata.

TYPE go_memstats_gc_sys_bytes gauge

go_memstats_gc_sys_bytes 9.169136e+06

HELP go_memstats_heap_alloc_bytes Number of heap bytes allocated and still in use.

TYPE go_memstats_heap_alloc_bytes gauge

go_memstats_heap_alloc_bytes 5.784288e+06

HELP go_memstats_heap_idle_bytes Number of heap bytes waiting to be used.

TYPE go_memstats_heap_idle_bytes gauge

go_memstats_heap_idle_bytes 7.74144e+06

HELP go_memstats_heap_inuse_bytes Number of heap bytes that are in use.

TYPE go_memstats_heap_inuse_bytes gauge

go_memstats_heap_inuse_bytes 8.183808e+06

HELP go_memstats_heap_objects Number of allocated objects.

TYPE go_memstats_heap_objects gauge

go_memstats_heap_objects 7526

HELP go_memstats_heap_released_bytes Number of heap bytes released to OS.

TYPE go_memstats_heap_released_bytes gauge

go_memstats_heap_released_bytes 6.823936e+06

HELP go_memstats_heap_sys_bytes Number of heap bytes obtained from system.

TYPE go_memstats_heap_sys_bytes gauge

go_memstats_heap_sys_bytes 1.5925248e+07

HELP go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection.

TYPE go_memstats_last_gc_time_seconds gauge

go_memstats_last_gc_time_seconds 1.6916984190505316e+09

HELP go_memstats_lookups_total Total number of pointer lookups.

TYPE go_memstats_lookups_total counter

go_memstats_lookups_total 0

HELP go_memstats_mallocs_total Total number of mallocs.

TYPE go_memstats_mallocs_total counter

go_memstats_mallocs_total 1.043352e+06

HELP go_memstats_mcache_inuse_bytes Number of bytes in use by mcache structures.

TYPE go_memstats_mcache_inuse_bytes gauge

go_memstats_mcache_inuse_bytes 4800

HELP go_memstats_mcache_sys_bytes Number of bytes used for mcache structures obtained from system.

TYPE go_memstats_mcache_sys_bytes gauge

go_memstats_mcache_sys_bytes 15600

HELP go_memstats_mspan_inuse_bytes Number of bytes in use by mspan structures.

TYPE go_memstats_mspan_inuse_bytes gauge

go_memstats_mspan_inuse_bytes 96336

HELP go_memstats_mspan_sys_bytes Number of bytes used for mspan structures obtained from system.

TYPE go_memstats_mspan_sys_bytes gauge

go_memstats_mspan_sys_bytes 113904

HELP go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place.

TYPE go_memstats_next_gc_bytes gauge

go_memstats_next_gc_bytes 8.508576e+06

HELP go_memstats_other_sys_bytes Number of bytes used for other system allocations.

TYPE go_memstats_other_sys_bytes gauge

go_memstats_other_sys_bytes 935730

HELP go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator.

TYPE go_memstats_stack_inuse_bytes gauge

go_memstats_stack_inuse_bytes 819200

HELP go_memstats_stack_sys_bytes Number of bytes obtained from system for stack allocator.

TYPE go_memstats_stack_sys_bytes gauge

go_memstats_stack_sys_bytes 819200

HELP go_memstats_sys_bytes Number of bytes obtained from system.

TYPE go_memstats_sys_bytes gauge

go_memstats_sys_bytes 2.698344e+07

HELP go_threads Number of OS threads created.

TYPE go_threads gauge

go_threads 10

HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.

TYPE process_cpu_seconds_total counter

process_cpu_seconds_total 8.42

HELP process_max_fds Maximum number of open file descriptors.

TYPE process_max_fds gauge

process_max_fds 4096

HELP process_open_fds Number of open file descriptors.

TYPE process_open_fds gauge

process_open_fds 12

HELP process_resident_memory_bytes Resident memory size in bytes.

TYPE process_resident_memory_bytes gauge

process_resident_memory_bytes 1.5323136e+07

HELP process_start_time_seconds Start time of the process since unix epoch in seconds.

TYPE process_start_time_seconds gauge

process_start_time_seconds 1.69161153218e+09

HELP process_virtual_memory_bytes Virtual memory size in bytes.

TYPE process_virtual_memory_bytes gauge

process_virtual_memory_bytes 7.39160064e+08

HELP process_virtual_memory_max_bytes Maximum amount of virtual memory available in bytes.

TYPE process_virtual_memory_max_bytes gauge

process_virtual_memory_max_bytes 1.8446744073709552e+19

HELP promhttp_metric_handler_requests_in_flight Current number of scrapes being served.

TYPE promhttp_metric_handler_requests_in_flight gauge

promhttp_metric_handler_requests_in_flight 1

HELP promhttp_metric_handler_requests_total Total number of scrapes by HTTP status code.

TYPE promhttp_metric_handler_requests_total counter

promhttp_metric_handler_requests_total{code="200"} 1302
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0
`