This plugin gathers metrics from 389 Directory Servers's cn=Monitor backend and cn=monitor,cn=${database},cn=ldbm database,cn=plugins,cn=config for each indexes and database files.
This EXECD Shim started out as a normal plugin merge request by:
Original Pull Request: influxdata#6117
- Connect to 389DS server
- LDAP ( With StartTLS )
- LDAPS
- LDAPI
- Basic Stats
- LDBM Stats
- Per Database
- Connections
A telegraf + this execd shim is published to ()
To build your own custom container with multiple plugins then see Dockerfile for an example. See docker-compose.yml for an example for a local environment when running 389ds in a container.
A static binary can be produced and deployed for a locally installed telegraf. To do this run:
go build -o telegraf-execd-389ds-db-input cmd/main.go
When developing locally please follow the below steps:
- docker-compose up --build
- < wait for 389ds instance to provision >
- docker exec -it ds "/bin/sh -c 'bootstap-389ds.sh'"
[[inputs.ds389_db]]
# Connection URL to 389DS Server
# ldap / ldaps / ldapi supported
url = "ldap://localhost:389"
# Enable starttls, not needed for ldaps/ldapi
starttls = true
# skip peer certificate verification. Default is false.
insecure_skip_verify = false
# Path to PEM-encoded Root certificate to use to verify server certificate
tls_ca = "/etc/ssl/certs.pem"
# dn/password to bind with. If bind_dn is empty, an anonymous bind is performed.
bind_dn = ""
bind_password = ""
## Gather dbname to monitor
# Comma separated list of db filename
# dbtomonitor = ["exampleDB"]
# If true, alldbmonitor monitors all db and overrides "dbtomonitor".
alldbmonitor = false
# Collects individual fields for connections.
expand_connections = true
All attributes are gathered based on this LDAP query:
(objectClass=extensibleObject)
Metric names are attributes name.
If dbtomonitor array is provided , it can gather metrics for each dbfilename like uniquemember, memberof, givename indexes.
If alldbmonitor = true
, dbtomonitor
will be overriden with all dbs currently installed in the Directory Server.
An 389DS 2.x.x server will provide these metrics:
- ds389
- tags:
- url
- tags:
- fields:
- currentconnections
- totalconnections
- currentconnectionsatmaxthreads
- maxthreadsperconnhits
- dtablesize
- readwaiters
- opsinitiated
- opscompleted
- entriessent
- bytessent
- anonymousbinds
- unauthbinds
- simpleauthbinds
- strongauthbinds
- bindsecurityerrors
- inops
- readops
- compareops
- addentryops
- removeentryops
- modifyentryops
- modifyrdnops
- listops
- searchops
- onelevelsearchops
- wholesubtreesearchops
- referrals
- chainings
- securityerrors
- errors
- connections
- connectionseq
- connectionsinmaxthreads
- connectionsmaxthreadscount
- bytesrecv
- bytessent
- entriesreturned
- referralsreturned
- masterentries
- copyentries
- cacheentries
- cachehits
- slavehits
If you enable the expand_connection
a full connection status detail will be added to the metrics.
If expand_connections = true
the connection
attribute will be parsed in this metric:
- the metric prefix is "conn."
- the file dscriptor is then added to the metric name
- the name of the monitored parameter is then concatenated with a dot
Format:
conn.<fd>.<param> = <value>
- url= # value from config