To find out if this integration is available in your organization, see your Datadog Integrations page or ask your organization administrator.
To initiate an exception request to enable this integration for your organization, email support@ddog-gov.com.
概要
OpenLDAP インテグレーションを使用すると、OpenLDAP サーバーの cn=Monitor バックエンドからメトリクスを取得できます。
セットアップ
インストール
OpenLDAP インテグレーションは Agent とパッケージ化されています。OpenLDAP メトリクスの収集を開始するには、以下を実行します。
- OpenLDAP サーバーで
cn=Monitor バックエンドを構成します。 - OpenLDAP サーバーに Agent をインストールします。
構成
OpenLDAP の準備
サーバーで cn=Monitor バックエンドが構成されていない場合は、以下の手順に従ってください。
インストールでモニターが有効化されていることを確認します。
sudo ldapsearch -Y EXTERNAL -H ldapi:/// -b cn=module{0},cn=config
olcModuleLoad: back_monitor.la という行が表示される場合は、モニターはすでに有効化されています。手順 3 に進んでください。
サーバーでモニタリングを有効にします。
cat <<EOF | sudo ldapmodify -Y EXTERNAL -H ldapi:///
dn: cn=module{0},cn=config
changetype: modify
add: olcModuleLoad
olcModuleLoad: back_monitor.la
EOF
slappasswd で暗号化パスワードを作成します。
新しいユーザーを追加します。
cat <<EOF | ldapadd -H ldapi:/// -D <YOUR BIND DN HERE> -w <YOUR PASSWORD HERE>
dn: <USER_DISTINGUISHED_NAME>
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: <COMMON_NAME_OF_THE_NEW_USER>
description: LDAP monitor
userPassword:<PASSWORD>
EOF
モニターデータベースを構成します。
cat <<EOF | sudo ldapadd -Y EXTERNAL -H ldapi:///
dn: olcDatabase=Monitor,cn=config
objectClass: olcDatabaseConfig
objectClass: olcMonitorConfig
olcDatabase: Monitor
olcAccess: to dn.subtree='cn=Monitor' by dn.base='<USER_DISTINGUISHED_NAME>' read by * none
EOF
OpenLDAP インテグレーションの構成
ホスト
ホストで実行中の Agent に対してこのチェックを構成するには
メトリクスの収集
Agent のコンフィギュレーションディレクトリのルートにある conf.d フォルダーの openldap.d/conf.yaml を編集します。使用可能なすべてのコンフィギュレーションオプションについては、サンプル openldap.d/conf.yaml を参照してください。
init_config:
instances:
## @param url - string - required
## Full URL of your ldap server. Use `ldaps` or `ldap` as the scheme to
## use TLS or not, or `ldapi` to connect to a UNIX socket.
#
- url: ldaps://localhost:636
## @param username - string - optional
## The DN of the user that can read the monitor database.
#
username: "<USER_DISTINGUISHED_NAME>"
## @param password - string - optional
## Password associated with `username`
#
password: "<PASSWORD>"
Agent を再起動します。
ログ収集
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml ファイルでこれを有効にします。
OpenLDAP のログの収集を開始するには、次のコンフィギュレーションブロックを openldap.d/conf.yaml ファイルに追加します。
logs:
- type: file
path: /var/log/slapd.log
source: openldap
service: "<SERVICE_NAME>"
path パラメーターと service パラメーターの値を変更し、環境に合わせて構成してください。使用可能なすべてのコンフィギュレーションオプションの詳細については、サンプル openldap.d/conf.yaml を参照してください。
Agent を再起動します。
コンテナ化
メトリクスの収集
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
| パラメーター | 値 |
|---|
<INTEGRATION_NAME> | openldap |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"url":"ldaps://%%host%%:636","username":"<ユーザーの識別名>","password":"<パスワード>"} |
ログ収集
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。
| パラメーター | 値 |
|---|
<LOG_CONFIG> | {"source": "openldap", "service": "<サービス名>"} |
検証
Agent の status サブコマンドを実行し、Checks セクションで openldap を探します。
互換性
このチェックは、すべての主要プラットフォームと互換性があります。
収集データ
メトリクス
| |
|---|
openldap.bind_time (gauge) | Time it takes the check to bind to the OpenLDAP server Shown as second |
openldap.connections.current (gauge) | Current number of active connections Shown as connection |
openldap.connections.max_file_descriptors (gauge) | Maximum number of file descriptors Shown as file |
openldap.connections.total (count) | Total number of connections since the server started Shown as connection |
openldap.operations.completed (count) | Number of operations completed by the server tagged by operation type Shown as operation |
openldap.operations.completed.total (count) | Total number of operations completed by the server Shown as operation |
openldap.operations.initiated (count) | Number of operations initiated by the server tagged by operation type Shown as operation |
openldap.operations.initiated.total (count) | Total number of operations initiated by the server Shown as operation |
openldap.query.duration (gauge) | Time it takes to execute the query Shown as second |
openldap.query.entries (gauge) | Number of entries returned by the query Shown as entry |
openldap.statistics.bytes (count) | Number of bytes sent by the server Shown as byte |
openldap.statistics.entries (count) | Number of entries sent by the server Shown as entry |
openldap.statistics.pdu (count) | Number of PDU packets sent by the server Shown as packet |
openldap.statistics.referrals (count) | Number of referrals sent by the server Shown as message |
openldap.threads (gauge) | Number of threads started by the server tagged by state Shown as thread |
openldap.threads.max (gauge) | Maximum number of threads as configured Shown as thread |
openldap.threads.max_pending (gauge) | Maximum number of pending threads Shown as thread |
openldap.uptime (gauge) | Uptime of the server Shown as second |
openldap.waiter.read (gauge) | Number of current read waiters Shown as worker |
openldap.waiter.write (gauge) | Number of current writer waiters Shown as worker |
イベント
openldap チェックには、イベントは含まれません。
サービスチェック
openldap.can_connect
Returns CRITICAL if the integration cannot bind to the monitored OpenLDAP server, OK otherwise.
Statuses: ok, critical
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問合せください。