-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjusted docker file and readme for new agent with config file
also removed the dev pem file
- Loading branch information
Showing
5 changed files
with
77 additions
and
34 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,12 +1,40 @@ | ||
FROM golang:alpine AS builder | ||
|
||
|
||
ADD . $GOPATH/src/github.com/citrusleaf/aerospike-prometheus-exporter | ||
WORKDIR $GOPATH/src/github.com/citrusleaf/aerospike-prometheus-exporter | ||
RUN apk add git \ | ||
RUN apk add git\ | ||
&& apk add gettext libintl \ | ||
&& go get ./... \ | ||
&& go build -o aerospike-prometheus-exporter . \ | ||
&& cp aerospike-prometheus-exporter /aerospike-prometheus-exporter | ||
|
||
|
||
FROM golang:alpine | ||
ENV AGENT_UPDATE_INTERVAL=5\ | ||
AGENT_CERT_FILE=""\ | ||
AGENT_KEY_FILE=""\ | ||
AGENT_TAGS='"agent","aerospike"'\ | ||
AGENT_BIND_HOST=""\ | ||
AGENT_BIND_PORT=9145\ | ||
AGENT_TIMEOUT=10\ | ||
AGENT_LOG_LEVEL="info"\ | ||
AS_HOST=""\ | ||
AS_PORT=3000\ | ||
AS_CERT_FILE=""\ | ||
AS_KEY_FILE=""\ | ||
AS_NODE_TLS_NAME=""\ | ||
AS_ROOT_CA=""\ | ||
AS_AUTH_MODE=""\ | ||
AS_AUTH_USER=""\ | ||
TICKER_INTERVAL=5\ | ||
TICKER_TIMEOUT=5 | ||
|
||
RUN apk add gettext libintl | ||
COPY --from=builder /aerospike-prometheus-exporter /usr/bin/aerospike-prometheus-exporter | ||
CMD ["-h localhost", "-p 3000", "-b :9145", "-tags agent,aerospike"] | ||
ENTRYPOINT ["aerospike-prometheus-exporter"] | ||
COPY ape.toml.template /etc/aerospike-prometheus-exporter/ape.toml.template | ||
# you could change the port via env var and then would have to --expose in run. | ||
# That is likely unnecessary though | ||
EXPOSE 9145 | ||
|
||
CMD cat /etc/aerospike-prometheus-exporter/ape.toml.template && env && envsubst < /etc/aerospike-prometheus-exporter/ape.toml.template > /etc/aerospike-prometheus-exporter/ape.toml && cat /etc/aerospike-prometheus-exporter/ape.toml && aerospike-prometheus-exporter -config /etc/aerospike-prometheus-exporter/ape.toml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
[Agent] | ||
update_interval = ${AGENT_UPDATE_INTERVAL} | ||
# File paths should be double quoted. | ||
# Certificate file for the metric servers for prometheus | ||
cert_file = "${AGENT_CERT_FILE}" | ||
# Key file for the metric servers for prometheus | ||
key_file = "${AGENT_KEY_FILE}" | ||
|
||
# tags to append to the prometheus metrics | ||
tags=[${AGENT_TAGS}] | ||
|
||
bind_host = "${AGENT_BIND_HOST}" | ||
bind_port = ${AGENT_BIND_PORT} | ||
|
||
# metrics server timeout in seconds | ||
timeout = ${AGENT_TIMEOUT} | ||
|
||
# debug level can be info|warning,warn|error,err|debug | ||
log_level = "${AGENT_LOG_LEVEL}" | ||
|
||
[Aerospike] | ||
db_host="${AS_HOST}" | ||
db_port=${AS_PORT} | ||
|
||
# certificate file | ||
cert_file="${AS_CERT_FILE}" | ||
# key file | ||
key_file="${AS_KEY_FILE}" | ||
# node TLS name for authentication | ||
node_tls_name="${AS_NODE_TLS_NAME}" | ||
# root certificate file | ||
root_ca="${AS_ROOT_CA}" | ||
|
||
# authentication mode: internal (for server), external (LDAP, etc.) | ||
auth_mode="${AS_AUTH_MODE}" | ||
# database user | ||
user="${AS_AUTH_USER}" | ||
# database password | ||
password="$AS_AUTH_USER" | ||
|
||
# ticker interval for requesting stats fro mthe database node | ||
resolution=${TICKER_INTERVAL} | ||
|
||
# timeout for sending commands to the server node in seconds | ||
timeout=${TICKER_TIMEOUT} |