newrelic / nri-varnish

New Relic Varnish Integration
MIT License
3 stars 10 forks source link

Add Missing MSE Metrics from varnishstat to Integration #97

Open stsurankov opened 3 months ago

stsurankov commented 3 months ago

Description

It appears that the current version of the integration does not retrieve all available MSE metrics from varnishstat. Only a subset of metrics seems to be present, as listed here: metric_definitions.go#L189-L222.

The following command shows all the MSE metrics that varnishstat provides: varnishstat -1 | grep -e MSE.

Sample Output:

MSE.mse.c_req Allocator requests
MSE.mse.c_fail Allocator failures
MSE.mse.c_fail_malloc System allocator failures
MSE.mse.c_bytes Bytes allocated
MSE.mse.c_freed Bytes freed
MSE.mse.g_alloc Allocations outstanding
MSE.mse.g_bytes Bytes outstanding
MSE.mse.g_space Bytes available
MSE.mse.n_lru_nuked Number of LRU nuked objects
MSE.mse.n_lru_moved Number of LRU move operations
MSE.mse.n_vary Number of Vary header keys
MSE.mse.c_memcache_hit Stored objects cache hits
MSE.mse.c_memcache_miss Stored objects cache misses
MSE.mse.g_ykey_keys Number of YKeys registered
MSE.mse.c_ykey_purged Number of objects purged with YKey
MSE.mse.c_ykey_purged_slicer Number of slicer objects purged with YKey
MSE_BOOK.book.n_vary Number of Vary header keys
MSE_BOOK.book.g_bytes Number of bytes used in the book database.
MSE_BOOK.book.g_space Number of bytes available in the book database.
MSE_BOOK.book.g_waterlevel_queue Number of threads queued waiting for database space
MSE_BOOK.book.c_waterlevel_queue Number of times a thread has been queued waiting for database space
MSE_BOOK.book.c_waterlevel_runs Number of times the waterlevel purge thread was activated
MSE_BOOK.book.c_waterlevel_purge Number of objects purged to achieve database waterlevel
MSE_BOOK.book.c_insert_timeout Number of times database object insertion timed out
MSE_BOOK.book.g_banlist_bytes Number of bytes used from the banlist journal file
MSE_BOOK.book.g_banlist_space Number of bytes available in the banlist journal file
MSE_BOOK.book.g_banlist_database Number of bytes used in the database for persisted bans
MSE_STORE.store.n_lru_moved Number of LRU move operations
MSE_STORE.store.g_aio_running Number AIO operations currently running
MSE_STORE.store.g_aio_running_read Number AIO read operations currently running
MSE_STORE.store.g_aio_running_write Number AIO write operations currently running
MSE_STORE.store.g_aio_running_bytes Number AIO bytes currently running
MSE_STORE.store.g_aio_running_bytes_read Number AIO read bytes currently running
MSE_STORE.store.g_aio_running_bytes_write Number AIO write bytes currently running
MSE_STORE.store.c_aio_finished Number AIO operations executed
MSE_STORE.store.c_aio_finished_read Number AIO read operations executed
MSE_STORE.store.c_aio_finished_write Number AIO write operations executed
MSE_STORE.store.c_aio_finished_bytes Number AIO bytes executed
MSE_STORE.store.c_aio_finished_bytes_read Number AIO read bytes executed
MSE_STORE.store.c_aio_finished_bytes_write Number AIO write bytes executed
MSE_STORE.store.g_aio_queue Number of threads queued for AIO
MSE_STORE.store.g_aio_queue_read Number of threads queued for AIO read
MSE_STORE.store.g_aio_queue_write Number of threads queued for AIO write
MSE_STORE.store.c_aio_queue Number of times a thread has been queued for AIO
MSE_STORE.store.c_aio_queue_read Number of times a thread has been queued for AIO read
MSE_STORE.store.c_aio_queue_write Number of times a thread has been queued for AIO write
MSE_STORE.store.c_aio_write_queue_overflow Number of times objects have not been stored due to queue length.
MSE_STORE.store.g_database_queue Number of threads queued for database handle.
MSE_STORE.store.g_waterlevel_queue Number of threads queued waiting for store space
MSE_STORE.store.c_waterlevel_queue Number of times a thread has been queued waiting for store space
MSE_STORE.store.c_waterlevel_purge Number of objects purged to achieve store waterlevel
MSE_STORE.store.g_objects Number of objects in the store
MSE_STORE.store.g_ykey_keys Number of YKeys registered
MSE_STORE.store.c_ykey_purged Number of objects purged with YKey
MSE_STORE.store.c_ykey_purged_slicer Number of slicer objects purged with YKey
MSE_STORE.store.g_alloc_extents Total number of allocation extents
MSE_STORE.store.g_alloc_bytes Total number of bytes in allocation extents
MSE_STORE.store.g_free_extents Total number of free extents
MSE_STORE.store.g_free_bytes Total number of bytes in free extents
MSE_STORE.store.g_alloc_small_extents Number of allocation extents smaller than 16k
MSE_STORE.store.g_alloc_small_bytes Number of bytes in allocation extents smaller than 16k
MSE_STORE.store.g_alloc_16k_extents Number of allocation extents between 16k and 32k
MSE_STORE.store.g_alloc_16k_bytes Number of bytes in allocation extents between 16k and 32k
MSE_STORE.store.g_alloc_32k_extents Number of allocation extents between 32k and 64k
MSE_STORE.store.g_alloc_32k_bytes Number of bytes in allocation extents between 32k and 64k
MSE_STORE.store.g_alloc_64k_extents Number of allocation extents between 64k and 128k
MSE_STORE.store.g_alloc_64k_bytes Number of bytes in allocation extents between 64k and 128k
MSE_STORE.store.g_alloc_128k_extents Number of allocation extents between 128k and 256k
MSE_STORE.store.g_alloc_128k_bytes Number of bytes in allocation extents between 128k and 256k
MSE_STORE.store.g_alloc_256k_extents Number of allocation extents between 256k and 512k
MSE_STORE.store.g_alloc_256k_bytes Number of bytes in allocation extents between 256k and 512k
MSE_STORE.store.g_alloc_512k_extents Number of allocation extents between 512k and 1m
MSE_STORE.store.g_alloc_512k_bytes Number of bytes in allocation extents between 512k and 1m
MSE_STORE.store.g_alloc_1m_extents Number of allocation extents between 1m and 2m
MSE_STORE.store.g_alloc_1m_bytes Number of bytes in allocation extents between 1m and 2m
MSE_STORE.store.g_alloc_2m_extents Number of allocation extents between 2m and 4m
MSE_STORE.store.g_alloc_2m_bytes Number of bytes in allocation extents between 2m and 4m
MSE_STORE.store.g_alloc_4m_extents Number of allocation extents between 4m and 8m
MSE_STORE.store.g_alloc_4m_bytes Number of bytes in allocation extents between 4m and 8m
MSE_STORE.store.g_alloc_large_extents Number of allocation extents larger than 8m
MSE_STORE.store.g_alloc_large_bytes Number of bytes in allocation extents larger than 8m
MSE_STORE.store.g_free_small_extents Number of free extents smaller than 16k
MSE_STORE.store.g_free_small_bytes Number of bytes in free extents smaller than 16k
MSE_STORE.store.g_free_16k_extents Number of free extents between 16k and 32k
MSE_STORE.store.g_free_16k_bytes Number of bytes in free extents between 16k and 32k
MSE_STORE.store.g_free_32k_extents Number of free extents between 32k and 64k
MSE_STORE.store.g_free_32k_bytes Number of bytes in free extents between 32k and 64k
MSE_STORE.store.g_free_64k_extents Number of free extents between 64k and 128k
MSE_STORE.store.g_free_64k_bytes Number of bytes in free extents between 64k and 128k
MSE_STORE.store.g_free_128k_extents Number of free extents between 128k and 256k
MSE_STORE.store.g_free_128k_bytes Number of bytes in free extents between 128k and 256k
MSE_STORE.store.g_free_256k_extents Number of free extents between 256k and 512k
MSE_STORE.store.g_free_256k_bytes Number of bytes in free extents between 256k and 512k
MSE_STORE.store.g_free_512k_extents Number of free extents between 512k and 1m
MSE_STORE.store.g_free_512k_bytes Number of bytes in free extents between 512k and 1m
MSE_STORE.store.g_free_1m_extents Number of free extents between 1m and 2m
MSE_STORE.store.g_free_1m_bytes Number of bytes in free extents between 1m and 2m
MSE_STORE.store.g_free_2m_extents Number of free extents between 2m and 4m
MSE_STORE.store.g_free_2m_bytes Number of bytes in free extents between 2m and 4m
MSE_STORE.store.g_free_4m_extents Number of free extents between 4m and 8m
MSE_STORE.store.g_free_4m_bytes Number of bytes in free extents between 4m and 8m
MSE_STORE.store.g_free_large_extents Number of free extents larger than 8m
MSE_STORE.store.g_free_large_bytes Number of bytes in free extents larger than 8m

However, many of these metrics are missing from the current integration. Adding these missing metrics would provide more comprehensive monitoring and insights.

Acceptance Criteria

All available MSE metrics from varnishstat should be added to the integration.

workato-integration[bot] commented 3 months ago

https://new-relic.atlassian.net/browse/NR-309183