GithubHelp home page GithubHelp logo

389ds-exporter's Introduction

Prometheus exporter for 389-DS LDAP Server

The directory server 389 export there metric on ldap cn=monitor base (and generaly are accesible anonymously):

# ldapsearch -H ldap://localhost:389 -x -s sub -b "cn=monitor" "(objectclass=*)"
# extended LDIF
#
# LDAPv3
# base <cn=monitor> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#

# monitor
dn: cn=monitor
objectClass: top
objectClass: extensibleObject
cn: monitor
version: 389-Directory/1.3
threads: 24
currentconnections: 311
totalconnections: 423687
currentconnectionsatmaxthreads: 0
maxthreadsperconnhits: 0
dtablesize: 4096
readwaiters: 0
opsinitiated: 2661473
opscompleted: 2661472
entriessent: 2090672
bytessent: 2120635985
currenttime: 20220919133733Z
starttime: 20220918211529Z
nbackends: 1
backendmonitordn: cn=monitor,cn=userRoot,cn=ldbm database,cn=plugins,cn=config

# counters, monitor
dn: cn=counters,cn=monitor
objectClass: top
objectClass: extensibleObject
cn: counters

# snmp, monitor
dn: cn=snmp,cn=monitor
objectClass: top
objectClass: extensibleObject
cn: snmp
anonymousbinds: 64
unauthbinds: 66
simpleauthbinds: 370138
strongauthbinds: 0
bindsecurityerrors: 1267
inops: 2661473
readops: 0
compareops: 18
addentryops: 185
removeentryops: 39
modifyentryops: 333086
modifyrdnops: 0
listops: 0
searchops: 1457101
onelevelsearchops: 777376
wholesubtreesearchops: 582662
referrals: 0
chainings: 0
securityerrors: 1011
errors: 1509
connections: 311
connectionseq: 423687
connectionsinmaxthreads: 0
connectionsmaxthreadscount: 0
bytesrecv: 0
bytessent: 2120635985
entriesreturned: 2090672
referralsreturned: 0
masterentries: 0
copyentries: 0
cacheentries: 0
cachehits: 0
slavehits: 0

# search result
search: 2
result: 0 Success

# numResponses: 4
# numEntries: 3

This exporter request ldap cn=Monitor tree to export the metric in prometheus format.

To build the exporter:

go build

Exporter usage

usage: 389DS-exporter [<flags>]

Flags:
  -h, --help                 Show context-sensitive help (also try --help-long and --help-man).
      --web.listen-address=":9313"
                             Address to listen on for web interface and telemetry.
      --web.telemetry-path="/metrics"
                             Path under which to expose metrics.
      --ldap.ServerFQDN="localhost"
                             FQDN of the target LDAP server
      --ldap.ServerPort=389  Port to connect on LDAP server
      --version              Show application version.

By default the exporter listen on http://0.0.0.0:9313/metrics.

Start as systemd service

Copy 389DS-exporter to /usr/local/bin.

Modify 389DS-exporter flags in 389DS-exporter.service.

Enable and Start the exporter.

# systemctl enable $PWD/389DS-exporter.service
# systemctl start 389DS-exporter.service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.