replSetGetStatus ile üye sağlığı, oplog window saat hesabı, sharding balancer durumu, currentOp ve profiler ile sorgu izleme, WiredTiger cache + concurrent transactions takibi.
db.currentOp() çıktısı: aktif komutlar, ns (namespace), microsecs_running, lock dependencies, secs_running, planSummary.
get_diag_current_opsget_active_queriesget_blocking_sessionssystem.profile collection üzerinden yavaş query'ler (slowOpThresholdMs üzeri), planSummary (COLLSCAN uyarısı), keysExamined / nreturned oranı.
get_diag_profilerget_profiler_summary(db)Profiler verisinden komut türü bazlı (find/aggregate/insert/update/delete) gruplama, ortalama süre ve toplam çağrı sayısı.
get_top_queriesexplain('executionStats') ile yürütme planı: stage tree (IXSCAN, COLLSCAN, FETCH, SORT), totalKeysExamined, totalDocsExamined.
get_execution_plan$indexStats aggregation ile her index için "accesses" sayısı, hiç kullanılmayan index'ler, en sık kullanılan index'ler.
get_diag_index_statsdb.serverStatus(): ops, asserts, connections, network, opcounters, mem, extra_info. Composite health score üretimi.
get_diag_server_statusget_health_checkÜye listesi, state (PRIMARY/SECONDARY/ARBITER/RECOVERING), health, uptime, optimeDate, pingMs. Election history, sync source.
get_replica_set_statuslocal.oplog.rs collection'ında en eski ve en yeni timestamp arası fark — saat cinsinden window. Yetersiz window initial sync'i bozar.
get_oplog_windowPrimary'nin optime'ı vs secondary'nin optime'ı arasındaki fark (saniye), per-member secondaryDelay, lag warning / critical eşikleri.
get_replication_statusAktif connection sayısı, available, totalCreated, ssl-only oranı, kullanıcı / app dağılımı, max connections kullanımı.
get_connection_detailConfig server, shards, mongos router, chunk dağılımı, dengelenmiş mi (variance %), database-shard atamaları.
get_sharding_statusBalancer çalışıyor mu, son round migration sayısı, failed migrations, balancer pencere dışına taşan operasyonlar.
collstats: shard key dağılımı, chunk count per collection, indexes, storage size, document count. dbstats: per-DB toplam.
get_diag_collection_statsget_diag_db_statscacheSizeGB, kullanılan byte, dirty bytes, eviction frekansı, target dirty oranı, eviction worker'ları, modified pages evicted by application threads.
get_diag_wt_cacheWiredTiger ticket sistemi: read tickets (out / available), write tickets, queue length. Ticket exhaustion = throughput cap.
get_wt_concurrent_transactionsWiredTiger compression ratio, on-disk size vs uncompressed size, journal size, checkpoint duration.
get_storage_metricsdbPath sürücü doluluğu, dosya sayısı, biggest files, growth trend. Atlas için yapılandırılmış disk metric'leri.
get_disk_volumesget_database_filesget_io_latency(hours)Authentication aktif mi, TLS bağlantısı zorunlu mu, localhost auth bypass kontrol, root role kullanımı, default DB'lerde user var mı?
get_security_checksdb.system.users: kullanıcı listesi, atanmış roller, db kapsamı, mechanism (SCRAM-SHA-1, SCRAM-SHA-256, x.509). Custom rol tanımları.
get_diag_users_rolesget_logins_securityMongoDB Enterprise audit log: connection events, authcheck, authorization failures, schema changes. Filter ile son N olay.
get_audit_logs(limit)currentOp'tan locks, waitingForLock = true, lock dependencies, queue uzunlukları (Global/Database/Collection).
get_active_waitsget_query_wait_stats| Yetenek | Açıklama | Komut / Kaynak |
|---|---|---|
| Performance & Query | ||
| currentOp | Aktif operasyonlar | db.currentOp() |
| Profiler | system.profile slow ops | db.system.profile |
| Top queries | Komut tipi grouping | profiler aggregation |
| Explain | executionStats stage tree | cursor.explain() |
| Index stats | $indexStats accesses | $indexStats |
| Server status | opcounters, network, mem | serverStatus |
| Replica Set | ||
| Replica set status | Members + state | replSetGetStatus |
| Oplog window | Saat hesabı | local.oplog.rs |
| Replication lag | Per-member optime diff | replSetGetStatus |
| Connection detail | Active / available | connPoolStats |
| Sharding | ||
| Sharding status | Cluster map + chunks | sh.status() |
| Balancer | Migration history | config.actionlog |
| Collection stats | collstats per collection | collStats |
| DB stats | Per-DB toplam | dbStats |
| WiredTiger | ||
| WT cache | Cache fill, dirty, eviction | serverStatus.wiredTiger.cache |
| Concurrent transactions | Read/write tickets | concurrentTransactions |
| Storage metrics | Compression + journal | serverStatus |
| I/O latency | Disk read/write latency | OS metrics |
| Security | ||
| Security checks | Auth + TLS + root role | composite |
| Users & roles | SCRAM, x.509, custom roles | db.system.users |
| Audit log | Enterprise audit | auditLog destination |
| Active waits | currentOp lock waits | currentOp |
Replica set, sharded cluster, Atlas — tüm MongoDB topolojileri tek platformda.