Skip to content

Prometheus exporter for Active Directory users (check Locked status & Time)

Notifications You must be signed in to change notification settings

RRay13/adusers_exporter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prometheus exporter for Active Directory users (check Locked status & Time)

Folders:

  • exporter - Exporter script prometheus_aduser_exporter.py, Dockerfile for building image
  • templates - Helm chart
  • grafana - Grafana dashboard

Exporter check Locked status & Time for Active Directory users

How-to

  • Install Python3 and requirment modules:
sudo apt install python3
sudo apt install python3-ldap python3-prometheus-client

or

pip3 install python3-ldap python3-prometheus-client
  • Set environment variables (use env.sh script)
  • Run script:
python3 prometheus_aduser_exporter.py
  • Check status:
curl http://127.0.0.1:9111

Build Docker container

Build container as usually:

docker build --network host --tag prometheus-aduser-exporter:latest .

docker-compose.yaml

version: '3.8'

services:
  ad:
    image: prometheus-aduser-exporter:latest
    container_name: aduser-exporter
    restart: always
    ports:
      - "9111:9111"
    environment:
      # Capital var in code
      # ldap or ldaps with your services
      - 'AD_SERVER=ldap://your.ldap.domain'
      - 'AD_SEARCH_TREE=DC=your,DC=domain'
      - 'AD_USER=your-account'
      - 'AD_PASSWORD=your-password'

Helm

You may use Helm-chart for your Kubernetes cluster

About

Prometheus exporter for Active Directory users (check Locked status & Time)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 82.6%
  • Smarty 11.7%
  • Shell 3.4%
  • Dockerfile 2.3%