forked from alxrem/prometheus-logstash-exporter
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Change main module - Update module `client_golang` (`v1.13.0` -> `v1.14.0`) - Improve documentation
- Loading branch information
Showing
3 changed files
with
63 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,65 @@ | ||
Logstash exporter | ||
================= | ||
# Logstash exporter | ||
|
||
Prometheus exporter for metrics provided by Node Stats API of Logstash. | ||
Prometheus exporter for metrics provided by [Node Stats API](https://www.elastic.co/guide/en/logstash/current/monitoring-logstash.html) of Logstash. | ||
|
||
Building and running | ||
-------------------- | ||
## Building | ||
|
||
go get gitlab.com/alxrem/prometheus-logstash-exporter | ||
cd ${GOPATH-$HOME/go}/src/gitlab.com/alxrem/prometheus-logstash-exporter | ||
go build | ||
./prometheus-logstash-exporter <flags> | ||
*Golang must be installed on the local machine!* | ||
|
||
To see all available configuration flags: | ||
```bash | ||
$ git clone https://github.com/sap-contributions/prometheus-logstash-exporter.git | ||
$ cd prometheus-logstash-exporter | ||
$ CGO_ENABLED=0 go build -o prometheus-logstash-exporter | ||
``` | ||
|
||
## Running | ||
|
||
./prometheus-logstash-exporter -h | ||
|
||
Packages | ||
-------- | ||
```bash | ||
./prometheus-logstash-exporter <flags> | ||
``` | ||
|
||
Binary builds are available on the [releases page of Gitlab project](https://gitlab.com/alxrem/prometheus-logstash-exporter/-/releases). | ||
*If you hold Logstash defaults, the Exporter follow them too.* | ||
|
||
To see all available configuration flags: | ||
|
||
Packages for latest Debian and Ubuntu releases are available on | ||
[PackageCloud](https://packagecloud.io/alxrem/prometheus-logstash-exporter/). | ||
```bash | ||
$ ./prometheus-logstash-exporter -h | ||
Usage of ./prometheus-logstash-exporter: | ||
-logstash.host string | ||
Host address of logstash server. (default "localhost") | ||
-logstash.port int | ||
Port of logstash server. (default "9600") | ||
-logstash.timeout duration | ||
Timeout to get stats from logstash server. (default "5s") | ||
-web.listen-address string | ||
Address to listen on for web interface and telemetry. (default ":9304") | ||
-web.telemetry-path string | ||
Path under which to expose metrics. (default "/metrics") | ||
``` | ||
|
||
Docker images are available at [Docker Hub](https://hub.docker.com/r/alxrem/prometheus-logstash-exporter/). | ||
Pull the latest version with | ||
In Kubernetes we recommend deploy the Exporter as a sidecar in pod with Logstash. | ||
|
||
docker pull alxrem/prometheus-logstash-exporter | ||
E.g.: | ||
```yaml | ||
... | ||
spec: | ||
containers: | ||
- name: logstash | ||
(... setup for logstash ...) | ||
- name: exporter | ||
image: <PathToYourDockerContainerWithName>:<VersionForYourDockerContainer> | ||
args: | ||
- --web.listen-address=:9310 # by default is used port 9304, but feel free adapt this setting | ||
ports: | ||
- containerPort: 9310 | ||
name: metrics | ||
protocol: TCP | ||
resources: | ||
requests: | ||
cpu: "100m" | ||
memory: "16M" | ||
limits: | ||
cpu: "200m" | ||
memory: "32M" | ||
... | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters