A Prometheus metrics exporter for FID.
<TAG_NAME> in the below command has to be same with the location name where you will push the image
docker build . --tag <TAG_NAME>
Example
docker build . --tag <TAG_NAME>
docker push <TAG_NAME>
Example
docker push <TAG_NAME>
| VARIABLE | DEFAULT VALUE | DESCRIPTION |
|---|---|---|
| LDAP_URI | - | LDAP URI of FID with non-ssl port |
| BIND_DN | - | DN of the account used to bind to LDAP server |
| BIND_PASSWORD | - | Password of the account used to bind to LDAP server |
| PUSH_MODE | false | To enable push mode set the value to true |
| PUSHGATEWAY_URI | - | Prometheus pushgateway endpoint (http://pushgateway:9091) |
| PUSH_METRICS_CRON | * * * * * | CRON expression at what interval push has to take place |
| JOB_NAME | fid-targets | Name of the scrape job to be set during push |
| INSTANCE_NAME | $HOSTNAME | Name of the instance to be set during push |
Clone the project and make sure you have golang installed on your machine
# Following environmental variables are required for ./run_dev.sh
export LDAP_URI="ldap://localhost:2389"
export BIND_DN="cn=Directory Manager"
export BIND_PASSWORD="secret1234"
./run_dev.sh
PULL MODE
docker run -e LDAP_URI="ldap://HOSTNAME:2389" -e BIND_DN="cn=Directory Manager" -e BIND_PASSWORD="PASSWORD" -p 9095:9095 --name fid-exporter radiantone/fid-exporter
PUSH MODE
docker run --rm -e PUSH_MODE=true -e PUSHGATEWAY_URI="http://pushgateway:9091" -e LDAP_URI="ldap://fid-0:2389" -e BIND_DN="cn=Directory Manager" -e BIND_PASSWORD="secret1234" -e INSTANCE_NAME="fid-0" -e JOB_NAME="fid-targets" -e PUSH_METRICS_CRON="*/10 * * * *" -p 9095:9095 --name fid-exporter radiantone/fid-exporter
PULL MODE
...
fid-exporter:
image: radiantone/fid-exporter
environment:
- LDAP_URI=ldap://fid-0:2389
- BIND_DN=cn=Directory Manager
- BIND_PASSWORD=secret1234
ports:
- "9095:9095"
depends_on:
fid-0:
condition: service_healthy
networks:
fid-net:
aliases:
- fid-exporter
...
PUSH MODE
...
fid-exporter:
image: radiantone/fid-exporter
environment:
- PUSH_MODE=true
- PUSHGATEWAY_URI=http://pushgateway:9091
- INSTANCE_NAME=fid-0
- LDAP_URI=ldap://fid-0:2389
- BIND_DN=cn=Directory Manager
- BIND_PASSWORD=secret1234
ports:
- "9095:9095"
depends_on:
fid-0:
condition: service_healthy
networks:
fid-net:
aliases:
- fid-exporter
...
PULL MODE
apiVersion: apps/v1
kind: Deployment
metadata:
name: fid-exporter
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: fid-exporter
replicas: 1
template:
metadata:
labels:
app: fid-exporter
spec:
containers:
- name: fid-exporter
image: radiantone/fid-exporter
env:
- name: LDAP_URI
value: "ldap://HOSTNAME:2389"
- name: BIND_DN
value: "cn=Directory Manager"
- name: BIND_PASSWORD
value: "PASSWORD"
ports:
- containerPort: 9095
PUSH MODE
apiVersion: apps/v1
kind: Deployment
metadata:
name: fid-exporter
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: fid-exporter
replicas: 1
template:
metadata:
labels:
app: fid-exporter
spec:
containers:
- name: fid-exporter
image: radiantone/fid-exporter
env:
- name: PUSH_MODE
value: "true"
- name: PUSHGATEWAY_URI
value: "http://pushgateway:9091"
- name: INSTANCE_NAME
value: "fid-0"
- name: LDAP_URI
value: "ldap://HOSTNAME:2389"
- name: BIND_DN
value: "cn=Directory Manager"
- name: BIND_PASSWORD
value: "PASSWORD"
ports:
- containerPort: 9095
Content type
Image
Digest
sha256:291be4bc0…
Size
190.3 MB
Last updated
about 2 months ago
docker pull radiantone/fid-exporter