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 [email protected].
概要
このチェックは、Datadog Agent を通じて Harbor を監視します。
セットアップ
インストール
Harbor チェックは Datadog Agent パッケージに含まれています。サーバーに追加でインストールする必要はありません。
構成
ホスト
ホストで実行中の Agent に対してこのチェックを構成するには
メトリクスの収集
Harbor のパフォーマンスデータを収集するには、Agent のコンフィギュレーションディレクトリのルートにある conf.d/ フォルダーの harbor.d/conf.yaml ファイルを編集します。使用可能なすべてのコンフィギュレーションオプションについては、サンプル harbor.d/conf.yaml を参照してください。
注: コンフィギュレーションではいずれのタイプのユーザーも指定できますが、ディスクメトリクスを取得するには、管理者アクセス許可を持つアカウントが必要です。メトリクス harbor.projects.count には、指定したユーザーがアクセスできるプロジェクトの数だけが反映されます。
Agent を再起動します。
ログ収集
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。以下のように、datadog.yaml でこれを有効にする必要があります。
Harbor のログの収集を開始するには、次の構成ブロックを harbor.d/conf.yaml ファイルに追加します。
logs:
- type: file
path: /var/log/harbor/*.log
source: harbor
service: '<SERVICE_NAME>'
Agent を再起動します。
コンテナ化
コンテナ環境の場合は、オートディスカバリーのインテグレーションテンプレートのガイドを参照して、次のパラメーターを適用してください。
メトリクスの収集
| パラメーター | 値 |
|---|
<INTEGRATION_NAME> | harbor |
<INIT_CONFIG> | 空白または {} |
<INSTANCE_CONFIG> | {"url": "https://%%host%%", "username": "<ユーザー_ID>", "password": "<ユーザーパスワード>"} |
ログ収集
Agent バージョン 6.0 以降で利用可能
Datadog Agent で、ログの収集はデフォルトで無効になっています。有効にする方法については、Kubernetes ログ収集を参照してください。
| パラメーター | 値 |
|---|
<LOG_CONFIG> | {"source": "harbor", "service": "<サービス名>"} |
検証
Agent の status サブコマンドを実行し、Checks セクションで harbor を探します。
収集データ
メトリクス
| |
|---|
harbor.disk.free (gauge) | The amount of storage space that is free. Shown as byte |
harbor.disk.total (gauge) | The total amount of storage space. Shown as byte |
harbor.projects.count (gauge) | The total number of projects. |
harbor.registry.read_only (gauge) | The ‘read_only’ status of a registry. |
イベント
Harbor インテグレーションには、イベントは含まれません。
サービスチェック
harbor.can_connect
Returns OK if the Harbor API is reachable and authentication is successful, otherwise returns CRITICAL.
Statuses: ok, critical
harbor.status
Returns OK if the specified Harbor component is healthy, otherwise returns CRITICAL. Returns UNKNOWN with Harbor < 1.5.
Statuses: ok, unknown, critical
harbor.registry.status
Returns OK if the service is healthy, otherwise returns CRITICAL. Monitors the health of external registries used by Harbor for replication.
Statuses: ok, critical
トラブルシューティング
ご不明な点は、Datadog のサポートチームまでお問合せください。