• English日本語한국어
  • Log inStart now

Nextcloud integration

With our Nextcloud dashboard, you can easily track the number of files in your system, your user accounts, and your database size. Built with our infrastructure agent and Prometheus OpenMetrics integration, the Nextcloud integration gives you a set of default that let you view your most critical data all in one place.

After setting up the Nextcloud integration with New Relic, your data displays in dashboards like these right out of the box.

Prerequisites

To get your Nextcloud data in New Relic, you need to:

Install the infrastructure agent

To get data into New Relic, install our infrastructure agent. Our infrastructure agent collects and ingests data so you can keep track of your app’s performance.

You can install the infrastructure agent two different ways:

  • Our guided install is a CLI tool that inspects your system and installs the infrastructure agent alongside the application monitoring agent that best works for your system. To learn more about how our guided install works, check out our Guided install overview.
  • If you'd rather install our infrastructure agent manually, you can follow a tutorial for manual installation for Linux, Windows, or macOS.

Export Nextcloud data

To start the integration process, you need to export your Nextcloud metrics with nextcloud-exporter. This eventually allows our Prometheus OpenMetrics integration to ingest data into New Relic. After you've exposed your metrics, you need to complete token authentication.

Integrate Prometheus OpenMetrics with Nextcloud

With the infrastructure agent installed, you need to establish a line of communication between Nextcloud and New Relic with our Prometheus OpenMetrics integration. Prometheus OpenMetrics scrapes your exposed Nextcloud data so they appear in our prebuilt dashboards.

  1. Follow our instructions to install our Prometheus OpenMetrics integration.

  2. Navigate to /etc/newrelic-infra/integrations.d, the folder you installed the Prometheus OpenMetrics integration in, and create a file named nri-prometheus.config.yml.

  3. Copy the contents of the nri-prometheus.config.yml sample file, and paste them in your nri-prometheus.config.yml file. To get server-related information, replace the URL value inside the targets key. The URL should match the URL associated with your exposed Nextcloud metrics:

    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. Restart your New Relic infrastructure service.

  5. Install the Nextcloud quickstart to get our pre-built dashboards.

Query your data using NRQL

Use this sample query to view your Lighttpd metrics captured on one.newrelic.com:

Here's an example of NRQL query checking the number of active users for the last 5 minutes:

SELECT latest(nextcloud_active_users_total) FROM Metric

Here's an example of NRQL query checking the number of active users in the last 24 hours:

SELECT latest(nextcloud_active_users_daily_total) FROM Metric

What's next?

To learn more about building NRQL queries and generating dashboards:

Troubleshooting

Problem

Every time you open a page in Nextcloud, you see this error message:

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

Solution

  1. Check the status of the Nextcloud encryption by running:
    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:status
  2. If you see enabled: false, enable the encryption by running:
    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:enable
  3. Verify that the encryption is enabled by running:
    bash
    $
    sudo -u www-data php /var/www/html/occ encryption:status

Now, exit Nextcloud and refresh your Nextcloud browser session. You shouldn't see the error message anymore.

Copyright © 2023 New Relic Inc.

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