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

Error can not get full metrics with phpfpm_up is 0 #321

Open
mercy-thuyle opened this issue Sep 19, 2023 · 2 comments
Open

Error can not get full metrics with phpfpm_up is 0 #321

mercy-thuyle opened this issue Sep 19, 2023 · 2 comments

Comments

@mercy-thuyle
Copy link

mercy-thuyle commented Sep 19, 2023

I try to run the exporter as a systemd process which runs the binary as root. I also using my prometheous with [endpoint] of my local server like this (http://172.17.71.175:9253/metrics)

[Unit]
Description=php-fpm_exporter
Wants=network-online.target
After=network-online.target

[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/local/bin/php-fpm_exporter server --config /etc/php-fpm_exporter/php-fpm_exporter.yml --phpfpm.scrape-uri "unix:/run/php/php8.2-fpm:sock;/status" --log.level=debug

[Install]
WantedBy=multi-user.target

I try curl that endpoint and saw the failure like this:

curl http://172.17.72.216:9253/metrics
# HELP go_gc_cycles_automatic_gc_cycles_total Count of completed GC cycles generated by the Go runtime.
# TYPE go_gc_cycles_automatic_gc_cycles_total counter
go_gc_cycles_automatic_gc_cycles_total 0
# HELP go_gc_cycles_forced_gc_cycles_total Count of completed GC cycles forced by the application.
# TYPE go_gc_cycles_forced_gc_cycles_total counter
go_gc_cycles_forced_gc_cycles_total 0
# HELP go_gc_cycles_total_gc_cycles_total Count of all completed GC cycles.
# TYPE go_gc_cycles_total_gc_cycles_total counter
go_gc_cycles_total_gc_cycles_total 0
# 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"} 0
go_gc_duration_seconds{quantile="0.25"} 0
go_gc_duration_seconds{quantile="0.5"} 0
go_gc_duration_seconds{quantile="0.75"} 0
go_gc_duration_seconds{quantile="1"} 0
go_gc_duration_seconds_sum 0
go_gc_duration_seconds_count 0
# HELP go_gc_heap_allocs_by_size_bytes_total Distribution of heap allocations by approximate size. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.
# TYPE go_gc_heap_allocs_by_size_bytes_total histogram
go_gc_heap_allocs_by_size_bytes_total_bucket{le="8.999999999999998"} 2048
go_gc_heap_allocs_by_size_bytes_total_bucket{le="24.999999999999996"} 9555
go_gc_heap_allocs_by_size_bytes_total_bucket{le="64.99999999999999"} 14027
go_gc_heap_allocs_by_size_bytes_total_bucket{le="144.99999999999997"} 17552
go_gc_heap_allocs_by_size_bytes_total_bucket{le="320.99999999999994"} 18803
go_gc_heap_allocs_by_size_bytes_total_bucket{le="704.9999999999999"} 19267
go_gc_heap_allocs_by_size_bytes_total_bucket{le="1536.9999999999998"} 19450
go_gc_heap_allocs_by_size_bytes_total_bucket{le="3200.9999999999995"} 19512
go_gc_heap_allocs_by_size_bytes_total_bucket{le="6528.999999999999"} 19625
go_gc_heap_allocs_by_size_bytes_total_bucket{le="13568.999999999998"} 19659
go_gc_heap_allocs_by_size_bytes_total_bucket{le="27264.999999999996"} 19677
go_gc_heap_allocs_by_size_bytes_total_bucket{le="+Inf"} 19682
go_gc_heap_allocs_by_size_bytes_total_sum 2.949176e+06
go_gc_heap_allocs_by_size_bytes_total_count 19682
# HELP go_gc_heap_allocs_bytes_total Cumulative sum of memory allocated to the heap by the application.
# TYPE go_gc_heap_allocs_bytes_total counter
go_gc_heap_allocs_bytes_total 2.949176e+06
# HELP go_gc_heap_allocs_objects_total Cumulative count of heap allocations triggered by the application. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.
# TYPE go_gc_heap_allocs_objects_total counter
go_gc_heap_allocs_objects_total 19682
# HELP go_gc_heap_frees_by_size_bytes_total Distribution of freed heap allocations by approximate size. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.
# TYPE go_gc_heap_frees_by_size_bytes_total histogram
go_gc_heap_frees_by_size_bytes_total_bucket{le="8.999999999999998"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="24.999999999999996"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="64.99999999999999"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="144.99999999999997"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="320.99999999999994"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="704.9999999999999"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="1536.9999999999998"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="3200.9999999999995"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="6528.999999999999"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="13568.999999999998"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="27264.999999999996"} 0
go_gc_heap_frees_by_size_bytes_total_bucket{le="+Inf"} 0
go_gc_heap_frees_by_size_bytes_total_sum 0
go_gc_heap_frees_by_size_bytes_total_count 0
# HELP go_gc_heap_frees_bytes_total Cumulative sum of heap memory freed by the garbage collector.
# TYPE go_gc_heap_frees_bytes_total counter
go_gc_heap_frees_bytes_total 0
# HELP go_gc_heap_frees_objects_total Cumulative count of heap allocations whose storage was freed by the garbage collector. Note that this does not include tiny objects as defined by /gc/heap/tiny/allocs:objects, only tiny blocks.
# TYPE go_gc_heap_frees_objects_total counter
go_gc_heap_frees_objects_total 0
# HELP go_gc_heap_goal_bytes Heap size target for the end of the GC cycle.
# TYPE go_gc_heap_goal_bytes gauge
go_gc_heap_goal_bytes 4.473924e+06
# HELP go_gc_heap_objects_objects Number of objects, live or unswept, occupying heap memory.
# TYPE go_gc_heap_objects_objects gauge
go_gc_heap_objects_objects 19682
# HELP go_gc_heap_tiny_allocs_objects_total Count of small allocations that are packed together into blocks. These allocations are counted separately from other allocations because each individual allocation is not tracked by the runtime, only their block. Each block is already accounted for in allocs-by-size and frees-by-size.
# TYPE go_gc_heap_tiny_allocs_objects_total counter
go_gc_heap_tiny_allocs_objects_total 724
# HELP go_gc_pauses_seconds_total Distribution individual GC-related stop-the-world pause latencies.
# TYPE go_gc_pauses_seconds_total histogram
go_gc_pauses_seconds_total_bucket{le="-5e-324"} 0
go_gc_pauses_seconds_total_bucket{le="9.999999999999999e-10"} 0
go_gc_pauses_seconds_total_bucket{le="9.999999999999999e-09"} 0
go_gc_pauses_seconds_total_bucket{le="9.999999999999998e-08"} 0
go_gc_pauses_seconds_total_bucket{le="1.0239999999999999e-06"} 0
go_gc_pauses_seconds_total_bucket{le="1.0239999999999999e-05"} 0
go_gc_pauses_seconds_total_bucket{le="0.00010239999999999998"} 0
go_gc_pauses_seconds_total_bucket{le="0.0010485759999999998"} 0
go_gc_pauses_seconds_total_bucket{le="0.010485759999999998"} 0
go_gc_pauses_seconds_total_bucket{le="0.10485759999999998"} 0
go_gc_pauses_seconds_total_bucket{le="+Inf"} 0
go_gc_pauses_seconds_total_sum NaN
go_gc_pauses_seconds_total_count 0
# HELP go_goroutines Number of goroutines that currently exist.
# TYPE go_goroutines gauge
go_goroutines 8
# HELP go_info Information about the Go environment.
# TYPE go_info gauge
go_info{version="go1.17.10"} 1
# HELP go_memory_classes_heap_free_bytes Memory that is completely free and eligible to be returned to the underlying system, but has not been. This metric is the runtime's estimate of free address space that is backed by physical memory.
# TYPE go_memory_classes_heap_free_bytes gauge
go_memory_classes_heap_free_bytes 0
# HELP go_memory_classes_heap_objects_bytes Memory occupied by live objects and dead objects that have not yet been marked free by the garbage collector.
# TYPE go_memory_classes_heap_objects_bytes gauge
go_memory_classes_heap_objects_bytes 2.949176e+06
# HELP go_memory_classes_heap_released_bytes Memory that is completely free and has been returned to the underlying system. This metric is the runtime's estimate of free address space that is still mapped into the process, but is not backed by physical memory.
# TYPE go_memory_classes_heap_released_bytes gauge
go_memory_classes_heap_released_bytes 761856
# HELP go_memory_classes_heap_stacks_bytes Memory allocated from the heap that is reserved for stack space, whether or not it is currently in-use.
# TYPE go_memory_classes_heap_stacks_bytes gauge
go_memory_classes_heap_stacks_bytes 458752
# HELP go_memory_classes_heap_unused_bytes Memory that is reserved for heap objects but is not currently used to hold heap objects.
# TYPE go_memory_classes_heap_unused_bytes gauge
go_memory_classes_heap_unused_bytes 24520
# HELP go_memory_classes_metadata_mcache_free_bytes Memory that is reserved for runtime mcache structures, but not in-use.
# TYPE go_memory_classes_metadata_mcache_free_bytes gauge
go_memory_classes_metadata_mcache_free_bytes 13984
# HELP go_memory_classes_metadata_mcache_inuse_bytes Memory that is occupied by runtime mcache structures that are currently being used.
# TYPE go_memory_classes_metadata_mcache_inuse_bytes gauge
go_memory_classes_metadata_mcache_inuse_bytes 2400
# HELP go_memory_classes_metadata_mspan_free_bytes Memory that is reserved for runtime mspan structures, but not in-use.
# TYPE go_memory_classes_metadata_mspan_free_bytes gauge
go_memory_classes_metadata_mspan_free_bytes 3728
# HELP go_memory_classes_metadata_mspan_inuse_bytes Memory that is occupied by runtime mspan structures that are currently being used.
# TYPE go_memory_classes_metadata_mspan_inuse_bytes gauge
go_memory_classes_metadata_mspan_inuse_bytes 45424
# HELP go_memory_classes_metadata_other_bytes Memory that is reserved for or used to hold runtime metadata.
# TYPE go_memory_classes_metadata_other_bytes gauge
go_memory_classes_metadata_other_bytes 3.647576e+06
# HELP go_memory_classes_os_stacks_bytes Stack memory allocated by the underlying operating system.
# TYPE go_memory_classes_os_stacks_bytes gauge
go_memory_classes_os_stacks_bytes 0
# HELP go_memory_classes_other_bytes Memory used by execution trace buffers, structures for debugging the runtime, finalizer and profiler specials, and more.
# TYPE go_memory_classes_other_bytes gauge
go_memory_classes_other_bytes 561579
# HELP go_memory_classes_profiling_buckets_bytes Memory that is used by the stack trace hash map used for profiling.
# TYPE go_memory_classes_profiling_buckets_bytes gauge
go_memory_classes_profiling_buckets_bytes 4621
# HELP go_memory_classes_total_bytes All memory mapped by the Go runtime into the current process as read-write. Note that this does not include memory mapped by code called via cgo or via the syscall package. Sum of all metrics in /memory/classes.
# TYPE go_memory_classes_total_bytes gauge
go_memory_classes_total_bytes 8.473616e+06
# HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
# TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 2.949176e+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 2.949176e+06
# 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 4621
# HELP go_memstats_frees_total Total number of frees.
# TYPE go_memstats_frees_total counter
go_memstats_frees_total 724
# 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 0
# 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 3.647576e+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 2.949176e+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 761856
# 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 2.973696e+06
# HELP go_memstats_heap_objects Number of allocated objects.
# TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 19682
# 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 761856
# 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 3.735552e+06
# 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 0
# 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 20406
# 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 2400
# 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 45424
# 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 49152
# 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 4.473924e+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 561579
# 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 458752
# 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 458752
# HELP go_memstats_sys_bytes Number of bytes obtained from system.
# TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 8.473616e+06
# HELP go_sched_goroutines_goroutines Count of live goroutines.
# TYPE go_sched_goroutines_goroutines gauge
go_sched_goroutines_goroutines 9
# HELP go_sched_latencies_seconds Distribution of the time goroutines have spent in the scheduler in a runnable state before actually running.
# TYPE go_sched_latencies_seconds histogram
go_sched_latencies_seconds_bucket{le="-5e-324"} 0
go_sched_latencies_seconds_bucket{le="9.999999999999999e-10"} 63
go_sched_latencies_seconds_bucket{le="9.999999999999999e-09"} 63
go_sched_latencies_seconds_bucket{le="9.999999999999998e-08"} 63
go_sched_latencies_seconds_bucket{le="1.0239999999999999e-06"} 65
go_sched_latencies_seconds_bucket{le="1.0239999999999999e-05"} 72
go_sched_latencies_seconds_bucket{le="0.00010239999999999998"} 81
go_sched_latencies_seconds_bucket{le="0.0010485759999999998"} 86
go_sched_latencies_seconds_bucket{le="0.010485759999999998"} 86
go_sched_latencies_seconds_bucket{le="0.10485759999999998"} 86
go_sched_latencies_seconds_bucket{le="+Inf"} 86
go_sched_latencies_seconds_sum NaN
go_sched_latencies_seconds_count 86
# HELP go_threads Number of OS threads created.
# TYPE go_threads gauge
go_threads 7
# HELP phpfpm_scrape_failures The number of failures scraping from PHP-FPM.
# TYPE phpfpm_scrape_failures counter
phpfpm_scrape_failures{pool="",scrape_uri="unix:/run/php/php8.2-fpm:sock;/status"} 9
# HELP phpfpm_up Could PHP-FPM be reached?
# TYPE phpfpm_up gauge
phpfpm_up{pool="",scrape_uri="unix:/run/php/php8.2-fpm:sock;/status"} 0
# HELP process_cpu_seconds_total Total user and system CPU time spent in seconds.
# TYPE process_cpu_seconds_total counter
process_cpu_seconds_total 1.79
# 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 9
# HELP process_resident_memory_bytes Resident memory size in bytes.
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 1.0727424e+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.69327931866e+09
# HELP process_virtual_memory_bytes Virtual memory size in bytes.
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 7.2923136e+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"} 8
promhttp_metric_handler_requests_total{code="500"} 0
promhttp_metric_handler_requests_total{code="503"} 0

Which wrong is that? How can I check and fix it? Thank you so much.

@itcsoft54
Copy link
Contributor

itcsoft54 commented Sep 19, 2023

Hello,
You don't have any log from php-fpm_expoter server ?
It seen like wrong scrap url configuration (path or read write permission) or wrong php-fpm configuration, because you don't any other php-fpm prefixed metric than phpfpm_scrape_failures or phpfpm_up.

Your socket isn't correct, the syntaxe have to be like this : unix:///tmp/php.sock;/status, but you're using unix:/run/php/php8.2-fpm:sock;/status

Try to use this syntaxe instead :
unix:///run/php/php8.2-fpm.sock;/status

@mercy-thuyle
Copy link
Author

mercy-thuyle commented Sep 21, 2023

Hello, thank you for you reply.
I found the log of php-fpm_exporter like this

~ journalctl -u php-fpm_exporter.service
Sep 18 16:55:19 ip-172-17-72-216 php-fpm_exporter[719970]: time="2023-09-18T16:55:19+07:00" level=info msg="Shutting down"
Sep 18 16:55:19 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 18 16:55:19 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 18 16:55:19 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 18 16:55:19 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 18 16:55:19 ip-172-17-72-216 php-fpm_exporter[722985]: time="2023-09-18T16:55:19+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 18 16:55:27 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Current command vanished from the unit file, execution of the command list won't be resumed.
Sep 18 16:55:28 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 18 16:55:28 ip-172-17-72-216 php-fpm_exporter[722985]: time="2023-09-18T16:55:28+07:00" level=error msg="http: Server closed"
Sep 18 16:55:28 ip-172-17-72-216 php-fpm_exporter[722985]: time="2023-09-18T16:55:28+07:00" level=info msg="Shutting down"
Sep 18 16:55:28 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 18 16:55:28 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 18 16:55:28 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 18 16:55:28 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-18T16:55:28+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 10:59:48 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T10:59:48+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file >
Sep 19 10:59:48 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T10:59:48+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file >
Sep 19 10:59:48 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T10:59:48+07:00" level=debug msg="Updated 1 pool(s) in 184.949µs"
Sep 19 10:59:48 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T10:59:48+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock>
Sep 19 11:03:09 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T11:03:09+07:00" level=error msg="http: Server closed"
Sep 19 11:03:09 ip-172-17-72-216 php-fpm_exporter[723031]: time="2023-09-19T11:03:09+07:00" level=info msg="Shutting down"
Sep 19 11:03:09 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 19 11:03:09 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 19 11:03:09 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 19 11:03:09 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 19 11:03:09 ip-172-17-72-216 php-fpm_exporter[747052]: time="2023-09-19T11:03:09+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 11:04:24 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 19 11:04:24 ip-172-17-72-216 php-fpm_exporter[747052]: time="2023-09-19T11:04:24+07:00" level=error msg="http: Server closed"
Sep 19 11:04:24 ip-172-17-72-216 php-fpm_exporter[747052]: time="2023-09-19T11:04:24+07:00" level=info msg="Shutting down"
Sep 19 11:04:24 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 19 11:04:24 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 19 11:04:24 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 19 11:04:24 ip-172-17-72-216 php-fpm_exporter[747100]: Using config file: /etc/php-fpm_exporter/php-fpm_exporter.yml
Sep 19 11:04:24 ip-172-17-72-216 php-fpm_exporter[747100]: time="2023-09-19T11:04:24+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 11:11:10 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 19 11:11:10 ip-172-17-72-216 php-fpm_exporter[747100]: time="2023-09-19T11:11:10+07:00" level=error msg="http: Server closed"
Sep 19 11:11:10 ip-172-17-72-216 php-fpm_exporter[747100]: time="2023-09-19T11:11:10+07:00" level=info msg="Shutting down"
Sep 19 11:11:10 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 19 11:11:10 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 19 11:11:10 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 19 11:11:10 ip-172-17-72-216 php-fpm_exporter[747323]: Using config file: /etc/php-fpm_exporter/php-fpm_exporter.yml
Sep 19 11:11:10 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:11:10+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 11:11:48 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:11:48+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:11:48 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:11:48+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:11:48 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:11:48+07:00" level=debug msg="Updated 1 pool(s) in 183.925µs"
Sep 19 11:11:48 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:11:48+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:15:41 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:15:41+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:15:41 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:15:41+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:15:41 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:15:41+07:00" level=debug msg="Updated 1 pool(s) in 148.417µs"
Sep 19 11:15:41 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:15:41+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:01 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 19 11:30:01 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:30:01+07:00" level=error msg="http: Server closed"
Sep 19 11:30:01 ip-172-17-72-216 php-fpm_exporter[747323]: time="2023-09-19T11:30:01+07:00" level=info msg="Shutting down"
Sep 19 11:30:01 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 19 11:30:01 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 19 11:30:01 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 19 11:30:01 ip-172-17-72-216 php-fpm_exporter[747727]: Using config file: /etc/php-fpm_exporter/php-fpm_exporter.yml
Sep 19 11:30:01 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:01+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 11:30:17 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:17+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:17 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:17+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:17 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:17+07:00" level=debug msg="Updated 1 pool(s) in 231.077µs"
Sep 19 11:30:17 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:17+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:30 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:30+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:30 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:30+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 11:30:30 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:30+07:00" level=debug msg="Updated 1 pool(s) in 146.958µs"
Sep 19 11:30:30 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T11:30:30+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 13:50:58 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Current command vanished from the unit file, execution of the command list won't be resumed.
Sep 19 13:51:02 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T13:51:02+07:00" level=error msg="http: Server closed"
Sep 19 13:51:02 ip-172-17-72-216 systemd[1]: Stopping php-fpm_exporter...
Sep 19 13:51:02 ip-172-17-72-216 php-fpm_exporter[747727]: time="2023-09-19T13:51:02+07:00" level=info msg="Shutting down"
Sep 19 13:51:02 ip-172-17-72-216 systemd[1]: php-fpm_exporter.service: Succeeded.
Sep 19 13:51:02 ip-172-17-72-216 systemd[1]: Stopped php-fpm_exporter.
Sep 19 13:51:02 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 19 13:51:02 ip-172-17-72-216 php-fpm_exporter[750788]: Using config file: /etc/php-fpm_exporter/php-fpm_exporter.yml
Sep 19 13:51:02 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:02+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 19 13:51:02 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:02+07:00" level=info msg="Idle/Active/Total Processes will be calculated by php-fpm_exporter."
Sep 19 13:51:50 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:50+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 13:51:50 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:50+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 19 13:51:50 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:50+07:00" level=debug msg="Updated 1 pool(s) in 980.064µs"
Sep 19 13:51:50 ip-172-17-72-216 php-fpm_exporter[750788]: time="2023-09-19T13:51:50+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"

And afrer I change the path of socket in system file, here is the status:

~ php-fpm_exporter.service - php-fpm_exporter
     Loaded: loaded (/etc/systemd/system/php-fpm_exporter.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2023-09-21 10:39:28 +07; 2min 18s ago
   Main PID: 820462 (php-fpm_exporte)
      Tasks: 7 (limit: 4603)
     Memory: 2.1M
     CGroup: /system.slice/php-fpm_exporter.service
             └─820462 /usr/local/bin/php-fpm_exporter server --config /etc/php-fpm_exporter/php-fpm_exporter.yml --phpfpm.scrape-uri unix:///run/php/php8.2-fpm:sock;/status --phpfpm.fix-process-count=true --log.level=debug

Sep 21 10:39:28 ip-172-17-72-216 systemd[1]: Started php-fpm_exporter.
Sep 21 10:39:28 ip-172-17-72-216 php-fpm_exporter[820462]: Using config file: /etc/php-fpm_exporter/php-fpm_exporter.yml
Sep 21 10:39:28 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:28+07:00" level=info msg="Starting server on :9253 with path /metrics"
Sep 21 10:39:28 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:28+07:00" level=info msg="Idle/Active/Total Processes will be calculated by php-fpm_exporter."
Sep 21 10:39:59 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:59+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 21 10:39:59 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:59+07:00" level=error msg="dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"
Sep 21 10:39:59 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:59+07:00" level=debug msg="Updated 1 pool(s) in 183.174µs"
Sep 21 10:39:59 ip-172-17-72-216 php-fpm_exporter[820462]: time="2023-09-21T10:39:59+07:00" level=error msg="Error scraping PHP-FPM: dial unix /run/php/php8.2-fpm:sock: connect: no such file or directory"

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

No branches or pull requests

2 participants