Giter Site home page Giter Site logo

wadama / samba_ad_checks Goto Github PK

View Code? Open in Web Editor NEW
2.0 0.0 0.0 344 KB

Simple script sensors for PRTG by Paessler to check the health of a Samba AD

License: GNU General Public License v3.0

Shell 100.00%
paessler prtg prtg-custom-sensor samba domain-controller bash-script

samba_ad_checks's Introduction

Samba AD Checks

Simple script sensors for PRTG by Paessler to check the health of a Samba AD

The first script - ad_check_db.sh - is using samba-tool dbcheck to get just the checked objects and found errors.

The second script - ad_check_rep - is using samba-tool drs showrepl to look for errors in replication. This script uses the JSON output to show the last time of replication and its status. It's similar to the original PRTG sensor except it shows the data for each naming context in one senor. If you're using a samba-tool version which doesn't support json output the old version is still located in the "Old" folder.

Both sensor have set a standard warning limit of zero so when at least one error is counted the sensor goes into warning state.

Prerequisites

Be sure you have set correct logon values for SSH in your device.

I personally use "Login via private key" with an user especially for monitoring which also may use sudo for this script without a password.

Screenshot1

Installing

Place the script to /var/prtg/scriptsxml on your Synology NAS and make it executable. (You may have to create this directory structure because PRTG expects the script here.)

For ad_check_db.sh:

wget https://raw.githubusercontent.com/WAdama/Samba_AD_Checks/master/ad_check_db.sh
chmod +x ad_check_db.sh

For ad_check_rep.sh:

wget https://raw.githubusercontent.com/WAdama/Samba_AD_Checks/master/ad_check_rep.sh
chmod +x ad_check_db.sh

On your PRTG system place the file prtg.standardlookups.nas.adstatus.ovl in INSTALLDIR\PRTG Network Monitor\lookups\custom and refresh it under System Administration / Administrative Tools

In PRTG create under your device which represents your Samba AD DC a SSH custom advanced senor.

Choose under "Script" the script you want to use and enter for the mail versions under "Parameters" the e-mail address which should get the mails.

Example for ad_check_db.sh sensor:

Screenshot1

Example for ad_check_rep.sh sensor:

Screenshot1

samba_ad_checks's People

Contributors

wadama avatar

Stargazers

 avatar  avatar

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.