• /
  • EnglishEspañol日本語한국어Português
  • 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.

Docs site

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

Complete the following steps to install the integration:

Install the infrastructure agent

To use the Nextcloud integration, you need to first install the infrastructure agent on the same host. The infrastructure agent monitors the host itself, while the integration you'll install in the next step extends your monitoring with Nexcloud-specific data.

Configure NRI-Flex for Nextcloud

Our flex integration comes bundled with the New Relic infrastructure agent and is used to send your Nextcloud data to New Relic. To create a flex configuration file follow these steps:

  1. Create a file named nri-flex-nextcloud.yml in /etc/newrelic-infra/integrations.d

  2. Use our configuration template to update the fields YOUR_EVENT_TYPE and YOUR_HOST_IP in the file named nri-flex-nextcloud.yml. The value on the event_type is used to store metrics in the NRDB. For example, you can update EVENT_TYPE to NextcloudFlexMetrics

    Your nri-flex-nextcloud.yml file should look like this:

    integrations:
    - name: nri-flex
    config:
    name: nextcloudFlex
    global:
    base_url: http://YOUR_HOST_IP/ocs/v2.php/apps/serverinfo/api/v1/
    user: nextcloud_username
    pass: nextcloud_password
    apis:
    - event_type: YOUR_EVENT_TYPE
    url: info?format=json

    Metrics for Nextcloud are available at the following URL: http://YOUR_HOST_IP/ocs/v2.php/apps/serverinfo/api/v1/info?format=json

Forward Nextcloud logs to New Relic

You can use log forwarding to forward Nextcloud logs to New Relic:

  1. Create a log file named logging.yml in /etc/newrelic-infra/logging.d/

  2. Add the following script to the logging.yml file:

    logs:
    - name: nextcloud.log
    file: /var/www/nextcloud/data/nextcloud.log
    attributes:
    logtype: nextcloud_log

Restart the New Relic infrastructure agent

Before you can start using your data, restart your infrastructure agent.

The following command should work for most systems:

bash
$
sudo systemctl restart newrelic-infra.service

Find your data

You can choose our pre-built dashboard template named Nextcloud to monitor your Nextcloud server metrics. Follow these steps to use our pre-built dashboard template:

  1. From one.newrelic.com, go to the + Integrations & Agents page.

  2. Click on Dashboards.

  3. In the search bar, type Nextcloud.

  4. The Nextcloud dashboard should appear. Click on it to install it.

    Your Nextcloud dashboard is considered a custom dashboard and can be found in the Dashboards UI. For docs on using and editing dashboards, see our dashboard docs.

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

    FROM NextcloudFlexMetrics SELECT latest(ocs.data.activeUsers.last5minutes)

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

    FROM NextcloudFlexMetrics SELECT latest(ocs.data.activeUsers.last24hours)

What's next?

To learn more about building NRQL queries and generating dashboards:

Copyright © 2024 New Relic Inc.

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