Skip to content
This repository has been archived by the owner on Apr 7, 2024. It is now read-only.

carlpett/prombeat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prombeat

Prombeat periodically scrapes a Prometheus server and publishes using Elastic Beat, possible to output to for example Logstash or Elasticsearch.

Configuration

Configuration is done in the prombeat.yml file. Example configuration:

prombeat:
  period: 15m
  # Matchers - See https://prometheus.io/docs/operating/federation/#configuring-federation
  matchers:
    - http_requests_total{instance="localhost:9090",job="prometheus",method="get"}
  # Queries - DEPRECATED
  queries:
    - name: series
      query: prometheus_local_storage_memory_series
    - name: http_requests
      query: sum(http_requests_total{instance="localhost:9090",job="prometheus"})
    - name: http_request_rate
      query: rate(http_requests_total{instance="localhost:9090",job="prometheus"}[15m])

output:
  elasticsearch:
    hosts: ["http://localhost:9200"]
    index: "metrics"

  console:
    pretty: true

This will result in documents like this:

    {
      "@timestamp": "2016-10-24T13:13:29.770Z",
      "beat": {
        "hostname": "my-machine",
        "name": "my-machine"
      },
      "labels": {
        "__name__": "http_requests_total",
        "instance": "localhost:9090",
        "method": "get",
        "job": "prometheus"
      },
      "series": 461390.0,
      "type": "prombeat"
    }

The name of each query will be used as the key in the json for the value.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages