Skip to content

Commit

Permalink
Ethical Metrics updated
Browse files Browse the repository at this point in the history
  • Loading branch information
mateumiralles committed Mar 28, 2024
1 parent 093f1b6 commit 86aed84
Show file tree
Hide file tree
Showing 9 changed files with 96 additions and 73 deletions.
26 changes: 16 additions & 10 deletions docs/user/ethical-metrics/metrics.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# Metrics Collected by Ethical Metrics

Dappnode has absolutely no hidden telemetry and is completely private by design. We were reluctant of setting up a Monitoring Service because we did NOT want to collect any data from our users. Because of the request of our users to offer alerts, we came up with a private solution so we can offer alerts without compromising your privacy.
Dappnode has absolutely no hidden telemetry and is completely private by design. We were reluctant of setting up a monitoring service because we did NOT want to collect any data from our users. Because of our community's continuous requests to offer alerts, we came up with a solution that doesn't compromise your privacy.

Even if we cannot associate the metrics that your Dappnode sends with you, **we are fully committed to maintaining total transparency about the metrics we collect from your dappnode when using Ethical Metrics**. We want you to have a clear understanding of the information that is being monitored. The metrics we collect fall into several categories. Here's an overview of the metrics we gather.
Even if we can't link the metrics from your Dappnode to your identity, **we are fully committed to maintain total transparency about the metrics we collect from your Dappnode when using Ethical Metrics**. We want you to have a clear understanding of the information that is being monitored. The metrics we collect fall into several categories. Here's an overview of the metrics we gather.

:::info
These metrics also help us better allocate resources by knowing what our users are running on their dappnodes. This way, we can better understand what packages are most popular and what packages need improvement.
These metrics also help us better allocate resources by knowing what our users are running on their Dappnodes. This way, we can better understand which packages are the most popular and which ones need improvement.
:::

:::note
Ethical Metrics is one of our newest packages and it is still under improvement. This section will be updated as we add or remove metrics.
Ethical Metrics is one of our newest packages and it is still under constant improvement. This section will be updated as we add or remove metrics.
:::

## Dappnode host metrics

These are all the metrics related directly to the host machine running your dappnode. All of these metrics are collected by the Dappnode Exporter package.
These are all the metrics related directly to the host machine running your Dappnode. All of these metrics are collected by the Dappnode Exporter package.

- `node_cpu_seconds_total`: Total CPU usage in seconds by the node.
- `container_memory_usage_bytes`: Memory usage in bytes by containers.
- `container_memory_cache`: Memory cache usage by containers.
Expand All @@ -33,8 +34,10 @@ These are all the metrics related directly to the host machine running your dapp
- `container_cpu_usage_seconds_total`: Total CPU usage in seconds by containers.

## Dappmanager metrics
The following are all the metrics related to your dappnode configuration. These are all stored in your dappmanager.
- `dappmmanager_staker_config`: Your current staking package.

The following are all the metrics related to your Dappnode's configuration. These are all stored in your Dappmanager.

- `dappmmanager_staker_config`: Your current staking package.
- `dappmanager_ipfs_client_target_local`: Wether IPFS client is in local or remote mode.
- `dappmanager_eth_fallback_enabled`: Wether the ethereum fallback client is enabled.
- `dappmanager_eth_client_target_local`: Wether ethereum client is in local or remote mode.
Expand All @@ -43,7 +46,9 @@ The following are all the metrics related to your dappnode configuration. These
- `dappmanager_host_info`: Details including Docker and Docker Compose versions, kernel version, operating system version, and architecture type.

## Staking Metrics
The following metrics are all related directly to the staking packages, including web3signer.

The following metrics are all related directly to the staking packages, including Web3Signer.

- `eth2_slashingprotection_prevented_signings`: Number of prevented slashing signings.
- `signing_signers_loaded_count`: Count of loaded validators signing in web3signer.
- `signing_bls_signing_duration`: Duration of BLS signing.
Expand All @@ -55,9 +60,10 @@ The following metrics are all related directly to the staking packages, includin
- `api_rpc_cons_syncing`: Wether your staking execution clients are syncing.
- `api_rpc_exec_syncing`: Wether your staking consensus clients are syncing.

To sum it up, the metrics we collect give us a peek into how your Dappnode is doing overall, how it allocates resources, memory, disk, and even info related to staking performance.

To sum it up, the metrics we collect give us a peek into how your dappnode is doing, like how it uses resources, memory, disk, and even info related to staking. Rest assured, your privacy is of utmost importance to us, and all data transmission occurs through the TOR network to protect your privacy.
Your privacy is of utmost importance to us. Remember that all this data transmission occurs through the TOR network to protect your privacy.

:::note
For any questions or concerns about the metrics collected by Ethical Metrics, feel free to reach out to our support team.
:::
:::
13 changes: 0 additions & 13 deletions docs/user/ethical-metrics/notifications.md

This file was deleted.

55 changes: 7 additions & 48 deletions docs/user/ethical-metrics/overview.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,29 @@
# Ethical Metrics

:::note
Ethical Metrics requires the [Dappnode Monitoring Service (DMS)](../packages/dms.md) as a dependency.
Ethical Metrics requires the [Dappnode Monitoring Service (DMS)](../packages/dms.md) and Dappnode Exporter as dependencies.
:::

## Introduction

When it comes to monitoring your dappnode, the [Dappnode Monitoring Service (DMS)](../packages/dms.md) offers valuable insights into the health and performance of your packages and system. Yet, there's a key thing that DMS can't do: **DMS can't notify you when your dappnode goes offline**. This limitation arises because DMS operates from within your dappnode, so it can't help when your dappnode experiences downtime.
When it comes to monitoring your Dappnode, the [Dappnode Monitoring Service (DMS)](../packages/dms.md) offers valuable insights into the health and performance of your packages and system. Yet, there's a key thing that DMS can't do: **DMS can't notify you when your Dappnode goes offline**. This limitation arises because DMS operates from within your Dappnode, so it can't help when it experiences downtime.

**Ethical Metrics solves this DMS limitation.** It is a service that allows for external monitoring of your dappnode externally **without leaking any identifying information**. This way, you will be able to recieve notifications when your dappnode goes offline and other useful cases, such as when your dappnode is at high CPU usage during an extended period of time or your disk space is running out.
**Ethical Metrics solves this DMS limitation.** It is a service that allows for external monitoring of your Dappnode **without leaking any identifying information**. This way, you will be able to recieve notifications when your Dappnode goes offline.

:::info
Ethical Metrics comes from the request of the users to have useful alerts and the strict compromise of Dappnode of preserving privacy for its users.
:::

So, how did we manage to overcome the difficulty of monitoring your dappnode without compromising your privacy? In order to keep your privacy intact, **all the communication between your dappnode and our monitoring servers is done through the TOR network**. The TOR network is enables anonymous communication by directing Internet traffic via a free, worldwide, volunteer overlay network that consists of more than seven thousand relays.
So, how did we manage to overcome the difficulty of monitoring your Dappnode without compromising your privacy? In order to keep your privacy intact, **all the communication between your Dappnode and our monitoring servers is done through the TOR network**. The TOR network enables anonymous communication by directing Internet traffic through a free, worldwide, volunteered overlay network that consists of more than seven thousand relays.

:::tip
In a nutshell, your dappnode signals that it's alive via a private channel so we don't know where it comes from. If it stops sending the signal that it's alive, we can assume that it's offline and send an alert to the email associated with that particular dappnode. This way, your dappnode's IP address remains hidden and nobody (not even us) can identify which metrics belong to who.
In a nutshell, your Dappnode signals that it's alive via a private channel so we don't know where it comes from. If it stops sending this signal, we can assume that it's offline and send an alert to the Email or Telegram associated with that particular Dappnode. This way, your Dappnode's IP address remains hidden and nobody (not even us) can identify which metrics belong to who.
:::

:::caution
To send alerts, it is necessary that you provide an alert where to send these alerts. In order to remain private, we recommend you to use an email address that can't be linked to your identity. For example, John Doe probably wouldn't want to use "[email protected]" if he wanted to remain anoymous.
:::

**To put it simply:** Ethical Metrics enables us to monitor a group of dappnode metrics for you. In the event that your dappnode goes offline, Ethical Metrics can send notifications to an email address you provide during installation. All this communication occurs via the TOR network, which guarantees the protection of your DappNode's IP address and the confidentiality of your metrics.
**To put it simply:** Ethical Metrics enables us to monitor a group of Dappnode metrics for you. In the event that your Dappnode goes offline, Ethical Metrics can send notifications to an email address or Telegram handle that you provide during configuration. All this communication occurs via the TOR network, which guarantees the protection of your Dappnode's IP address and the confidentiality of your metrics.

![setup-5](/img/ethical-metrics.png)

:::info
Ethical metrics is one of our newest packages and it is still under constant improvement. Please come back to this page to check for updates on this package.
Ethical metrics is one of our newest packages and it is still under constant improvement. Please come back to this page to check for updates.
:::

## Set-up Ethical Metrics

In order to setup your Ethical Metrics notification system, you need to follow these steps:

1. Navigate to http://my.dappnode/system/notifications
2. Introduce the email address where you want to receive the notifications and click on the switch to activate the notifications.
3. Thats it! Your ethical metrics will automatically register your tor instance with the email address you provided through the Tor network preserving your privacy. (you should have received a welcome email)

![setup-6](/img/ethical-metrics-setup.png)

<hr />

## Troubleshooting

<details>
<summary><strong>How can I make sure my dappnode is registered?</strong></summary>

Upon registering, an email will be sent to your configured email address. If you don't receive this email, please check your spam folder.
</details>

<details>
<summary><strong>How can I test a "dappnode down" notification?</strong></summary>

There are various ways to test a "dappnode down" notification. The easiest way is to stop your dappnode, but you can also test it by stopping the "prometheus" service of your Ethical Metrics package. After an hour, you should receive a "dappnode down" notification in your email.
</details>

<details>
<summary><strong>How can I unregister from the Ethical Metrics monitoring system?</strong></summary>

<p><strong>1. Using the Dappnode Interface:</strong> For an active Dappnode, simply navigate to <a href="http://my.dappnode/system/notifications">System > Notifications</a> and toggle off <b>Ethical Metrics</b>. This will stop all notifications and halt metric collection from your Dappnode. As long as Ethical Metrics notifications are enabled in the Dappnode UI, your device remains registered in our monitoring system.</p>

<p><strong>2. For Inactive Dappnodes:</strong> If your Dappnode is no longer accessible, locate the <b>unregister link</b> in the welcome email you received upon registration. Keep in mind that using this method won't employ our IP hiding measures, but you can enhance security using tools like a VPN. Please keep in mind that if your DAppNode is still up and running with Ethical Metrics notifications turned on, it'll register again by itself.</p>

<p><strong>3. Manual Unregistration:</strong> Lost the welcome email? You can also unregister by inputting the following URL into your browser: <code>https://ethical-metrics.dappnode.io/unregister-from-email/?instance=<i>YOUR_INSTANCE</i>.onion%3A9090</code>. Make sure to replace <i>YOUR_INSTANCE</i> with the unique identifier for your Dappnode, excluding ".onion:9090", which is already included in the provided URL.</p>

</details>
39 changes: 39 additions & 0 deletions docs/user/ethical-metrics/setup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Setting up Ethical Metrics

:::tip
We highly recommend utilizing the Telegram channel option in addition to or instead of relying solely on email notifications.
:::

Email notifications may sometimes encounter hurdles such as being categorized as spam or getting lost in a cluttered inbox. This could inadvertently lead to missing out on important notifications that require your immediate attention.

In contrast, Telegram channels provide a streamlined and efficient way to receive notifications directly to your device, ensuring that you stay informed without any interruptions.

![setup-6](/img/ethical-metrics-setup.png)

In order to setup your Ethical Metrics notification system, you need to follow these steps:

## Telegram Notifications

1. Access Telegram Web:
Open Telegram Web using [this link](https://web.telegram.org/a/) and login with your account. Ensure the URL ends with `/a/`. If not, manually add `/a/` after `https://web.telegram.org/`.
2. Create a Private Channel.
3. Add the DappNode bot (`@ethicalMetricsAlerts_bot`) to your channel as an administrator.
4. Find Your Channel ID:
Copy the channel ID from the URL.
It's a 13-digit number following the `-` in the URL. The ID always starts with `-100`. Ensure to include the `-` when copying.

![telegram-channel-id](/img/telegram-channel-id.png)

5. Navigate to http://my.dappnode/system/notifications
6. Enable Notifications:
Paste the channel ID into the Telegram Channel ID field and toggle the switch `ON` to start receiving notifications.

## Email Notifications

1. Navigate to http://my.dappnode/system/notifications
2. Introduce the email address where you want to receive the notifications and click on the switch to activate the notifications.
3. Thats it! Your Ethical Metrics will automatically register your TOR instance with the email address you provided. This will happen through the TOR network, preserving your privacy. You should receive a welcome email in the following minutes.

:::caution
To send email notifications, it is necessary that you provide an email address. In order to remain private, we recommend you to use an address that can't be linked to your identity. For example, John Doe probably wouldn't want to use "[email protected]" if he wanted to remain anoymous.
:::
27 changes: 27 additions & 0 deletions docs/user/ethical-metrics/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Troubleshooting

Experiencing trouble when setting your notifications up? Check this FAQ. If your issue isn't listed, please pay us a visit in the [Dappnode Discord](https://discord.gg/dappnode) and we'll be happy to assist you!

<details>
<summary><strong>How can I make sure my Dappnode is registered?</strong></summary>

**Email:** Upon registering, an email will be sent to your configured email address. If you don't receive this email, please check your spam folder.
**Telegram:** Once your bot has been set up, you can press the "Send Test Notification" button to see if everything is working as expected.
</details>

<details>
<summary><strong>How can I test a "Dappnode down" notification?</strong></summary>

There are various ways to test a "Dappnode down" notification. The easiest way is to stop your Dappnode temporarily, but you can also test it by stopping the "Prometheus" service of your Ethical Metrics package. After an hour, you should receive a "Dappnode down" notification in your Email and/or Telegram.
</details>

<details>
<summary><strong>How can I unregister from the Ethical Metrics monitoring system?</strong></summary>

<p><strong> 1. Using the Dappnode Interface:</strong> From the active Dappnode, simply navigate to <a href="http://my.dappnode/system/notifications">System > Notifications</a> and toggle off <b>Ethical Metrics</b>. This will stop all notifications and halt metric collection from your Dappnode. As long as Ethical Metrics notifications are enabled in the Dappnode UI, your device remains registered in our monitoring system.</p>

<p><strong>2. For Inactive Dappnodes:</strong> If your Dappnode is no longer accessible, locate the <b>unregister link</b> in the welcome email you received upon registration. Keep in mind that using this method won't employ our IP hiding measures, but you can enhance security using tools like a VPN. Please keep in mind that if your Dappnode is still up and running with Ethical Metrics notifications turned on, it'll register again by itself.</p>

<p><strong>3. Manual Unregistration:</strong> Lost the welcome email? You can also unregister by inputting the following URL into your browser: <code>https://ethical-metrics.dappnode.io/unregister-from-email/?instance=<i>YOUR_INSTANCE</i>.onion%3A9090</code>. Make sure to replace <i>YOUR_INSTANCE</i> with the unique identifier for your Dappnode, excluding ".onion:9090", which is already included in the provided URL.</p>

</details>
9 changes: 7 additions & 2 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,14 +320,19 @@ const sidebars = {
},
{
type: "doc",
label: "Notifications",
id: "user/ethical-metrics/notifications",
label: "Setting up Notifications",
id: "user/ethical-metrics/setup",
},
{
type: "doc",
label: "Metrics collected",
id: "user/ethical-metrics/metrics",
},
{
type: "doc",
label: "Troubleshooting",
id: "user/ethical-metrics/troubleshooting",
},
],
},
{
Expand Down
Binary file modified static/img/ethical-metrics-setup.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified static/img/ethical-metrics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/telegram-channel-id.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 86aed84

Please sign in to comment.