I am trying to monitor the total number of used bytes in a MySQL 5.7 InnoDB Buffer Pool, that can go up to 100GB, using Innodb_buffer_pool_bytes_data
but it seems that this status variable is a 32-bit unsigned integer when I query it, so it overflows when bytes go past 2^32.
It seems to be an unsigned long integer internally in MySQL (https://github.com/mysql/mysql-server/blob/5.7/storage/innobase/include/srv0srv.h#L892)?
At first I thought the overflow was in was my monitoring stack (Telegraf+InfluxDB+Grafana)-
-but querying MySQL directly seems to reveal it's from MySQL and not in my monitoring solution:
SHOW GLOBAL STATUS WHERE Variable_name = "Innodb_buffer_pool_bytes_data"
-yields 490371968
for roughly the same sample timestamp seen in Grafana above.
How can I accurately monitor the true value?