Skip to main content

Monitoring

Required roles

admin

Monitoring is realized via Prometheus and can be visualized e.g. with Grafana.

Metrics

Types:

  • Counter is a single counter that can only go up
  • Gauge is a single value that can go up and down
  • Histogram has 3 metrics with suffix _bucket, _count and _sum
NameTypeDescription
coap_request_duration_secondsHistogram
go_gc_durationHistogram
go_goroutinesCounter
go_infoStates the go release version
go_memstats_alloc_bytes
go_memstats_alloc_bytes_total
go_memstats_buck_hash_sys_bytes
go_memstats_frees_total
go_memstats_gc_cpu_fraction
go_memstats_gc_sys_bytes
go_memstats_heap_alloc_bytes
go_memstats_heap_idle_bytes
go_memstats_heap_inuse_bytes
go_memstats_heap_objects
go_memstats_heap_released_bytes
go_memstats_heap_sys_bytes
go_memstats_last_gc_time_seconds
go_memstats_lookups_total
go_memstats_mallocs_total
go_memstats_mcache_inuse_bytes
go_memstats_mcache_sys_bytes
go_memstats_mspan_inuse_bytes
go_memstats_mspan_sys_bytes
go_memstats_next_gc_bytes
go_memstats_other_sys_bytes
go_memstats_stack_inuse_bytes
go_memstats_stack_sys_bytes
go_memstats_sys_bytes
go_threads
http_publish_errors
http_publish_successfully
mbus_apiAccessCounter
mqtt_publish_errors
mqtt_publish_successfully
parser_runtime_secondsHistogram
process_cpu_seconds_total
process_max_fds
process_open_fds
process_resident_memory_bytes
process_start_time_seconds
process_virtual_memory_bytes
process_virtual_memory_max_bytes
promhttp_metric_handler_requests_in_flight
promhttp_metric_handler_requests_total
scrape_duration_seconds
scrape_samples_post_metric_relabeling
scrape_samples_scraped
scrape_series_added
upGauge

Useful Queries

QueryTypeDescription
rate(graphql_request_duration_seconds_sum{job="$Instance"}[1m]) / (rate(graphql_request_duration_seconds_count{job="$Instance"}[1m]) + 0.000001) * 1000GraphGraphQL Response Time
rate(graphql_resolver_duration_seconds_sum{job="$Instance"}[1m]) / (rate(graphql_resolver_duration_seconds_count{job="$Instance"}[1m]) + 0.000001) * 1000GraphGraphQL Resolver Time
rate(parser_runtime_seconds_sum{job="$Instance"}[60s]) / (rate(parser_runtime_seconds_count{job="$Instance"}[60s]) + 0.0001) * 1000GraphParser Run Time
rate(mbus_apiAccessCounter{job="$Instance"}[1m]) * 60GraphMBUS API calls per minute
rate(coap_request_duration_seconds_sum{job="$Instance"}[1m]) / (rate(coap_request_duration_seconds_count{job="$Instance"}[1m]) + 0.000001)GraphCOAP Response Times
rate(mqtt_publish_errors{job="$Instance"}[1m]) * 60GraphIntegrations calls per minute
rate(mqtt_publish_successfully{job="$Instance"}[1m]) * 60Graph
rate(http_publish_successfully{job="$Instance"}[1m]) * 60Graph
rate(http_publish_errors{job="$Instance"}[1m]) * 60Graph
rate(coap_request_duration_seconds_count{job="$Instance"}[1m]) * 60GraphSum COAP Calls per minute
go_memstats_alloc_bytes{job="$Instance"} + go_memstats_stack_inuse_bytes{job="$Instance"}GraphMemory Usage: Heap + Stack
go_memstats_sys_bytes{job="$Instance"}GraphMemory Usage:System Memory
go_memstats_alloc_bytes{job="$Instance"}GraphMemory Usage:Heap