#NEWLINE# def testTokuMXCheck( self ) : #NEWLINE# #INDENT# mongo_server = 'mongodb://localhost:37017/test' #NEWLINE# config = { #NEWLINE# #INDENT# 'instances' : [ { #NEWLINE# #INDENT# 'server' : mongo_server , #NEWLINE# #UNINDENT# } ] , #NEWLINE# #UNINDENT# } #NEWLINE# server_tag = ( 'server:%s' % mongo_server ) #NEWLINE# self . run_check_twice ( config ) #NEWLINE# for mname in GAUGES : #NEWLINE# #INDENT# self . assertMetric ( mname , count = 1 , tags = [ server_tag ] ) #NEWLINE# #UNINDENT# for mname in RATES : #NEWLINE# #INDENT# self . assertMetric ( mname , count = 1 ) #NEWLINE# #UNINDENT# for msuff in IDX_HISTS : #NEWLINE# #INDENT# for hsuff in HIST_SUFFIXES : #NEWLINE# #INDENT# self . assertMetric ( ( 'tokumx.stats.idx.%s.%s' % ( msuff , hsuff ) ) , count = 1 ) #NEWLINE# #UNINDENT# #UNINDENT# for msuff in IDX_LCL_RATES : #NEWLINE# #INDENT# for hsuff in HIST_SUFFIXES : #NEWLINE# #INDENT# self . assertMetric ( ( 'tokumx.statsd.idx.%s.%s' % ( msuff , hsuff ) ) , count = 1 ) #NEWLINE# #UNINDENT# #UNINDENT# for msuff in COLL_HISTS : #NEWLINE# #INDENT# for hsuff in HIST_SUFFIXES : #NEWLINE# #INDENT# self . assertMetric ( ( 'tokumx.stats.coll.%s.%s' % ( msuff , hsuff ) ) , count = 1 ) #NEWLINE# #UNINDENT# #UNINDENT# for msuff in DB_STATS : #NEWLINE# #INDENT# for dbname in ( 'admin' , 'local' , 'test' ) : #NEWLINE# #INDENT# self . assertMetric ( ( 'tokumx.stats.db.%s' % msuff ) , count = 1 , tags = [ server_tag , ( 'db:%s' % hsuff ) ] ) #NEWLINE# #UNINDENT# #UNINDENT# self . assertServiceCheck ( 'tokumx.can_connect' , count = 1 , status = AgentCheck . OK , tags = [ 'db:test' , 'host:localhost' , 'port:37017' ] ) #NEWLINE# self . coverage_report ( )