diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-16 17:41:01 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2013-10-16 17:41:01 +0200 |
commit | 75187bc1839bd5ba9d0ef652ee9e9037f0e2a95e (patch) | |
tree | 0e02f051819d73a01303a22a30789e384e54a438 | |
parent | b9e19dc79b25f891f880ccc60f0e5b02d12a0375 (diff) | |
download | rsyslog-75187bc1839bd5ba9d0ef652ee9e9037f0e2a95e.tar.gz rsyslog-75187bc1839bd5ba9d0ef652ee9e9037f0e2a95e.tar.bz2 rsyslog-75187bc1839bd5ba9d0ef652ee9e9037f0e2a95e.zip |
omelasticsearch: add failed.httprequests stats counter
-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)); |