Skip to content

Commit

Permalink
correct unit for pool.latency_ms
Browse files Browse the repository at this point in the history
  • Loading branch information
ian28223 committed Oct 5, 2021
1 parent 3e7f81b commit 535e8cc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion proxysql/datadog_checks/proxysql/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
'name': 'stats_mysql_connection_pool',
# Need explicit selections as some columns are unusable.
'query': 'SELECT hostgroup, srv_host, srv_port, status, ConnUsed, ConnFree, ConnOK, ConnERR, Queries, '
'Bytes_data_sent, Bytes_data_recv, Latency_us FROM stats_mysql_connection_pool',
'Bytes_data_sent, Bytes_data_recv, (Latency_us/1000.0) as Latency_ms, Latency_us FROM stats_mysql_connection_pool',
'columns': [
# the hostgroup in which the backend server belongs. Note that a single backend server can belong to more
# than one hostgroup
Expand Down Expand Up @@ -178,7 +178,11 @@
# OK/ERR packets, fields' description, etc)
{'name': 'pool.bytes_data_recv', 'type': 'rate'},
# the currently ping time in microseconds, as reported from Monitor
# Latency_ms is a ProxySQL typo fixed in ProxySQL 1.3.3; it has been aptly renamed to Latency_us.
# See: https://github.com/sysown/proxysql/issues/882
{'name': 'pool.latency_ms', 'type': 'gauge'},
# the currently ping time in microseconds, as reported from Monitor
{'name': 'pool.latency_us', 'type': 'gauge'},
],
}

Expand Down
1 change: 1 addition & 0 deletions proxysql/metadata.csv
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ proxysql.pool.queries,gauge,,query,second,The number of queries routed towards t
proxysql.pool.bytes_data_sent,gauge,,byte,second,The amount of data sent to the backend.,0,proxysql,connection_pool_bytes_sent
proxysql.pool.bytes_data_recv,gauge,,byte,second,The amount of data received from the backend.,0,proxysql,connection_pool_bytes_received
proxysql.pool.latency_ms,gauge,,millisecond,,"The current ping time as reported from Monitor.",-1,proxysql,connection_pool_backend_latency
proxysql.pool.latency_us,gauge,,microsecond,,"The current ping time as reported from Monitor.",-1,proxysql,connection_pool_backend_latency
proxysql.memory.sqlite3_memory_bytes,gauge,,byte,,Memory used by the embedded SQLite.,0,proxysql,sqlite_memory
proxysql.memory.jemalloc_resident,gauge,,byte,,Bytes in physically resident data pages mapped by the allocator.,0,proxysql,jemalloc_resident_memory
proxysql.memory.jemalloc_active,gauge,,byte,,Bytes in pages allocated by the application.,0,proxysql,jemalloc_active_memory
Expand Down
1 change: 1 addition & 0 deletions proxysql/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
'proxysql.pool.bytes_data_sent',
'proxysql.pool.bytes_data_recv',
'proxysql.pool.latency_ms',
'proxysql.pool.latency_us',
)

USER_TAGS_METRICS = (
Expand Down

0 comments on commit 535e8cc

Please sign in to comment.