Skip to content

Commit

Permalink
Adding HAProxy module (#2384)
Browse files Browse the repository at this point in the history
  • Loading branch information
hartfordfive authored and ruflin committed Sep 8, 2016
1 parent 54cbe67 commit de22fad
Show file tree
Hide file tree
Showing 52 changed files with 8,195 additions and 13 deletions.
2 changes: 1 addition & 1 deletion metricbeat/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ build

/metricbeat
/metricbeat.test
/docs/html_docs
/docs/html_docs
6 changes: 6 additions & 0 deletions metricbeat/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beat:
- postgresql
- redis
- zookeeper
- haproxy
environment:
- APACHE_HOST=apache
- APACHE_PORT=80
Expand All @@ -28,6 +29,8 @@ beat:
- POSTGRESQL_PORT=5432
- ZOOKEEPER_HOST=zookeeper
- ZOOKEEPER_PORT=2181
- HAPROXY_HOST=haproxy
- HAPROXY_PORT=14567
- TEST_ENVIRONMENT=false
working_dir: /go/src/github.com/elastic/beats/metricbeat
volumes:
Expand Down Expand Up @@ -58,6 +61,9 @@ mysql:
nginx:
build: ${PWD}/module/nginx/_meta

haproxy:
build: ${PWD}/module/haproxy/_meta

postgresql:
image: postgres:9.5.3

Expand Down
1 change: 1 addition & 0 deletions metricbeat/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ waitFor ${NGINX_HOST} ${NGINX_PORT} Nginx
waitFor ${POSTGRESQL_HOST} ${POSTGRESQL_PORT} Postgresql
waitFor ${REDIS_HOST} ${REDIS_PORT} Redis
waitFor ${ZOOKEEPER_HOST} ${ZOOKEEPER_PORT} Zookeeper
waitFor ${HAPROXY_HOST} ${HAPROXY_PORT} HAProxy
exec "$@"
29 changes: 29 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ grouped in the following categories:
* <<exported-fields-beat>>
* <<exported-fields-beats>>
* <<exported-fields-common>>
* <<exported-fields-haproxy>>
* <<exported-fields-mongodb>>
* <<exported-fields-mysql>>
* <<exported-fields-nginx>>
Expand Down Expand Up @@ -699,6 +700,34 @@ required: True
The document type. Always set to "metricsets".


[[exported-fields-haproxy]]
== haproxy Fields

haproxy Module



[float]
== haproxy Fields




[float]
== stat Fields

stat



[float]
=== haproxy.stat.example

type: keyword

Example field


[[exported-fields-mongodb]]
== MongoDB Fields

Expand Down
37 changes: 37 additions & 0 deletions metricbeat/docs/modules/haproxy.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-module-haproxy]]
== haproxy Module

This is the haproxy Module.



[float]
=== Example Configuration

The haproxy module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
- module: haproxy
metricsets: ["stat"]
enabled: true
period: 1s
hosts: ["localhost"]
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-haproxy-stat,stat>>

include::haproxy/stat.asciidoc[]

19 changes: 19 additions & 0 deletions metricbeat/docs/modules/haproxy/stat.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-haproxy-stat]]
include::../../../module/haproxy/stat/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-haproxy,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/haproxy/stat/_meta/data.json[]
----
9 changes: 9 additions & 0 deletions metricbeat/etc/beat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ metricbeat.modules:
# Password of hosts. Empty by default
#password: test123

#------------------------------- haproxy Module ------------------------------
#- module: haproxy
#metricsets:
#- "stat"
#- "info"
#enabled: true
#period: 10s
#stats_addr: "tcp://127.0.0.1:14567

#-------------------------------- beats Module -------------------------------
#- module: beats
#metricsets: ["filebeat", "libbeat"]
Expand Down
Loading

0 comments on commit de22fad

Please sign in to comment.