From 91d0c779102d146bdac5142d0cbfb07955162dbb Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Tue, 19 Mar 2024 13:05:40 +0530 Subject: [PATCH 01/33] add blog for otelcol-ansible --- .../2024/scaling-opentelemetry-collectors.md | 229 ++++++++++++++++++ 1 file changed, 229 insertions(+) create mode 100644 content/en/blog/2024/scaling-opentelemetry-collectors.md diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md new file mode 100644 index 000000000000..42092b861dfc --- /dev/null +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -0,0 +1,229 @@ +--- +title: Manage OpenTelemetry Collectors at Scale with Ansible +linkTitle: OTel Collector with Ansible +date: 2024-03-12 +author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' +cSpell:ignore: ansible Ishan Jain +--- + +This guide is focused on scaling the +[OpenTelemetry Collector deployment](/docs/collector/deployment/) across various +Linux hosts by leveraging [Ansible](https://www.ansible.com/), to function both +as [gateways](/docs/collector/deployment/gateway/) and +[agents](/docs/collector/deployment/agent/) within your observability +architecture. Utilizing the OpenTelemetry Collector in this dual capacity +enables a robust collection and forwarding of metrics, traces, and logs to +analysis and visualization platforms. + +Here, we outline a strategy for deploying and managing the OpenTelemetry +Collector's scalable instances throughout your infrastructure with Ansible, +enhancing your overall monitoring strategy and data visualization capabilities +in [Grafana](https://grafana.com/). + +## Before you begin + +To follow this guide, ensure you have: + +- Ansible Installed in your system +- Linux hosts along with SSH access to each of these Linux hosts. +- Prometheus for gathering metrics + +## Install the Grafana Ansible collection + +The +[OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) +is provided through the +[Grafana Ansible collection](https://docs.ansible.com/ansible/latest/collections/grafana/grafana/) +as of the 3.0.0 release. + +To install the Grafana Ansible collection, run this command: + +```shell +ansible-galaxy collection install grafana.grafana +``` + +## Create an Ansible inventory file + +Next, you will set up your hosts and create an inventory file. + +1. Create your hosts and add public SSH keys to them. + + This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two + Fedora hosts, and two Debian hosts. + +2. Create an Ansible inventory file. + + The Ansible inventory, which resides in a file named `inventory`, looks + similar to this: + + ```ini + 10.0.0.1 # hostname = ubuntu-01 + 10.0.0.2 # hostname = ubuntu-02 + 10.0.0.3 # hostname = centos-01 + 10.0.0.4 # hostname = centos-02 + 10.0.0.5 # hostname = debian-01 + 10.0.0.6 # hostname = debian-02 + 10.0.0.7 # hostname = fedora-01 + 10.0.0.8 # hostname = fedora-02 + ``` + + > **Note**: If you are copying the above file, remove the comments (#). + +3. Create an `ansible.cfg` file within the same directory as `inventory`, with + the following values: + + ```cfg + [defaults] + inventory = inventory # Path to the inventory file + private_key_file = ~/.ssh/id_rsa # Path to my private SSH Key + remote_user=root + ``` + +## Use the OpenTelemetry Collector Ansible role + +Next, you'll define an Ansible playbook to apply your chosen or created +OpenTelemetry Collector role across your hosts. + +Create a file named `deploy-opentelemetry.yml` in the same directory as your +`ansible.cfg` and `inventory`. + +```yaml +- name: Install OpenTelemetry Collector + hosts: all + become: true + + tasks: + - name: Install OpenTelemetry Collector + ansible.builtin.include_role: + name: opentelemetry_collectorr + vars: + otel_collector_receivers: + hostmetrics: + collection_interval: 60s + scrapers: + cpu: {} + disk: {} + load: {} + filesystem: {} + memory: {} + network: {} + paging: {} + process: + mute_process_name_error: true + mute_process_exe_error: true + mute_process_io_error: true + processes: {} + + otel_collector_processors: + batch: + resourcedetection: + detectors: [env, system] + timeout: 2s + system: + hostname_sources: [os] + transform/add_resource_attributes_as_metric_attributes: + error_mode: ignore + metric_statements: + - context: datapoint + statements: + - set(attributes["deployment.environment"], + resource.attributes["deployment.environment"]) + - set(attributes["service.version"], + resource.attributes["service.version"]) + + otel_collector_exporters: + prometheusremotewrite: + endpoint: https:///api/prom/push + headers: + Authorization: 'Basic ' + + otel_collector_service: + pipelines: + metrics: + receivers: [hostmetrics] + processors: + [ + resourcedetection, + transform/add_resource_attributes_as_metric_attributes, + batch, + ] + exporters: [prometheusremotewrite] +``` + +{{% alert title="Note" %}} + +You'll need to adjust the configuration to match the specific telemetry you +intend to collect and where you plan to forward it. This configuration snippet +is a basic example designed for collecting host metrics and forwarded to +Prometheus. + +{{% /alert %}} + +The previous configuration would provision the OpenTelemetry Collector to +collect host metrics from the Linux host. + +## Running the Ansible playbook + +Deploy the OpenTelemetry Collector across your hosts by executing: + +```sh +ansible-playbook deploy-opentelemetry.yml +``` + +## Visualizing Metrics in Grafana + +Once your OpenTelemetry Collector's start sending metrics to Prometheus, follow +these quick steps to visualize them in [Grafana](https://grafana.com/): + +### Setup Grafana + +1. **Install Docker**: Make sure Docker is installed on your system. If it's + not, you can find the installation guide at the + [official Docker website](https://docs.docker.com/get-docker/). + +2. **Run Grafana Docker Container**: Start a Grafana server with this Docker + command, which fetches the latest Grafana image: + + ```sh + docker run -d -p 3000:3000 --name=grafana grafana/grafana + ``` + +3. **Access Grafana**: Navigate to `http://localhost:3000` in your web browser. + The default login details are `admin` for both the username and password. + +4. **Change Password**: Upon your first login, you will be prompted to set a new + password. Make sure to pick a secure one. + +For other installation methods and more detailed instructions, refer to the +[official Grafana documentation](https://grafana.com/docs/grafana/latest/installation/). + +### Add Prometheus as a Data Source + +1. **Login to Grafana** and navigate to **Connections** > **Data Sources**. +2. Click **Add data source**, and choose **Prometheus**. +3. In the settings, enter your Prometheus URL, for example, + `http://`, along with any other necessary details, and + then click **Save & Test**. + +### Explore metrics + +1. Go to the **Explore** page +2. In the Query editor, select your Prometheus data source and enter the below + query + + ```PromQL + 100 - (avg by (cpu) (irate(system_cpu_time{state="idle"}[5m])) * 100) + ``` + + This query calculates the average percentage of CPU time not spent in the + "idle" state, across each CPU core, over the last 5 minutes. + +3. Play around with different metrics and start putting together your dashboards + to gain insights into your system's performance. + +This guide makes it easier for you to set up the OpenTelemetry Collector on +several Linux machines with the help of Ansible and shows you how to see the +data it collects in Grafana. You can adjust the settings for the OpenTelemetry +Collector and design your Grafana dashboards to meet your own monitoring and +tracking needs. This way, you get exactly the insights you want from your +systems, making your job as a developer a bit easier. From 175ff3a73e9251611875d9b8a6799ffab8048095 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:56:57 +0530 Subject: [PATCH 02/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 42092b861dfc..0ec914d65dfd 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -1,5 +1,5 @@ --- -title: Manage OpenTelemetry Collectors at Scale with Ansible +title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: OTel Collector with Ansible date: 2024-03-12 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' From bf58bb0fc8a4331b23afb3ac9512dc43b52d8e2c Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:57:18 +0530 Subject: [PATCH 03/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 0ec914d65dfd..bd0b88157dba 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -6,12 +6,12 @@ author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' cSpell:ignore: ansible Ishan Jain --- -This guide is focused on scaling the -[OpenTelemetry Collector deployment](/docs/collector/deployment/) across various -Linux hosts by leveraging [Ansible](https://www.ansible.com/), to function both +You can scale the deployment of +[OpenTelemetry Collector](/docs/collector/deployment/) across multiple +Linux hosts through [Ansible](https://www.ansible.com/), to function both as [gateways](/docs/collector/deployment/gateway/) and [agents](/docs/collector/deployment/agent/) within your observability -architecture. Utilizing the OpenTelemetry Collector in this dual capacity +architecture. Using the OpenTelemetry Collector in this dual capacity enables a robust collection and forwarding of metrics, traces, and logs to analysis and visualization platforms. From 0b75fedd10899fd3ef404f74f5c626002c986ce7 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:57:39 +0530 Subject: [PATCH 04/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index bd0b88157dba..02111bbac1e7 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -15,10 +15,9 @@ architecture. Using the OpenTelemetry Collector in this dual capacity enables a robust collection and forwarding of metrics, traces, and logs to analysis and visualization platforms. -Here, we outline a strategy for deploying and managing the OpenTelemetry -Collector's scalable instances throughout your infrastructure with Ansible, -enhancing your overall monitoring strategy and data visualization capabilities -in [Grafana](https://grafana.com/). +We outline a strategy for deploying and managing the OpenTelemetry +Collector's scalable instances throughout your infrastructure using Ansible. +In the following example, we'll use Grafana as the target backend. ## Before you begin From 0b103f7be79c155387ea0210ed51dc912ac1e1f4 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:57:45 +0530 Subject: [PATCH 05/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 02111bbac1e7..64ad3ddf520f 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -19,7 +19,7 @@ We outline a strategy for deploying and managing the OpenTelemetry Collector's scalable instances throughout your infrastructure using Ansible. In the following example, we'll use Grafana as the target backend. -## Before you begin +## Prerequisites To follow this guide, ensure you have: From 883cd02e7b607f05132cb93e31766471f3e46574 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:57:54 +0530 Subject: [PATCH 06/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 64ad3ddf520f..5b4cd9de1df8 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -21,7 +21,7 @@ In the following example, we'll use Grafana as the target backend. ## Prerequisites -To follow this guide, ensure you have: +To follow this guide, make sure you meet the following requirements: - Ansible Installed in your system - Linux hosts along with SSH access to each of these Linux hosts. From 63b8bfcf71aac40cf30e0eda0b2f54eeda8dacab Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:58:09 +0530 Subject: [PATCH 07/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 5b4cd9de1df8..6adbd930cfda 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -24,7 +24,7 @@ In the following example, we'll use Grafana as the target backend. To follow this guide, make sure you meet the following requirements: - Ansible Installed in your system -- Linux hosts along with SSH access to each of these Linux hosts. +- Linux hosts along with SSH access to each of these Linux hosts - Prometheus for gathering metrics ## Install the Grafana Ansible collection From ab6aa24fcc0558db3ecb49b9b96b8b47edc3a5d0 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:58:25 +0530 Subject: [PATCH 08/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 6adbd930cfda..c9badb66a7d9 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -43,7 +43,7 @@ ansible-galaxy collection install grafana.grafana ## Create an Ansible inventory file -Next, you will set up your hosts and create an inventory file. +Next, set up your hosts and create an inventory file. 1. Create your hosts and add public SSH keys to them. From 3743fa6f0a211c04876b5940202712b2a87678a7 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:59:36 +0530 Subject: [PATCH 09/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index c9badb66a7d9..bba0d8040225 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -66,7 +66,7 @@ Next, set up your hosts and create an inventory file. 10.0.0.8 # hostname = fedora-02 ``` - > **Note**: If you are copying the above file, remove the comments (#). + > **Note**: When copying the previous snippet, uncomment each host name. 3. Create an `ansible.cfg` file within the same directory as `inventory`, with the following values: From 3de9b49eaeda086e287a99c5b5953e931a3b4d02 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:59:42 +0530 Subject: [PATCH 10/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index bba0d8040225..312f320c1771 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -204,7 +204,7 @@ For other installation methods and more detailed instructions, refer to the `http://`, along with any other necessary details, and then click **Save & Test**. -### Explore metrics +### Explore your metrics 1. Go to the **Explore** page 2. In the Query editor, select your Prometheus data source and enter the below From df72dba288a1a38b7ab65502754bd923d0647362 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 15:59:54 +0530 Subject: [PATCH 11/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 312f320c1771..c9f50a5b4c0f 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -207,7 +207,7 @@ For other installation methods and more detailed instructions, refer to the ### Explore your metrics 1. Go to the **Explore** page -2. In the Query editor, select your Prometheus data source and enter the below +2. In the Query editor, select your data source and enter the following query ```PromQL From 10e80dc69934ac12a81224b24b975b2e9ff8d9a8 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:00:30 +0530 Subject: [PATCH 12/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index c9f50a5b4c0f..70153f04fcbb 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -222,7 +222,4 @@ For other installation methods and more detailed instructions, refer to the This guide makes it easier for you to set up the OpenTelemetry Collector on several Linux machines with the help of Ansible and shows you how to see the -data it collects in Grafana. You can adjust the settings for the OpenTelemetry -Collector and design your Grafana dashboards to meet your own monitoring and -tracking needs. This way, you get exactly the insights you want from your -systems, making your job as a developer a bit easier. +data it collects in Grafana. From bb0ba9658910d78d1ebee889c12dff06f1d89ef4 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:00:48 +0530 Subject: [PATCH 13/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 70153f04fcbb..12067e2f9e8b 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -201,8 +201,8 @@ For other installation methods and more detailed instructions, refer to the 1. **Login to Grafana** and navigate to **Connections** > **Data Sources**. 2. Click **Add data source**, and choose **Prometheus**. 3. In the settings, enter your Prometheus URL, for example, - `http://`, along with any other necessary details, and - then click **Save & Test**. + `http://`, along with any other necessary details. +4. Select **Save & Test**. ### Explore your metrics From 1250d2e8b96c6f6a5cee82ed1c6ed7a8d74fefdf Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:01:01 +0530 Subject: [PATCH 14/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 12067e2f9e8b..cb8fa8a4d10b 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -80,7 +80,7 @@ Next, set up your hosts and create an inventory file. ## Use the OpenTelemetry Collector Ansible role -Next, you'll define an Ansible playbook to apply your chosen or created +Next, define an Ansible playbook to apply your chosen or created OpenTelemetry Collector role across your hosts. Create a file named `deploy-opentelemetry.yml` in the same directory as your From c3ce48639075aec960624cfeeac544786ec46474 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:01:13 +0530 Subject: [PATCH 15/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index cb8fa8a4d10b..45f0145d3fde 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -169,7 +169,7 @@ Deploy the OpenTelemetry Collector across your hosts by executing: ansible-playbook deploy-opentelemetry.yml ``` -## Visualizing Metrics in Grafana +## Check your metrics in the backend Once your OpenTelemetry Collector's start sending metrics to Prometheus, follow these quick steps to visualize them in [Grafana](https://grafana.com/): From 676a8e79fb130fc945e8c0ca80a68890a2e03210 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:01:25 +0530 Subject: [PATCH 16/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 45f0145d3fde..7a5b9560cc43 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -174,7 +174,7 @@ ansible-playbook deploy-opentelemetry.yml Once your OpenTelemetry Collector's start sending metrics to Prometheus, follow these quick steps to visualize them in [Grafana](https://grafana.com/): -### Setup Grafana +### Set up Grafana 1. **Install Docker**: Make sure Docker is installed on your system. If it's not, you can find the installation guide at the From 40e03d65a8e467c66f3b71345a3740dcb6e1b41d Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:02:22 +0530 Subject: [PATCH 17/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 7a5b9560cc43..77f9aac79c04 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -196,7 +196,7 @@ these quick steps to visualize them in [Grafana](https://grafana.com/): For other installation methods and more detailed instructions, refer to the [official Grafana documentation](https://grafana.com/docs/grafana/latest/installation/). -### Add Prometheus as a Data Source +### Add Prometheus as a data source 1. **Login to Grafana** and navigate to **Connections** > **Data Sources**. 2. Click **Add data source**, and choose **Prometheus**. From 1321e7ddf731f320332ca846d196f2b5cd9d564b Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:02:40 +0530 Subject: [PATCH 18/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 77f9aac79c04..58bb5ba00515 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -198,7 +198,7 @@ For other installation methods and more detailed instructions, refer to the ### Add Prometheus as a data source -1. **Login to Grafana** and navigate to **Connections** > **Data Sources**. +1. **Log in to Grafana** and navigate to **Connections** > **Data Sources**. 2. Click **Add data source**, and choose **Prometheus**. 3. In the settings, enter your Prometheus URL, for example, `http://`, along with any other necessary details. From 39723a5d1e7514e3ccfc78f286c8a41116f39133 Mon Sep 17 00:00:00 2001 From: Ishan Jain <51803183+ishanjainn@users.noreply.github.com> Date: Tue, 19 Mar 2024 16:02:55 +0530 Subject: [PATCH 19/33] Update content/en/blog/2024/scaling-opentelemetry-collectors.md Co-authored-by: Fabrizio Ferri-Benedetti --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 58bb5ba00515..695f83913d6b 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -199,7 +199,7 @@ For other installation methods and more detailed instructions, refer to the ### Add Prometheus as a data source 1. **Log in to Grafana** and navigate to **Connections** > **Data Sources**. -2. Click **Add data source**, and choose **Prometheus**. +2. Click **Add data source** and select **Prometheus**. 3. In the settings, enter your Prometheus URL, for example, `http://`, along with any other necessary details. 4. Select **Save & Test**. From 0cedfc3b99336c7565bd4995b8d4fec9c3a0d072 Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Tue, 19 Mar 2024 16:17:22 +0530 Subject: [PATCH 20/33] update blog content --- .../2024/scaling-opentelemetry-collectors.md | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 695f83913d6b..594ad2547698 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -7,17 +7,18 @@ cSpell:ignore: ansible Ishan Jain --- You can scale the deployment of -[OpenTelemetry Collector](/docs/collector/deployment/) across multiple -Linux hosts through [Ansible](https://www.ansible.com/), to function both -as [gateways](/docs/collector/deployment/gateway/) and +[OpenTelemetry Collector](/docs/collector/deployment/) across multiple Linux +hosts through [Ansible](https://www.ansible.com/), to function both as +[gateways](/docs/collector/deployment/gateway/) and [agents](/docs/collector/deployment/agent/) within your observability -architecture. Using the OpenTelemetry Collector in this dual capacity -enables a robust collection and forwarding of metrics, traces, and logs to -analysis and visualization platforms. +architecture. Using the OpenTelemetry Collector in this dual capacity enables a +robust collection and forwarding of metrics, traces, and logs to analysis and +visualization platforms. -We outline a strategy for deploying and managing the OpenTelemetry -Collector's scalable instances throughout your infrastructure using Ansible. -In the following example, we'll use Grafana as the target backend. +We outline a strategy for deploying and managing the OpenTelemetry Collector's +scalable instances throughout your infrastructure using Ansible. In the +following example, we'll use [Grafana](https://grafana.com/) as the target +backend to view metrics. ## Prerequisites @@ -43,7 +44,7 @@ ansible-galaxy collection install grafana.grafana ## Create an Ansible inventory file -Next, set up your hosts and create an inventory file. +Next, set up your hosts and assoicated IPs and create an inventory file. 1. Create your hosts and add public SSH keys to them. @@ -66,7 +67,7 @@ Next, set up your hosts and create an inventory file. 10.0.0.8 # hostname = fedora-02 ``` - > **Note**: When copying the previous snippet, uncomment each host name. + > **Note**: When copying the previous snippet, remove the comments. 3. Create an `ansible.cfg` file within the same directory as `inventory`, with the following values: @@ -80,8 +81,8 @@ Next, set up your hosts and create an inventory file. ## Use the OpenTelemetry Collector Ansible role -Next, define an Ansible playbook to apply your chosen or created -OpenTelemetry Collector role across your hosts. +Next, define an Ansible playbook to apply your chosen or created OpenTelemetry +Collector role across your hosts. Create a file named `deploy-opentelemetry.yml` in the same directory as your `ansible.cfg` and `inventory`. @@ -198,7 +199,7 @@ For other installation methods and more detailed instructions, refer to the ### Add Prometheus as a data source -1. **Log in to Grafana** and navigate to **Connections** > **Data Sources**. +1. In Grafana, navigate to **Connections** > **Data Sources**. 2. Click **Add data source** and select **Prometheus**. 3. In the settings, enter your Prometheus URL, for example, `http://`, along with any other necessary details. @@ -207,8 +208,7 @@ For other installation methods and more detailed instructions, refer to the ### Explore your metrics 1. Go to the **Explore** page -2. In the Query editor, select your data source and enter the following - query +2. In the Query editor, select your data source and enter the following query ```PromQL 100 - (avg by (cpu) (irate(system_cpu_time{state="idle"}[5m])) * 100) @@ -217,8 +217,8 @@ For other installation methods and more detailed instructions, refer to the This query calculates the average percentage of CPU time not spent in the "idle" state, across each CPU core, over the last 5 minutes. -3. Play around with different metrics and start putting together your dashboards - to gain insights into your system's performance. +3. Explore other metrics and create dashboards to gain insights into your + system's performance. This guide makes it easier for you to set up the OpenTelemetry Collector on several Linux machines with the help of Ansible and shows you how to see the From 79f6ff354946873d093b55e87bd18eb6a159d36b Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Tue, 19 Mar 2024 16:19:45 +0530 Subject: [PATCH 21/33] remove setup hosts step --- .../en/blog/2024/scaling-opentelemetry-collectors.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 594ad2547698..d1affb6bb80e 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -46,12 +46,10 @@ ansible-galaxy collection install grafana.grafana Next, set up your hosts and assoicated IPs and create an inventory file. -1. Create your hosts and add public SSH keys to them. +This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two +Fedora hosts, and two Debian hosts. - This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two - Fedora hosts, and two Debian hosts. - -2. Create an Ansible inventory file. +1. Create an Ansible inventory file. The Ansible inventory, which resides in a file named `inventory`, looks similar to this: @@ -69,7 +67,7 @@ Next, set up your hosts and assoicated IPs and create an inventory file. > **Note**: When copying the previous snippet, remove the comments. -3. Create an `ansible.cfg` file within the same directory as `inventory`, with +2. Create an `ansible.cfg` file within the same directory as `inventory`, with the following values: ```cfg From c138901b166c8380fe8b2a471106e29d677289ad Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Tue, 19 Mar 2024 12:14:39 +0100 Subject: [PATCH 22/33] Update scaling-opentelemetry-collectors.md --- .../2024/scaling-opentelemetry-collectors.md | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index d1affb6bb80e..a0e2b51699e3 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -17,8 +17,7 @@ visualization platforms. We outline a strategy for deploying and managing the OpenTelemetry Collector's scalable instances throughout your infrastructure using Ansible. In the -following example, we'll use [Grafana](https://grafana.com/) as the target -backend to view metrics. +following example, we'll use Grafana as the target backend for metrics. ## Prerequisites @@ -73,7 +72,7 @@ Fedora hosts, and two Debian hosts. ```cfg [defaults] inventory = inventory # Path to the inventory file - private_key_file = ~/.ssh/id_rsa # Path to my private SSH Key + private_key_file = ~/.ssh/id_rsa # Path to private SSH Key remote_user=root ``` @@ -150,7 +149,7 @@ Create a file named `deploy-opentelemetry.yml` in the same directory as your {{% alert title="Note" %}} -You'll need to adjust the configuration to match the specific telemetry you +Adjust the configuration to match the specific telemetry you intend to collect and where you plan to forward it. This configuration snippet is a basic example designed for collecting host metrics and forwarded to Prometheus. @@ -162,7 +161,8 @@ collect host metrics from the Linux host. ## Running the Ansible playbook -Deploy the OpenTelemetry Collector across your hosts by executing: +Deploy the OpenTelemetry Collector across your hosts by running +the following command: ```sh ansible-playbook deploy-opentelemetry.yml @@ -170,14 +170,12 @@ ansible-playbook deploy-opentelemetry.yml ## Check your metrics in the backend -Once your OpenTelemetry Collector's start sending metrics to Prometheus, follow -these quick steps to visualize them in [Grafana](https://grafana.com/): +After your OpenTelemetry Collector's start sending metrics to Prometheus, follow +these quick steps to visualize them in Grafana: ### Set up Grafana -1. **Install Docker**: Make sure Docker is installed on your system. If it's - not, you can find the installation guide at the - [official Docker website](https://docs.docker.com/get-docker/). +1. **Install Docker**: Make sure Docker is installed on your system. 2. **Run Grafana Docker Container**: Start a Grafana server with this Docker command, which fetches the latest Grafana image: @@ -193,7 +191,7 @@ these quick steps to visualize them in [Grafana](https://grafana.com/): password. Make sure to pick a secure one. For other installation methods and more detailed instructions, refer to the -[official Grafana documentation](https://grafana.com/docs/grafana/latest/installation/). +official Grafana documentation. ### Add Prometheus as a data source From 35fd956155897e6108e631391d43f44cc9971f5a Mon Sep 17 00:00:00 2001 From: Fabrizio Ferri-Benedetti Date: Tue, 19 Mar 2024 12:19:10 +0100 Subject: [PATCH 23/33] Typo --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index a0e2b51699e3..4dfc1d17e82c 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -43,7 +43,7 @@ ansible-galaxy collection install grafana.grafana ## Create an Ansible inventory file -Next, set up your hosts and assoicated IPs and create an inventory file. +Next, set up your hosts and associated IPs and create an inventory file. This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two Fedora hosts, and two Debian hosts. From 58acec5b0f0f9771f9e5395805dee98752f9a36b Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Tue, 19 Mar 2024 11:22:23 +0000 Subject: [PATCH 24/33] Results from /fix:all --- .../en/blog/2024/scaling-opentelemetry-collectors.md | 11 +++++------ static/refcache.json | 12 ++++++++++++ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 4dfc1d17e82c..165a4c0283b7 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -149,10 +149,9 @@ Create a file named `deploy-opentelemetry.yml` in the same directory as your {{% alert title="Note" %}} -Adjust the configuration to match the specific telemetry you -intend to collect and where you plan to forward it. This configuration snippet -is a basic example designed for collecting host metrics and forwarded to -Prometheus. +Adjust the configuration to match the specific telemetry you intend to collect +and where you plan to forward it. This configuration snippet is a basic example +designed for collecting host metrics and forwarded to Prometheus. {{% /alert %}} @@ -161,8 +160,8 @@ collect host metrics from the Linux host. ## Running the Ansible playbook -Deploy the OpenTelemetry Collector across your hosts by running -the following command: +Deploy the OpenTelemetry Collector across your hosts by running the following +command: ```sh ansible-playbook deploy-opentelemetry.yml diff --git a/static/refcache.json b/static/refcache.json index da95a645c334..d10ba60722fc 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -799,6 +799,10 @@ "StatusCode": 206, "LastSeen": "2024-01-30T16:07:39.690877-05:00" }, + "https://docs.ansible.com/ansible/latest/collections/grafana/grafana/": { + "StatusCode": 206, + "LastSeen": "2024-03-19T11:21:52.991213698Z" + }, "https://docs.appdynamics.com/latest/en/application-monitoring/appdynamics-for-opentelemetry": { "StatusCode": 200, "LastSeen": "2024-01-18T08:51:22.195056-05:00" @@ -2551,6 +2555,10 @@ "StatusCode": 200, "LastSeen": "2024-01-30T16:14:36.112572-05:00" }, + "https://github.com/ishanjainn": { + "StatusCode": 200, + "LastSeen": "2024-03-19T11:21:47.871135724Z" + }, "https://github.com/jack-berg": { "StatusCode": 200, "LastSeen": "2024-01-18T20:04:54.949867-05:00" @@ -7679,6 +7687,10 @@ "StatusCode": 200, "LastSeen": "2024-01-19T09:04:05.862693+01:00" }, + "https://www.ansible.com/": { + "StatusCode": 200, + "LastSeen": "2024-03-19T11:21:48.883430689Z" + }, "https://www.apollographql.com/docs/federation/": { "StatusCode": 206, "LastSeen": "2024-01-18T19:55:56.349642-05:00" From 1477e4aae9714d403cb5a69032b90c04e13568f7 Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Wed, 20 Mar 2024 11:22:56 +0530 Subject: [PATCH 25/33] add link to grafan for flow --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 165a4c0283b7..231e02b4edd5 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -17,7 +17,8 @@ visualization platforms. We outline a strategy for deploying and managing the OpenTelemetry Collector's scalable instances throughout your infrastructure using Ansible. In the -following example, we'll use Grafana as the target backend for metrics. +following example, we'll use [Grafana](https://grafana.com/) as the target +backend for metrics. ## Prerequisites @@ -43,7 +44,7 @@ ansible-galaxy collection install grafana.grafana ## Create an Ansible inventory file -Next, set up your hosts and associated IPs and create an inventory file. +Next, set up your hosts and assoicated IPs and create an inventory file. This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two Fedora hosts, and two Debian hosts. @@ -190,7 +191,7 @@ these quick steps to visualize them in Grafana: password. Make sure to pick a secure one. For other installation methods and more detailed instructions, refer to the -official Grafana documentation. +[official Grafana documentation](https://grafana.com/docs/grafana/latest/#installing-grafana). ### Add Prometheus as a data source From 36a57b3ce1153e57b702e6d6350b7c854775f9fd Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Wed, 20 Mar 2024 11:31:44 +0530 Subject: [PATCH 26/33] rephrase the ansible inventory section --- .../blog/2024/scaling-opentelemetry-collectors.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 231e02b4edd5..7040e65f52ce 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -3,7 +3,7 @@ title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: OTel Collector with Ansible date: 2024-03-12 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' -cSpell:ignore: ansible Ishan Jain +cSpell:ignore: ansible Ishan Jain associated --- You can scale the deployment of @@ -44,15 +44,13 @@ ansible-galaxy collection install grafana.grafana ## Create an Ansible inventory file -Next, set up your hosts and assoicated IPs and create an inventory file. - -This example uses eight Linux hosts: two Ubuntu hosts, two CentOS hosts, two -Fedora hosts, and two Debian hosts. +Next, gather the IP addresses and URLs associated with your Linux hosts and +create an inventory file. 1. Create an Ansible inventory file. The Ansible inventory, which resides in a file named `inventory`, looks - similar to this: + similar to this ```ini 10.0.0.1 # hostname = ubuntu-01 @@ -65,6 +63,9 @@ Fedora hosts, and two Debian hosts. 10.0.0.8 # hostname = fedora-02 ``` + This example inventory uses eight Linux hosts: two Ubuntu hosts, two CentOS + hosts, two Fedora hosts, and two Debian hosts. + > **Note**: When copying the previous snippet, remove the comments. 2. Create an `ansible.cfg` file within the same directory as `inventory`, with From 68f3d70efc995bbc142e22a192ccccab18b9fdb5 Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Wed, 20 Mar 2024 11:33:18 +0530 Subject: [PATCH 27/33] find:fix --- content/en/blog/2024/scaling-opentelemetry-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-opentelemetry-collectors.md index 7040e65f52ce..42b0e826b312 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-opentelemetry-collectors.md @@ -3,7 +3,7 @@ title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: OTel Collector with Ansible date: 2024-03-12 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' -cSpell:ignore: ansible Ishan Jain associated +cSpell:ignore: ansible associated Ishan Jain --- You can scale the deployment of From 197716ca1390716bd781e68e10999697776f186f Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Tue, 26 Mar 2024 16:53:59 +0000 Subject: [PATCH 28/33] Results from /fix:all --- static/refcache.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/refcache.json b/static/refcache.json index 6f3e4b8481be..94b657be2fbb 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -4443,6 +4443,10 @@ "StatusCode": 200, "LastSeen": "2024-01-24T14:54:56.149229+01:00" }, + "https://grafana.com/docs/grafana/latest/#installing-grafana": { + "StatusCode": 200, + "LastSeen": "2024-03-26T16:53:21.349576193Z" + }, "https://grafana.com/oss/opentelemetry/": { "StatusCode": 200, "LastSeen": "2024-01-18T08:52:48.999991-05:00" From 3061cd4f6e58d4f9845599fe50380818d647b148 Mon Sep 17 00:00:00 2001 From: ishanjainn Date: Wed, 10 Apr 2024 19:49:54 +0530 Subject: [PATCH 29/33] update blog according to suggestions --- ...ry-collectors.md => scaling-collectors.md} | 53 ++++++++----------- 1 file changed, 22 insertions(+), 31 deletions(-) rename content/en/blog/2024/{scaling-opentelemetry-collectors.md => scaling-collectors.md} (79%) diff --git a/content/en/blog/2024/scaling-opentelemetry-collectors.md b/content/en/blog/2024/scaling-collectors.md similarity index 79% rename from content/en/blog/2024/scaling-opentelemetry-collectors.md rename to content/en/blog/2024/scaling-collectors.md index 42b0e826b312..170b3308118a 100644 --- a/content/en/blog/2024/scaling-opentelemetry-collectors.md +++ b/content/en/blog/2024/scaling-collectors.md @@ -1,7 +1,7 @@ --- title: Manage OpenTelemetry Collectors at scale with Ansible -linkTitle: OTel Collector with Ansible -date: 2024-03-12 +linkTitle: Collectors at scale with Ansible +date: 2024-04-12 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' cSpell:ignore: ansible associated Ishan Jain --- @@ -22,11 +22,11 @@ backend for metrics. ## Prerequisites -To follow this guide, make sure you meet the following requirements: +Before we begin, make sure you meet the following requirements: -- Ansible Installed in your system -- Linux hosts along with SSH access to each of these Linux hosts -- Prometheus for gathering metrics +- Ansible installed on your base system +- SSH access to two or more Linux hosts +- Prometheus configured to gather your metrics ## Install the Grafana Ansible collection @@ -34,11 +34,11 @@ The [OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) is provided through the [Grafana Ansible collection](https://docs.ansible.com/ansible/latest/collections/grafana/grafana/) -as of the 3.0.0 release. +as of release 4.0. To install the Grafana Ansible collection, run this command: -```shell +```sh ansible-galaxy collection install grafana.grafana ``` @@ -49,10 +49,9 @@ create an inventory file. 1. Create an Ansible inventory file. - The Ansible inventory, which resides in a file named `inventory`, looks - similar to this + An Ansible inventory, which resides in a file named `inventory`, lists each host IP on a separate line, like this (8 hosts shown): - ```ini + ```properties 10.0.0.1 # hostname = ubuntu-01 10.0.0.2 # hostname = ubuntu-02 10.0.0.3 # hostname = centos-01 @@ -63,15 +62,10 @@ create an inventory file. 10.0.0.8 # hostname = fedora-02 ``` - This example inventory uses eight Linux hosts: two Ubuntu hosts, two CentOS - hosts, two Fedora hosts, and two Debian hosts. - - > **Note**: When copying the previous snippet, remove the comments. - 2. Create an `ansible.cfg` file within the same directory as `inventory`, with the following values: - ```cfg + ```toml [defaults] inventory = inventory # Path to the inventory file private_key_file = ~/.ssh/id_rsa # Path to private SSH Key @@ -84,7 +78,7 @@ Next, define an Ansible playbook to apply your chosen or created OpenTelemetry Collector role across your hosts. Create a file named `deploy-opentelemetry.yml` in the same directory as your -`ansible.cfg` and `inventory`. +`ansible.cfg` and `inventory` files: ```yaml - name: Install OpenTelemetry Collector @@ -152,13 +146,13 @@ Create a file named `deploy-opentelemetry.yml` in the same directory as your {{% alert title="Note" %}} Adjust the configuration to match the specific telemetry you intend to collect -and where you plan to forward it. This configuration snippet is a basic example -designed for collecting host metrics and forwarded to Prometheus. +as well as where you plan to forward it to. This configuration snippet is a basic example +designed for collecting host metrics that get forwarded to Prometheus. {{% /alert %}} The previous configuration would provision the OpenTelemetry Collector to -collect host metrics from the Linux host. +collect metrics from the Linux host. ## Running the Ansible playbook @@ -171,25 +165,24 @@ ansible-playbook deploy-opentelemetry.yml ## Check your metrics in the backend -After your OpenTelemetry Collector's start sending metrics to Prometheus, follow -these quick steps to visualize them in Grafana: +After your OpenTelemetry Collectors start sending metrics to Prometheus, follow +these steps to visualize them in Grafana: ### Set up Grafana 1. **Install Docker**: Make sure Docker is installed on your system. -2. **Run Grafana Docker Container**: Start a Grafana server with this Docker +2. **Run Grafana Docker Container**: Start a Grafana server with the following command, which fetches the latest Grafana image: ```sh docker run -d -p 3000:3000 --name=grafana grafana/grafana ``` -3. **Access Grafana**: Navigate to `http://localhost:3000` in your web browser. - The default login details are `admin` for both the username and password. +3. **Access Grafana**: Open in your web browser. + The default login username and password are both `admin`. -4. **Change Password**: Upon your first login, you will be prompted to set a new - password. Make sure to pick a secure one. +4. **Change passwords** when prompted on first login -- pick a secure one! For other installation methods and more detailed instructions, refer to the [official Grafana documentation](https://grafana.com/docs/grafana/latest/#installing-grafana). @@ -217,6 +210,4 @@ For other installation methods and more detailed instructions, refer to the 3. Explore other metrics and create dashboards to gain insights into your system's performance. -This guide makes it easier for you to set up the OpenTelemetry Collector on -several Linux machines with the help of Ansible and shows you how to see the -data it collects in Grafana. +This blog post illustrated how you can configure and deploy multiple OpenTelemetry Collectors across various Linux hosts with the help of Ansible, as well as visualize collected telemetry in Grafana. Incase you find this useful, Github repo for [OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) for detailed configuration options. If you have questions, You can connect with me using my contact details at my GitHub profile [@ishanjainn](https://github.com/ishanjainn). \ No newline at end of file From 588c459086a1fece54764de189f6b8348d95c912 Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Fri, 12 Apr 2024 20:41:12 +0000 Subject: [PATCH 30/33] Results from /fix:all --- content/en/blog/2024/scaling-collectors.md | 21 +++++++++++++++------ static/refcache.json | 16 ++++++++++++++++ 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/content/en/blog/2024/scaling-collectors.md b/content/en/blog/2024/scaling-collectors.md index 170b3308118a..c84a044ff5da 100644 --- a/content/en/blog/2024/scaling-collectors.md +++ b/content/en/blog/2024/scaling-collectors.md @@ -49,7 +49,8 @@ create an inventory file. 1. Create an Ansible inventory file. - An Ansible inventory, which resides in a file named `inventory`, lists each host IP on a separate line, like this (8 hosts shown): + An Ansible inventory, which resides in a file named `inventory`, lists each + host IP on a separate line, like this (8 hosts shown): ```properties 10.0.0.1 # hostname = ubuntu-01 @@ -146,8 +147,9 @@ Create a file named `deploy-opentelemetry.yml` in the same directory as your {{% alert title="Note" %}} Adjust the configuration to match the specific telemetry you intend to collect -as well as where you plan to forward it to. This configuration snippet is a basic example -designed for collecting host metrics that get forwarded to Prometheus. +as well as where you plan to forward it to. This configuration snippet is a +basic example designed for collecting host metrics that get forwarded to +Prometheus. {{% /alert %}} @@ -179,8 +181,8 @@ these steps to visualize them in Grafana: docker run -d -p 3000:3000 --name=grafana grafana/grafana ``` -3. **Access Grafana**: Open in your web browser. - The default login username and password are both `admin`. +3. **Access Grafana**: Open in your web browser. The + default login username and password are both `admin`. 4. **Change passwords** when prompted on first login -- pick a secure one! @@ -210,4 +212,11 @@ For other installation methods and more detailed instructions, refer to the 3. Explore other metrics and create dashboards to gain insights into your system's performance. -This blog post illustrated how you can configure and deploy multiple OpenTelemetry Collectors across various Linux hosts with the help of Ansible, as well as visualize collected telemetry in Grafana. Incase you find this useful, Github repo for [OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) for detailed configuration options. If you have questions, You can connect with me using my contact details at my GitHub profile [@ishanjainn](https://github.com/ishanjainn). \ No newline at end of file +This blog post illustrated how you can configure and deploy multiple +OpenTelemetry Collectors across various Linux hosts with the help of Ansible, as +well as visualize collected telemetry in Grafana. Incase you find this useful, +Github repo for +[OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) +for detailed configuration options. If you have questions, You can connect with +me using my contact details at my GitHub profile +[@ishanjainn](https://github.com/ishanjainn). diff --git a/static/refcache.json b/static/refcache.json index 236c058334f8..066a977d7274 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -4487,6 +4487,22 @@ "StatusCode": 200, "LastSeen": "2024-01-24T14:54:56.149229+01:00" }, + "https://grafana.com/docs/alloy/latest/": { + "StatusCode": 200, + "LastSeen": "2024-04-12T20:40:28.798266582Z" + }, + "https://grafana.com/docs/grafana-cloud/monitor-applications/application-observability/setup/instrument/dotnet/": { + "StatusCode": 200, + "LastSeen": "2024-04-12T20:40:30.368448693Z" + }, + "https://grafana.com/docs/grafana-cloud/monitor-applications/application-observability/setup/instrument/java/": { + "StatusCode": 200, + "LastSeen": "2024-04-12T20:40:34.652514906Z" + }, + "https://grafana.com/docs/grafana/latest/#installing-grafana": { + "StatusCode": 200, + "LastSeen": "2024-04-12T20:40:33.435682362Z" + }, "https://grafana.com/oss/opentelemetry/": { "StatusCode": 200, "LastSeen": "2024-01-18T08:52:48.999991-05:00" From 4ef8ce612bb83802184a5e8e12dd181037700856 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Mon, 15 Apr 2024 10:39:48 +0200 Subject: [PATCH 31/33] Apply suggestions from code review --- content/en/blog/2024/scaling-collectors.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/blog/2024/scaling-collectors.md b/content/en/blog/2024/scaling-collectors.md index c84a044ff5da..c0342dc77a3f 100644 --- a/content/en/blog/2024/scaling-collectors.md +++ b/content/en/blog/2024/scaling-collectors.md @@ -3,7 +3,7 @@ title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: Collectors at scale with Ansible date: 2024-04-12 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' -cSpell:ignore: ansible associated Ishan Jain +cSpell:ignore: ansible associated Ishan Jain ishanjainn --- You can scale the deployment of @@ -215,7 +215,7 @@ For other installation methods and more detailed instructions, refer to the This blog post illustrated how you can configure and deploy multiple OpenTelemetry Collectors across various Linux hosts with the help of Ansible, as well as visualize collected telemetry in Grafana. Incase you find this useful, -Github repo for +GitHub repository for [OpenTelemetry Collector role](https://github.com/grafana/grafana-ansible-collection/tree/main/roles/opentelemetry_collector) for detailed configuration options. If you have questions, You can connect with me using my contact details at my GitHub profile From bbec3c9f1d7b4310e551ec0ebce842895f6e502e Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Mon, 15 Apr 2024 10:40:16 +0200 Subject: [PATCH 32/33] Set date --- content/en/blog/2024/scaling-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-collectors.md b/content/en/blog/2024/scaling-collectors.md index c0342dc77a3f..2ea15ea9588f 100644 --- a/content/en/blog/2024/scaling-collectors.md +++ b/content/en/blog/2024/scaling-collectors.md @@ -1,7 +1,7 @@ --- title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: Collectors at scale with Ansible -date: 2024-04-12 +date: 2024-04-15 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' cSpell:ignore: ansible associated Ishan Jain ishanjainn --- From 5ad02fbcb21fbfb26ce2e94e6f6b7454237adaef Mon Sep 17 00:00:00 2001 From: opentelemetrybot <107717825+opentelemetrybot@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:52:36 +0000 Subject: [PATCH 33/33] Results from /fix:dict --- content/en/blog/2024/scaling-collectors.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/blog/2024/scaling-collectors.md b/content/en/blog/2024/scaling-collectors.md index 2ea15ea9588f..e1ba3028967c 100644 --- a/content/en/blog/2024/scaling-collectors.md +++ b/content/en/blog/2024/scaling-collectors.md @@ -3,7 +3,7 @@ title: Manage OpenTelemetry Collectors at scale with Ansible linkTitle: Collectors at scale with Ansible date: 2024-04-15 author: '[Ishan Jain](https://github.com/ishanjainn) (Grafana)' -cSpell:ignore: ansible associated Ishan Jain ishanjainn +cSpell:ignore: ansible associated Ishan ishanjainn Jain --- You can scale the deployment of