Exporter based on Hadoop clusters that use Ambari as their administrative tool, leveraging Ambari API to export cluster's metrics.
Перейти к файлу
microsoft-github-policy-service[bot] c915f59cae
Auto merge mandatory file pr
This pr is auto merged as it contains a mandatory file and is opened for more than 10 days.
2023-06-12 18:22:42 +00:00
StyleGuide Adding project. 2019-03-28 12:48:54 +02:00
deployment/ambari-based-hadoop-exporter Fixing comments 2019-05-14 17:35:14 +03:00
src Upgraded DotNet version from 5 to 6. Updated the NuGet package versions as well 2022-10-20 19:28:32 +05:30
test Upgraded DotNet version from 5 to 6. Updated the NuGet package versions as well 2022-10-20 19:28:32 +05:30
.dockerignore Adding project. 2019-03-28 12:48:54 +02:00
.gitignore Initial commit 2019-03-28 02:14:22 -07:00
AmbariBasedHadoopExporter.sln Adding project. 2019-03-28 12:48:54 +02:00
Dockerfile Upgraded DotNet version from 5 to 6. Updated the NuGet package versions as well 2022-10-20 19:28:32 +05:30
LICENSE Initial commit 2019-03-28 02:14:24 -07:00
NuGet.Config Adding project. 2019-03-28 12:48:54 +02:00
README.md Updating README 2020-04-19 15:56:07 +03:00
SECURITY.md Microsoft mandatory file 2023-06-02 17:50:39 +00:00

README.md

Introduction

Apache Ambari is an open-source management tool that allows you to administer your Hadoop cluster easly. Ambari uses AMS (Ambari Metrics System) to monitor an collect logs from related Hadoop installtions in your cluster, exposing them to the user in each component dashboard. In addition, you may want to export those metrics to a cenralized tool you are using. Grafana has a built in support for that, which is great.
However, you may want to export AMS's collected metrics to a different source like Prometheus. This repo attepts to try and solve this issue, implementing a Prometheus exporter for Hadoop based on Ambari API.

Note - there are open source Prometheus exporters for some Hadoop components like YARN and HDFS, but, Ambari gives you a single point of access to multiple collected metrics for services, components and configuration. Thus our effort building an exporter based on its API.

Tested environment

We're running on Azure environment, using Azure HDInsight cluster 3.6 running HDP 2.6.
The exporter was deployed on our Kubernetes cluster running init-container that handles all secrets acquisition from an Azure Key Vault and injection to our containers.

Download from DockerHub

You can download an image from this DockerHub.

Build with Docker

  1. Clone the project and go to its root folder.
  2. Run docker build . -t ambari-exporter, this will create a docker image on your local machine, run docker images ambari-exporter to validate that the image exists.

Deploying to Kubernetes

Every service requires settings file to run, an example of full settings file can be found here. But, since we're using Kubernetes as our orchestrator, we can leverage helm to inject those values during deployment as environment variables.

Prerequisites

Install init-container in your cluster for Azure Key Vault integration. This is used to extract secrets in a secure way.

Deployment example

View an example deployment helm chart here.

Dependencies

All of the exporters are based on Ambari's API.

Implementation dependencies:

  1. Prometheus-net - used to expose the API endpoint for Prometheus.
  2. Serilog - for formatting log messages.
  3. Newtonsoft - for Json parsing.
  4. FluentAssertions, Moq 4, xUnit - for testing.
  5. StyleCop - for code formatting.

Support

For any issue, request, question please feel to create an issue, we'll be trying giving you the best support as possible.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.