diff options
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | plugins/omelasticsearch/omelasticsearch.c | 5 |
2 files changed, 7 insertions, 0 deletions
@@ -10,6 +10,8 @@ Version 7.4.5 [v7.4-stable] 2013-09-?? Thanks to Muri Cicanor for initiating the discussion - now requires libestr 0.1.8 as early versions had a nasty bug in string comparisons +- omelasticsearch: add failed.httprequests stats counter +- bugfix omelasticsearch: correct failed.http stats counter - bugfix: mmanon did not detect all IP addresses in rewrite mode The problem occured if two IPs were close to each other and the first one was shrunk. diff --git a/plugins/omelasticsearch/omelasticsearch.c b/plugins/omelasticsearch/omelasticsearch.c index c1b2abd0..5d4c97c3 100644 --- a/plugins/omelasticsearch/omelasticsearch.c +++ b/plugins/omelasticsearch/omelasticsearch.c @@ -60,6 +60,7 @@ DEFobjCurrIf(statsobj) statsobj_t *indexStats; STATSCOUNTER_DEF(indexSubmit, mutIndexSubmit) STATSCOUNTER_DEF(indexHTTPFail, mutIndexHTTPFail) +STATSCOUNTER_DEF(indexHTTPReqFail, mutIndexHTTPReqFail) STATSCOUNTER_DEF(indexESFail, mutIndexESFail) /* REST API for elasticsearch hits this URL: @@ -607,6 +608,7 @@ curlPost(instanceData *pData, uchar *message, int msglen, uchar **tpls, int nmsg case CURLE_COULDNT_RESOLVE_PROXY: case CURLE_COULDNT_CONNECT: case CURLE_WRITE_ERROR: + STATSCOUNTER_INC(indexHTTPReqFail, mutHTTPReqFail); indexHTTPFail += nmsgs; DBGPRINTF("omelasticsearch: we are suspending ourselfs due " "to failure %lld of curl_easy_perform()\n", @@ -1003,6 +1005,9 @@ CODEmodInit_QueryRegCFSLineHdlr ctrType_IntCtr, &indexSubmit)); CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.http", ctrType_IntCtr, &indexHTTPFail)); + STATSCOUNTER_INIT(indexHTTPReqFail, mutCtrIndexHTTPReqFail); + CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.httprequests", + ctrType_IntCtr, &indexHTTPReqFail)); CHKiRet(statsobj.AddCounter(indexStats, (uchar *)"failed.es", ctrType_IntCtr, &indexESFail)); CHKiRet(statsobj.ConstructFinalize(indexStats)); |