NavigationContentFooter
Jump toSuggest an edit

Monitoring Systems with Netdata

Reviewed on 13 December 2023Published on 07 February 2020
  • monitoring
  • Netdata
  • server
  • discord

Netdata is a system monitoring system, designed to be distributed, lightweight, flexible and open source. The source code is available for download from GitHub.

The application can detect hundreds of metrics automatically, simplifying their configuration and integration. The application’s core is written in C and hundreds of collectors are available to collect thousands of different metrics while being very lightweight and not requiring additional computing power. Netdata can either run autonomously, without any third-party components, or it can be integrated to existing monitoring toolchains like Prometheus, Graphite, OpenTSDB, Kafka, Grafana, and more.

Before you start

To complete the actions presented below, you must have:

  • A Scaleway account logged into the console
  • Owner status or IAM permissions allowing you to perform actions in the intended Organization
  • An SSH key
  • 4 Instances

Installing Netdata

  1. Connect to your Instance via SSH.

  2. Update the repository lists of the apt package manager and use the upgrade command to upgrade the software already installed on the Instance:

    apt update && apt upgrade -y
  3. Run the automatic installer of Netdata:

    bash <(curl -Ss https://my-netdata.io/kickstart.sh)

    The automatic installer will run some tests to the detect the operating system version and install additional dependencies using the apt package manager. During the automatic installation, you will be asked to confirm the installation of additional packages using apt several times. When prompted, press Enter or Y to validate.

    Successfully installed the Netdata Agent.
    Official documentation can be found online at https://learn.netdata.cloud/docs/.
    Looking to monitor all of your infrastructure with Netdata? Check out Netdata Cloud at https://app.netdata.cloud.
    Join our community and connect with us on:
    - GitHub: https://github.com/netdata/netdata/discussions
    - Discord: https://discord.gg/5ygS846fR6
    - Our community forums: https://community.netdata.cloud/

    Optionally, Netdata sends by default anonymous usage statistics to Google Analytics to identify how the product is used and also for quality assusrance statistics.

    It is possible to opt-out from these statistics using an empty file called .opt-out-from-anonymous-statistics which stored in the Netdata configuration directory. It stops the statistics script from running.

  4. Create the file using the touch command:

    touch /etc/netdata/.opt-out-from-anonymous-statistics

Logging into Netdata

  1. Open a web browser on your local computer, for example Chrome or Firefox.
  2. Point it to http://<netdata_instance_ip>:19999/ (replace <netdata_instance_ip> with the public IP address of your instance.)
  3. The Netdata dashboard displays:

By default, Netdata monitors a wide list of services on the machine. Browse around to see the details of all of them.

Adding multiple nodes into Netdata

Netdata is a distributed application, and it is possible to add multiple nodes to a single account.

  1. From the Netdata dashboard, click Sign in.
  2. The Netdata Cloud splash screen displays. Enter your email address to generate a magic link. Alternatively, use a Google or GitHub account to authenticate.
  3. Click the magic link, sent to the email address entered in the previous step.2. The Netdata Cloud splash screen displays. Enter your email address to generate a magic link. Alternatively, use a Google or GitHub account to authenticate.
  4. Click the magic link, sent to the email address entered in the previous step.

Configuring additional metrics

Netdata comes by default with a broad range of internal plugins to gather system statistics. To collect non-system metrics, Netdata supports many data collection plugins for various software, like web servers, load balancers, mail servers and more. While internal plugins are written in the C programming language and run as threads inside the netdata daemon, external plugins may be written in any programming language and are spawned as independent long-running processes by the netdata daemon and communicate with the netdata daemon via pipes (stdout communication).

To facilitate the plugin development and to limit the number of threads and processes, Netdata supports plugin orchestrators. Currently, there are orchestrators available for four different programming languages: C, python, node.js and bash.

In the following example, a plugin to monitor a NGINX web server using Netdata is being configured.

The plugin relies on data provided by the Nginx module stub_status.

  1. Add the following configuration in a Nginx server block:
    location /stub_status {
    stub_status;
    # for security reasons: only allow access from the localhost.
    allow 127.0.0.1;
    # deny anyone else
    deny all;
    }
  2. Edit the Nginx plugin configuration file (go.d/nginx.conf) using edit-config from the Netdata config directory:
    cd /etc/netdata # Replace this path with your Netdata config directory
    ./edit-config go.d/nginx.conf
  3. Configure the URL to the server’s stub_status:
    jobs:
    - name: local
    url: http://127.0.0.1/stub_status
    Tip

    It is also possible to monitor remote servers by adding them as follows to the configuration file:

    jobs:
    - name: remote
    url: http://51.15.115.34/stub_status
  4. Restart the Netdata service:
    service netdata restart
  5. Point your web browser to the Netata interface and click nginx local in the menu on the right. The Nginx statistics displays:

For more information regarding all available plugins, refer to the official Netdata documentation.

Note

For security reasons, it is recommended to set up a Nginx reverse proxy and to block access to the application from the internet using a firewall.

Docs APIScaleway consoleDedibox consoleScaleway LearningScaleway.comPricingBlogCarreer
© 2023-2024 – Scaleway