Skip to content

Commit 1bd6f8a

Browse files
committed
fix rate mapping
1 parent 4175ef0 commit 1bd6f8a

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

datadog_checks_base/datadog_checks/base/stubs/aggregator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class AggregatorStub(object):
8383
IGNORED_METRICS = {'datadog.agent.profile.memory.check_run_alloc'}
8484
METRIC_TYPE_SUBMISSION_TO_BACKEND_MAP = {
8585
'gauge': 'gauge',
86-
'rate': 'gauge',
86+
'rate': 'rate',
8787
'count': 'count',
8888
'monotonic_count': 'count',
8989
'counter': 'rate',

datadog_checks_dev/datadog_checks/dev/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def get_metadata_metrics():
133133
# Only called in tests of a check, so just go back one frame
134134
root = find_check_root(depth=1)
135135
metadata_path = os.path.join(root, 'metadata.csv')
136+
print(f"metadata_path: {metadata_path}\n")
136137
metrics = {}
137138
with open(metadata_path) as f:
138139
for row in csv.DictReader(f):

mysql/metadata.csv

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ mysql.innodb.queries_inside,gauge,,query,,As shown in the FILE I/O section of th
112112
mysql.innodb.queries_queued,gauge,,query,,As shown in the FILE I/O section of the SHOW ENGINE INNODB STATUS output.,0,mysql,mysql innodb queries queued,
113113
mysql.innodb.read_views,gauge,,,,As shown in the FILE I/O section of the SHOW ENGINE INNODB STATUS output.,0,mysql,mysql innodb read views,
114114
mysql.innodb.row_lock_current_waits,gauge,,,,The number of row locks currently being waited for by operations on InnoDB tables.,0,mysql,mysql innodb row_lock_current_waits,
115-
mysql.innodb.row_lock_time,gauge,,millisecond,,The time spent acquiring row locks.,-1,mysql,row lock time,
115+
mysql.innodb.row_lock_time,rate,,millisecond,,The time spent acquiring row locks.,-1,mysql,row lock time,
116116
mysql.innodb.row_lock_waits,rate,,event,second,The number of times per second a row lock had to be waited for.,0,mysql,innodb row lock waits,
117117
mysql.innodb.rows_deleted,rate,,row,second,Number of rows deleted from InnoDB tables.,0,mysql,mysql innodb rows_deleted,
118118
mysql.innodb.rows_inserted,rate,,row,second,Number of rows inserted into InnoDB tables.,0,mysql,mysql innodb rows_inserted,
@@ -147,11 +147,11 @@ mysql.performance.com_insert,rate,,query,second,The rate of insert statements.,0
147147
mysql.performance.com_insert_select,rate,,query,second,The rate of insert-select statements.,0,mysql,insrt select,
148148
mysql.performance.com_load,rate,,query,second,The rate of load statements.,0,mysql,mysql performance com_load,
149149
mysql.performance.com_replace,rate,,query,second,The rate of replace statements.,0,mysql,mysql performance com_replace,
150-
mysql.performance.com_replace_select,gauge,,query,second,The rate of replace-select statements.,0,mysql,replc select,
150+
mysql.performance.com_replace_select,rate,,query,second,The rate of replace-select statements.,0,mysql,replc select,
151151
mysql.performance.com_select,rate,,query,second,The rate of select statements.,0,mysql,selects,cpu
152152
mysql.performance.com_update,rate,,query,second,The rate of update statements.,0,mysql,updates,
153153
mysql.performance.com_update_multi,rate,,query,second,The rate of update-multi.,0,mysql,update multi,
154-
mysql.performance.cpu_time,gauge,,percent,,Percentage of CPU time spent by MySQL.,-1,mysql,cpu,cpu
154+
mysql.performance.cpu_time,rate,,percent,,Percentage of CPU time spent by MySQL.,-1,mysql,cpu,cpu
155155
mysql.performance.created_tmp_disk_tables,rate,,table,second,The rate of internal on-disk temporary tables created by second by the server while executing statements.,-1,mysql,disk tmp tables created,
156156
mysql.performance.created_tmp_files,rate,,file,second,The rate of temporary files created by second.,-1,mysql,tmp files created,
157157
mysql.performance.created_tmp_tables,rate,,table,second,The rate of internal temporary tables created by second by the server while executing statements.,0,mysql,tmp tables created,
@@ -168,7 +168,7 @@ mysql.performance.handler_read_rnd_next,rate,,operation,second,The number of int
168168
mysql.performance.handler_rollback,rate,,operation,second,The number of internal ROLLBACK statements.,0,mysql,mysql performance handler_rollback,
169169
mysql.performance.handler_update,rate,,operation,second,The number of internal UPDATE statements.,0,mysql,mysql performance handler_update,
170170
mysql.performance.handler_write,rate,,operation,second,The number of internal WRITE statements.,0,mysql,mysql performance handler_write,
171-
mysql.performance.kernel_time,gauge,,percent,,Percentage of CPU time spent in kernel space by MySQL.,-1,mysql,cpu kernel,
171+
mysql.performance.kernel_time,rate,,percent,,Percentage of CPU time spent in kernel space by MySQL.,-1,mysql,cpu kernel,
172172
mysql.performance.key_cache_utilization,gauge,,fraction,,The key cache utilization ratio.,1,mysql,key cache utilization,
173173
mysql.performance.max_prepared_stmt_count,gauge,,,,The maximum allowed prepared statements on the server.,0,mysql,max prepared statements,
174174
mysql.performance.open_files,gauge,,file,,The number of open files.,0,mysql,open files,
@@ -212,7 +212,7 @@ mysql.performance.threads_connected,gauge,,connection,,The number of currently o
212212
mysql.performance.threads_created,count,,thread,,"The number of threads created to handle connections. If `threads_created` is big, you may want to increase the `thread_cache_size` value.",0,mysql,mysql performance threads_created,memory
213213
mysql.performance.threads_running,gauge,,thread,,The number of threads that are not sleeping.,0,mysql,threads running,
214214
mysql.performance.user_connections,gauge,,connection,,"The number of user connections. Tags: `processlist_db`, `processlist_host`, `processlist_state`, `processlist_user`",0,mysql,user conns,
215-
mysql.performance.user_time,gauge,,percent,,Percentage of CPU time spent in user space by MySQL.,-1,mysql,cpu user,
215+
mysql.performance.user_time,rate,,percent,,Percentage of CPU time spent in user space by MySQL.,-1,mysql,cpu user,
216216
mysql.queries.count,count,,query,,The total count of executed queries per normalized query and schema. (DBM only),0,mysql,mysql queries count,cpu
217217
mysql.queries.errors,count,,error,,The total count of queries run with an error per normalized query and schema. (DBM only),0,mysql,mysql query errors,
218218
mysql.queries.lock_time,count,,nanosecond,,The total time spent waiting on locks per normalized query and schema. (DBM only),0,mysql,mysql queries lock time,

0 commit comments

Comments
 (0)