Closed charlie-charlie closed 5 years ago
Basically, all following metrics missing: counterKeyMetrics = map[string]string{ "$SYS/broker/bytes/received": "The total number of bytes received since the broker started.", "$SYS/broker/bytes/sent": "The total number of bytes sent since the broker started.", "$SYS/broker/messages/received": "The total number of messages of any type received since the broker started.", "$SYS/broker/messages/sent": "The total number of messages of any type sent since the broker started.", "$SYS/broker/publish/bytes/received": "The total number of PUBLISH bytes received since the broker started.", "$SYS/broker/publish/bytes/sent": "The total number of PUBLISH bytes sent since the broker started.", "$SYS/broker/publish/messages/received": "The total number of PUBLISH messages received since the broker started.", "$SYS/broker/publish/messages/sent": "The total number of PUBLISH messages sent since the broker started.", "$SYS/broker/publish/messages/dropped": "The total number of PUBLISH messages that have been dropped due to inflight/queuing limits.", "$SYS/broker/uptime": "The total number of seconds since the broker started.", "$SYS/broker/clients/maximum": "The maximum number of clients connected simultaneously since the broker started", "$SYS/broker/clients/total": "The total number of clients connected since the broker started.",
thanks
Where is your mosquitto running? Did you specify the flag "--endpoint"?
It is working and working perfectly. it was my bad when I ran docker command with wrong syntax. I should comment this thread early. thanks again.
my docker running: sudo docker logs -f 25baf2f8d6b0 2019/03/26 20:50:05 Starting mosquitto_broker 0.5.0 (122a6dd), go1.11 2019/03/26 20:50:05 Listening on 0.0.0.0:9234... ^C but curl output doesn't have any mosquitto related metrics. Does anyone have any clue? thx!!!
curl localhost:9234/metrics
HELP go_gc_duration_seconds A summary of the GC invocation durations.
TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 6.4097e-05 go_gc_duration_seconds{quantile="0.25"} 8.333e-05 go_gc_duration_seconds{quantile="0.5"} 9.154e-05 go_gc_duration_seconds{quantile="0.75"} 0.000101585 go_gc_duration_seconds{quantile="1"} 0.000273718 go_gc_duration_seconds_sum 0.012934772 go_gc_duration_seconds_count 135
HELP go_goroutines Number of goroutines that currently exist.
TYPE go_goroutines gauge
go_goroutines 12
HELP go_memstats_alloc_bytes Number of bytes allocated and still in use.
TYPE go_memstats_alloc_bytes gauge
go_memstats_alloc_bytes 2.47416e+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.7431448e+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.453515e+06
HELP go_memstats_frees_total Total number of frees.
TYPE go_memstats_frees_total counter
go_memstats_frees_total 529392
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 2.371584e+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.47416e+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.2644224e+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 3.448832e+06
HELP go_memstats_heap_objects Number of allocated objects.
TYPE go_memstats_heap_objects gauge
go_memstats_heap_objects 3366
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 958464
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.6093056e+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.5537113622319465e+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 532758
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 13824
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 32832
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 65536
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.194304e+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 1.792813e+06
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 1.015808e+06
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 1.015808e+06
HELP go_memstats_sys_bytes Number of bytes obtained from system.
TYPE go_memstats_sys_bytes gauge
go_memstats_sys_bytes 7.2808696e+07
HELP go_threads Number of OS threads created
TYPE go_threads gauge
go_threads 16
HELP http_request_duration_microseconds The HTTP request latencies in microseconds.
TYPE http_request_duration_microseconds summary
http_request_duration_microseconds{handler="prometheus",quantile="0.5"} 1100.171 http_request_duration_microseconds{handler="prometheus",quantile="0.9"} 1531.711 http_request_duration_microseconds{handler="prometheus",quantile="0.99"} 1537.143 http_request_duration_microseconds_sum{handler="prometheus"} 510585.29800000007 http_request_duration_microseconds_count{handler="prometheus"} 428
HELP http_request_size_bytes The HTTP request sizes in bytes.
TYPE http_request_size_bytes summary
http_request_size_bytes{handler="prometheus",quantile="0.5"} 213 http_request_size_bytes{handler="prometheus",quantile="0.9"} 213 http_request_size_bytes{handler="prometheus",quantile="0.99"} 213 http_request_size_bytes_sum{handler="prometheus"} 87718 http_request_size_bytes_count{handler="prometheus"} 428
HELP http_requests_total Total number of HTTP requests made.
TYPE http_requests_total counter
http_requests_total{code="200",handler="prometheus",method="get"} 428
HELP http_response_size_bytes The HTTP response sizes in bytes.
TYPE http_response_size_bytes summary
http_response_size_bytes{handler="prometheus",quantile="0.5"} 1450 http_response_size_bytes{handler="prometheus",quantile="0.9"} 1459 http_response_size_bytes{handler="prometheus",quantile="0.99"} 6725 http_response_size_bytes_sum{handler="prometheus"} 736369 http_response_size_bytes_count{handler="prometheus"} 428
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.07
HELP process_max_fds Maximum number of open file descriptors.
TYPE process_max_fds gauge
process_max_fds 1.048576e+06
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.9488768e+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.5536334051e+09
HELP process_virtual_memory_bytes Virtual memory size in bytes.
TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 1.14618368e+08