Monitoring
Required roles
admin
Monitoring is realized via Prometheus and can be visualized e.g. with Grafana.
- Prometheus Endpoint:
/metrics
(e.g. https://platform.lobaro.com/metrics) - Authorization: Bearer Token can be created at
Configuration → Admin Tokens
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
Name | Type | Description |
---|---|---|
coap_request_duration_seconds | Histogram | |
go_gc_duration | Histogram | |
go_goroutines | Counter | |
go_info | States 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_seconds | Histogram | |
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 | ||
up | Gauge |
Useful Queries
Query | Type | Description |
---|---|---|
rate(graphql_request_duration_seconds_sum{job="$Instance"}[1m]) / (rate(graphql_request_duration_seconds_count{job="$Instance"}[1m]) + 0.000001) * 1000 | Graph | GraphQL Response Time |
rate(graphql_resolver_duration_seconds_sum{job="$Instance"}[1m]) / (rate(graphql_resolver_duration_seconds_count{job="$Instance"}[1m]) + 0.000001) * 1000 | Graph | GraphQL Resolver Time |
rate(parser_runtime_seconds_sum{job="$Instance"}[60s]) / (rate(parser_runtime_seconds_count{job="$Instance"}[60s]) + 0.0001) * 1000 | Graph | Parser Run Time |
rate(mbus_apiAccessCounter{job="$Instance"}[1m]) * 60 | Graph | MBUS API calls per minute |
rate(coap_request_duration_seconds_sum{job="$Instance"}[1m]) / (rate(coap_request_duration_seconds_count{job="$Instance"}[1m]) + 0.000001) | Graph | COAP Response Times |
rate(mqtt_publish_errors{job="$Instance"}[1m]) * 60 | Graph | Integrations calls per minute |
rate(mqtt_publish_successfully{job="$Instance"}[1m]) * 60 | Graph | |
rate(http_publish_successfully{job="$Instance"}[1m]) * 60 | Graph | |
rate(http_publish_errors{job="$Instance"}[1m]) * 60 | Graph | |
rate(coap_request_duration_seconds_count{job="$Instance"}[1m]) * 60 | Graph | Sum COAP Calls per minute |
go_memstats_alloc_bytes{job="$Instance"} + go_memstats_stack_inuse_bytes{job="$Instance"} | Graph | Memory Usage: Heap + Stack |
go_memstats_sys_bytes{job="$Instance"} | Graph | Memory Usage:System Memory |
go_memstats_alloc_bytes{job="$Instance"} | Graph | Memory Usage:Heap |