Untitled

mail@pastecode.io avatar
unknown
python
a year ago
386 B
1
Indexable
Never
def collect_all_database_metrics():
    databases = Database.objects.all()
    for db in databases:
        if db.db_type == Database.DB_TYPE_POSTGRESQL:
            collect_postgresql_metrics(db)
        elif db.db_type == Database.DB_TYPE_MYSQL:
            collect_mysql_metrics(db)
        elif db.db_type == Database.DB_TYPE_MONGODB:
            collect_mongodb_metrics(db)