summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--plugins/omelasticsearch/omelasticsearch.c6
2 files changed, 4 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index e3c25cb8..8978db75 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@ Version 7.4.5 [v7.4-stable] 2013-09-??
- omelasticsearch: add failed.httprequests stats counter
- bugfix: omelasticsearch: correct failed.http stats counter
- bugfix: omelasticsearch: did not correctly initialize stats counters
+- bugfix: omelasticsearch: failed.es counter was only maintained in bulk mode
This usually did not lead to any problems, because they are in static
memory, which is initialized to zero by the OS when the plugin is
loaded. But it may cause problems especially on systems that do not
diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c
index 240d19e6..b82968d0 100644
--- a/plugins/omelasticsearch/omelasticsearch.c
+++ b/plugins/omelasticsearch/omelasticsearch.c
@@ -542,9 +542,6 @@ DBGPRINTF("omelasticsearch: %d items in reply\n", numitems);
}
finalize_it:
- if(iRet != RS_RET_OK) {
- STATSCOUNTER_INC(indexESFail, mutIndexESFail);
- }
RETiRet;
}
@@ -582,6 +579,9 @@ checkResult(instanceData *pData, uchar *reqmsg)
finalize_it:
if(root != NULL)
cJSON_Delete(root);
+ if(iRet != RS_RET_OK) {
+ STATSCOUNTER_INC(indexESFail, mutIndexESFail);
+ }
RETiRet;
}