• English日本語한국어
  • ログイン今すぐ開始

この機械翻訳は参考用に提供されます。

英語版と翻訳版に矛盾がある場合は、英語版が優先されます。詳細については、 を参照してください。

問題を作成する

Nextcloud 統合

Nextcloud ダッシュボードを使用すると、システム内のファイル数、ユーザー アカウント、およびデータベース サイズを簡単に追跡できます。インフラストラクチャ エージェントと Prometheus OpenMetrics の統合で構築された Nextcloud 統合により、デフォルトの一連の 最も重要なデータをすべて 1 か所で表示できます。

Nextcloud と New Relic の統合をセットアップすると、すぐにこのようなダッシュボードにデータが表示されます。

前提条件

New Relic で Nextcloud データを取得するには、以下を行う必要があります。

インフラストラクチャエージェントをインストールします

New Relic にデータを取得するには、インフラストラクチャ エージェントをインストールします。当社のインフラストラクチャ エージェントはデータを収集して取り込むため、アプリのパフォーマンスを追跡できます。

インフラストラクチャ エージェントは、次の 2 つの方法でインストールできます。

  • ガイド付きインストールは、システムを検査し、システムに最適なアプリケーション監視エージェントとともにインフラストラクチャ エージェントをインストールする CLI ツールです。ガイド付きインストールの仕組みの詳細については、ガイド付きインストールの概要をご覧ください。
  • インフラストラクチャ エージェントを手動でインストールする場合は、 LinuxWindows、または macOSの手動インストールのチュートリアルに従うことができます。

Nextcloud データのエクスポート

統合プロセスを開始するには、Nextcloud 指標をnextcloud-exporterでエクスポートする必要があります。これにより、最終的に Prometheus OpenMetrics 統合がデータを New Relic に取り込むことができるようになります。メトリクスを公開したら、トークン認証を完了する必要があります。

Prometheus OpenMetrics を Nextcloud と統合する

インフラストラクチャ エージェントをインストールしたら、Prometheus OpenMetrics 統合を使用して、Nextcloud と New Relic の間の通信回線を確立する必要があります。Prometheus OpenMetrics は、公開された Nextcloud データをスクレイピングして、構築済みのダッシュボードに表示します。

  1. 指示に従って、 Prometheus OpenMetrics 統合をインストールします。

  2. Prometheus OpenMetrics 統合をインストールしたフォルダーである /etc/newrelic-infra/integrations.dに移動し、 nri-prometheus.config.ymlという名前のファイルを作成します。

  3. nri-prometheus.config.yml サンプル ファイルの内容をコピーし、 nri-prometheus.config.yml ファイルに貼り付けます。サーバー関連の情報を取得するには、 targets キー内の URL 値を置き換えます。URL は、公開された Nextcloud メトリクスに関連付けられた URL と一致する必要があります。

    integrations:
    - name: nri-prometheus
    config:
    # When standalone is set to false nri-prometheus requires an infrastructure agent to work and send data. Defaults to true
    standalone: false
    # When running with infrastructure agent emitters will have to include infra-sdk
    emitters: infra-sdk
    # The name of your cluster. It's important to match other New Relic products to relate the data.
    cluster_name: "my_exporter"
    targets:
    - description: Secure etcd example
    urls: ["http://127.0.0.1:9205"]
    # tls_config:
    # ca_file_path: "/etc/etcd/etcd-client-ca.crt"
    # cert_file_path: "/etc/etcd/etcd-client.crt"
    # key_file_path: "/etc/etcd/etcd-client.key"
    # Whether the integration should run in verbose mode or not. Defaults to false.
    verbose: false
    # Whether the integration should run in audit mode or not. Defaults to false.
    # Audit mode logs the uncompressed data sent to New Relic. Use this to log all data sent.
    # It does not include verbose mode. This can lead to a high log volume, use with care.
    audit: false
    # The HTTP client timeout when fetching data from endpoints. Defaults to "5s" if it is not set.
    # scrape_timeout: "5s"
    # Length in time to distribute the scraping from the endpoints. Default to "30s" if it is not set.
    scrape_duration: "5s"
    # Number of worker threads used for scraping targets.
    # For large clusters with many (>400) endpoints, slowly increase until scrape
    # time falls between the desired `scrape_duration`.
    # Increasing this value too much will result in huge memory consumption if too
    # many metrics are being scraped.
    # Default: 4
    # worker_threads: 4
    # Whether the integration should skip TLS verification or not. Defaults to false.
    insecure_skip_verify: false
    timeout: 10s
  4. New Relic インフラストラクチャ サービスを再起動します

  5. Nextcloud クイックスタート をインストールして、事前に構築されたダッシュボードを入手します。

NRQL を使用してデータをクエリする

このサンプルクエリを使用して、 one.newrelic.comでキャプチャされた Lighttpd メトリクスを表示します。

過去 5 分間のアクティブ ユーザー数をチェックする NRQL クエリの例を次に示します。

SELECT latest(nextcloud_active_users_total) FROM Metric

過去 24 時間のアクティブ ユーザー数をチェックする NRQL クエリの例を次に示します。

SELECT latest(nextcloud_active_users_daily_total) FROM Metric

次は何ですか?

NRQL クエリの構築とダッシュボードの生成について詳しくは、以下をご覧ください。

トラブルシューティング

問題

Nextcloud でページを開くたびに、次のエラー メッセージが表示されます。

bash
$
Invalid private key for encryption app. Please update your private key password in your personal settings to recover access to your encrypted files.

解決

  1. 次のコマンドを実行して、Nextcloud 暗号化のステータスを確認します。

    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:status
  2. enabled: falseが表示された場合は、次のコマンドを実行して暗号化を有効にします。

    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:enable
  3. 次のコマンドを実行して、暗号化が有効になっていることを確認します。

    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:status

ここで、Nextcloud を終了し、Nextcloud ブラウザー セッションを更新します。エラー メッセージはもう表示されないはずです。

Copyright © 2023 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.