Sign inSign up

xellsys/elcep

By xellsys

Updated over 8 years ago

A go service providing prometheus counter metrics based on custom lucene queries to elasticsearch

Image
1

960

xellsys/elcep repository overview

ELCEP - Elastic Log Counter Exporter for Prometheus

Source:

https://github.com/xellsys/elcep

How do I use it?

Configure the queries one per line in the queries.cfg in the following notation: <name>=<query>

Via command line arguments the following options can be overwritten:

  -config string
    	The path to the queries.cfg (default "./conf/queries.cfg")
  -freq int
    	The interval in seconds in which to query elastic search (default 30)
  -url string
    	The elastic search endpoint (default "http://elasticsearch:9200")
  -path string
    	The path to listen on for HTTP requests (default "/metrics")
  -port int
    	The port to listen on for HTTP requests (default 8080)
Example:

Providing this line in queries.cfg:

all_application_exceptions=message:exception AND service_name:application_*

Will result in exposing the following metric:

# HELP logs_matched_all_application_exceptions_total Counts number of matched logs for all_application_exceptions
# TYPE logs_matched_all_application_exceptions_total counter
logs_matched_all_application_exceptions_total 0

Using that elastic search query:

GET /_search
{
   "query": {
       "query_string": {
           "query": "message:exception AND service_name:application_*"
       }
   },
   "size":0
}

Tag summary

Content type

Image

Digest

Size

10.7 MB

Last updated

over 8 years ago

docker pull xellsys/elcep