mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-06 20:46:19 +00:00
Fixes missing flows on mysql after shutdown
This commit is contained in:
parent
e3e82c6dce
commit
706bbf8558
7 changed files with 32 additions and 13 deletions
|
|
@ -473,7 +473,8 @@ bool MySQLDB::createNprobeDBView() {
|
|||
/* ******************************************* */
|
||||
|
||||
MySQLDB::MySQLDB(NetworkInterface *_iface) : DB(_iface) {
|
||||
mysqlDroppedFlows = 0;
|
||||
mysqlDroppedFlows = mysqlConsumerDroppedFlows = 0;
|
||||
mysqlEnqueuedFlows = 0;
|
||||
mysqlExportedFlows = 0, mysqlLastExportedFlows = 0;
|
||||
mysqlExportRate = 0;
|
||||
checkpointDroppedFlows = checkpointExportedFlows = 0;
|
||||
|
|
@ -531,7 +532,7 @@ void MySQLDB::lua(lua_State *vm, bool since_last_checkpoint) const {
|
|||
lua_push_uint64_table_entry(vm, "flow_export_count",
|
||||
mysqlExportedFlows - (since_last_checkpoint ? checkpointExportedFlows : 0));
|
||||
lua_push_int32_table_entry(vm, "flow_export_drops",
|
||||
mysqlDroppedFlows - (since_last_checkpoint ? checkpointDroppedFlows : 0));
|
||||
(mysqlDroppedFlows + mysqlConsumerDroppedFlows) - (since_last_checkpoint ? checkpointDroppedFlows : 0));
|
||||
lua_push_float_table_entry(vm, "flow_export_rate",
|
||||
mysqlExportRate >= 0 ? mysqlExportRate : 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue