Percona Monitoring for Cacti (for MongoDB) doesn't show slave lag info
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Monitoring Plugins |
Triaged
|
Medium
|
Unassigned |
Bug Description
"Percona MongoDB Slave Lag" graph data on Cacti is gathered by following code from "db.serverStatu
if (preg_match(
$result[
} else {
$result[
}
mongodb db.serverStatus() as below.
admin> db.serverStatus()
{
"host" : "sjprmongodb02.
"version" : "2.4.6",
"process" : "mongod",
"pid" : 9803,
"uptime" : 2396648,
"uptimeMillis" : NumberLong(
"uptimeEstimate" : 2372137,
"localTime" : ISODate(
"asserts" : {
"regular" : 0,
"warning" : 0,
"msg" : 0,
"user" : 915,
"rollovers" : 0
},
"backgroundFlus
"flushes" : 39944,
"total_ms" : 337394,
"average_ms" : 8.446675345483676,
"last_ms" : 4,
"last_finished" : ISODate(
},
"connections" : {
"current" : 152,
"available" : 16232,
"totalCreated" : NumberLong(316571)
},
"cursors" : {
"totalOpen" : 0,
"clientCursors_
"timedOut" : 11
},
"dur" : {
"commits" : 30,
"journaledMB" : 0,
"writeToDataFil
"compression" : 0,
"commitsInWrite
"earlyCommits" : 0,
"timeMs" : {
"dt" : 3070,
"prepLogBuffer" : 0,
"writeToJournal" : 0,
"writeToDataFiles" : 0,
"remapPrivateView" : 0
}
},
"extra_info" : {
"note" : "fields vary by platform",
"heap_usage_bytes" : 165209192,
"page_faults" : 0
},
"globalLock" : {
"totalTime" : NumberLong(
"lockTime" : NumberLong(
"currentQueue" : {
"total" : 0,
"readers" : 0,
"writers" : 0
},
"activeClients" : {
"total" : 0,
"readers" : 0,
"writers" : 0
}
},
"indexCounters" : {
"accesses" : 24560534,
"hits" : 24561206,
"misses" : 0,
"resets" : 0,
"missRatio" : 0
},
"locks" : {
......
},
"network" : {
"bytesIn" : 1665717529,
"bytesOut" : 7183342824,
"numRequests" : 24601510
},
"opcounters" : {
"insert" : 1,
"query" : 394523,
"update" : 380,
"delete" : 0,
"getmore" : 6680,
"command" : 24419737
},
"opcountersRepl" : {
"insert" : 57766,
"query" : 0,
"update" : 35296,
"delete" : 905135,
"getmore" : 0,
"command" : 5
},
"recordStats" : {
"accessesNotInM
"pageFaultExcep
......
},
"repl" : {
"setName" : "replPROD",
"ismaster" : false,
"secondary" : true,
"hosts" : [
"sjprmongodb02.
"sjprmongodb01.
],
"primary" : "sjprmongodb01.
"me" : "sjprmongodb02.
},
"writeBacksQueued" : false,
"mem" : {
"bits" : 64,
"resident" : 777,
"virtual" : 7630,
"supported" : true,
"mapped" : 3263,
"mappedWithJournal" : 6526
},
"metrics" : {
"document" : {
"deleted" : NumberLong(0),
"inserted" : NumberLong(1),
"returned" : NumberLong(236354),
"updated" : NumberLong(380)
},
"getLastError" : {
"wtime" : {
"num" : 0,
"totalMillis" : 0
},
"wtimeouts" : NumberLong(0)
},
"operation" : {
"fastmod" : NumberLong(380),
"idhack" : NumberLong(29),
"scanAndOrder" : NumberLong(53)
},
"queryExecutor" : {
"scanned" : NumberLong(1265192)
},
"record" : {
"moves" : NumberLong(349)
},
"repl" : {
"apply" : {
"batches" : {
"num" : 129023,
"totalMillis" : 55910
},
"ops" : NumberLong(998202)
},
"buffer" : {
"count" : NumberLong(0),
"maxSizeBytes" : 268435456,
"sizeBytes" : NumberLong(0)
},
"network" : {
"bytes" : NumberLong(
"getmores" : {
"num" : 736325,
"totalMillis" : 2396186780
},
"ops" : NumberLong(998512),
"readersCreated" : NumberLong(31421)
},
"oplog" : {
"insert" : {
"num" : 998512,
"totalMillis" : 37366
},
"insertBytes" : NumberLong(
},
"preload" : {
"docs" : {
"num" : 35296,
"totalMillis" : 1
},
"indexes" : {
"num" : 3864628,
"totalMillis" : 671
}
}
},
"ttl" : {
"deletedDocuments" : NumberLong(0),
"passes" : NumberLong(39866)
}
},
"ok" : 1
}
Percona MongoDB Monitoring Template for Cacti
http://
Changed in percona-monitoring-plugins: | |
status: | New → Confirmed |
tags: | added: i46675 |
Changed in percona-monitoring-plugins: | |
importance: | Undecided → Medium |
Changed in percona-monitoring-plugins: | |
status: | Confirmed → Triaged |
As per doc, there is no lagseconds in serverstatus output. docs.mongodb. org/manual/ reference/ command/ serverStatus/ #dbcmd. serverStatus
http://
This might be the solution: http:// alexzeng. wordpress. com/2011/ 09/25/how- to-use- cacti-to- monitor- mongod/