Skip to content

Commit

Permalink
Add prometheus metricsets configs in x-pack version (#17324) (#17348)
Browse files Browse the repository at this point in the history
(cherry picked from commit ea8248e)
  • Loading branch information
ChrsMark committed Mar 31, 2020
1 parent 42578f6 commit b129cb6
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
37 changes: 37 additions & 0 deletions x-pack/metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1027,6 +1027,43 @@ metricbeat.modules:

# Store counter rates instead of original cumulative counters (experimental, default: false)
#rate_counters: true

# Metrics sent by a Prometheus server using remote_write option
#- module: prometheus
# metricsets: ["remote_write"]
# host: "localhost"
# port: "9201"

# Secure settings for the server using TLS/SSL:
#ssl.certificate: "/etc/pki/server/cert.pem"
#ssl.key: "/etc/pki/server/cert.key"

# Metrics that will be collected using a PromQL
#- module: prometheus
# metricsets: ["query"]
# hosts: ["localhost:9090"]
# period: 10s
# queries:
# - name: "instant_vector"
# path: "/api/v1/query"
# params:
# query: "sum(rate(prometheus_http_requests_total[1m]))"
# - name: "range_vector"
# path: "/api/v1/query_range"
# params:
# query: "up"
# start: "2019-12-20T00:00:00.000Z"
# end: "2019-12-21T00:00:00.000Z"
# step: 1h
# - name: "scalar"
# path: "/api/v1/query"
# params:
# query: "100"
# - name: "string"
# path: "/api/v1/query"
# params:
# query: "some_value"

#------------------------------ Prometheus Module ------------------------------
# Metrics collected from a Prometheus endpoint
- module: prometheus
Expand Down
38 changes: 37 additions & 1 deletion x-pack/metricbeat/module/prometheus/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,40 @@
#use_types: true

# Store counter rates instead of original cumulative counters (experimental, default: false)
#rate_counters: true
#rate_counters: true

# Metrics sent by a Prometheus server using remote_write option
#- module: prometheus
# metricsets: ["remote_write"]
# host: "localhost"
# port: "9201"

# Secure settings for the server using TLS/SSL:
#ssl.certificate: "/etc/pki/server/cert.pem"
#ssl.key: "/etc/pki/server/cert.key"

# Metrics that will be collected using a PromQL
#- module: prometheus
# metricsets: ["query"]
# hosts: ["localhost:9090"]
# period: 10s
# queries:
# - name: "instant_vector"
# path: "/api/v1/query"
# params:
# query: "sum(rate(prometheus_http_requests_total[1m]))"
# - name: "range_vector"
# path: "/api/v1/query_range"
# params:
# query: "up"
# start: "2019-12-20T00:00:00.000Z"
# end: "2019-12-21T00:00:00.000Z"
# step: 1h
# - name: "scalar"
# path: "/api/v1/query"
# params:
# query: "100"
# - name: "string"
# path: "/api/v1/query"
# params:
# query: "some_value"
38 changes: 37 additions & 1 deletion x-pack/metricbeat/modules.d/prometheus.yml.disabled
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,40 @@
#use_types: true

# Store counter rates instead of original cumulative counters (experimental, default: false)
#rate_counters: true
#rate_counters: true

# Metrics sent by a Prometheus server using remote_write option
#- module: prometheus
# metricsets: ["remote_write"]
# host: "localhost"
# port: "9201"

# Secure settings for the server using TLS/SSL:
#ssl.certificate: "/etc/pki/server/cert.pem"
#ssl.key: "/etc/pki/server/cert.key"

# Metrics that will be collected using a PromQL
#- module: prometheus
# metricsets: ["query"]
# hosts: ["localhost:9090"]
# period: 10s
# queries:
# - name: "instant_vector"
# path: "/api/v1/query"
# params:
# query: "sum(rate(prometheus_http_requests_total[1m]))"
# - name: "range_vector"
# path: "/api/v1/query_range"
# params:
# query: "up"
# start: "2019-12-20T00:00:00.000Z"
# end: "2019-12-21T00:00:00.000Z"
# step: 1h
# - name: "scalar"
# path: "/api/v1/query"
# params:
# query: "100"
# - name: "string"
# path: "/api/v1/query"
# params:
# query: "some_value"

0 comments on commit b129cb6

Please sign in to comment.