.BANCHO. Add bancho components RAM usage as datadog stats
This commit is contained in:
parent
c7c5528588
commit
cd75d1ad8d
|
@ -1,7 +1,6 @@
|
|||
"""Global objects and variables"""
|
||||
|
||||
import time
|
||||
|
||||
from common.ddog import datadogClient
|
||||
from common.files import fileBuffer, fileLocks
|
||||
from objects import channelList
|
||||
|
@ -26,7 +25,6 @@ banchoConf = None
|
|||
tokens = tokenList.tokenList()
|
||||
channels = channelList.channelList()
|
||||
matches = matchList.matchList()
|
||||
restarting = False
|
||||
fLocks = fileLocks.fileLocks()
|
||||
fileBuffers = fileBuffer.buffersList()
|
||||
schiavo = schiavo.schiavo()
|
||||
|
@ -45,8 +43,8 @@ gzip = False
|
|||
localize = False
|
||||
sentry = False
|
||||
irc = False
|
||||
restarting = False
|
||||
|
||||
startTime = int(time.time())
|
||||
|
||||
|
||||
streams = streamList.streamList()
|
||||
|
|
13
pep.py
13
pep.py
|
@ -202,6 +202,19 @@ if __name__ == "__main__":
|
|||
[
|
||||
datadogClient.periodicCheck("online_users", lambda: len(glob.tokens.tokens)),
|
||||
datadogClient.periodicCheck("multiplayer_matches", lambda: len(glob.matches.matches)),
|
||||
|
||||
datadogClient.periodicCheck("ram_clients", lambda: generalUtils.getTotalSize(glob.tokens)),
|
||||
datadogClient.periodicCheck("ram_matches", lambda: generalUtils.getTotalSize(glob.matches)),
|
||||
datadogClient.periodicCheck("ram_channels", lambda: generalUtils.getTotalSize(glob.channels)),
|
||||
datadogClient.periodicCheck("ram_file_buffers", lambda: generalUtils.getTotalSize(glob.fileBuffers)),
|
||||
datadogClient.periodicCheck("ram_file_locks", lambda: generalUtils.getTotalSize(glob.fLocks)),
|
||||
datadogClient.periodicCheck("ram_datadog", lambda: generalUtils.getTotalSize(glob.datadogClient)),
|
||||
datadogClient.periodicCheck("ram_verified_cache", lambda: generalUtils.getTotalSize(glob.verifiedCache)),
|
||||
datadogClient.periodicCheck("ram_userid_cache", lambda: generalUtils.getTotalSize(glob.userIDCache)),
|
||||
#datadogClient.periodicCheck("ram_pool", lambda: generalUtils.getTotalSize(glob.pool)),
|
||||
datadogClient.periodicCheck("ram_irc", lambda: generalUtils.getTotalSize(glob.ircServer)),
|
||||
datadogClient.periodicCheck("ram_tornado", lambda: generalUtils.getTotalSize(glob.application)),
|
||||
datadogClient.periodicCheck("ram_db", lambda: generalUtils.getTotalSize(glob.db)),
|
||||
])
|
||||
else:
|
||||
consoleHelper.printColored("[!] Warning! Datadog stats tracking is disabled!", bcolors.YELLOW)
|
||||
|
|
|
@ -4,3 +4,4 @@ mysqlclient
|
|||
psutil
|
||||
raven
|
||||
bcrypt>=3.1.1
|
||||
dill
|
Loading…
Reference in New Issue
Block a user