Skip to content

Commit

Permalink
Docs: Getting started (#705)
Browse files Browse the repository at this point in the history
* moved docs

* Update docs/getting-started/_index.md

Co-authored-by: Robert Fratto <robert.fratto@grafana.com>

Co-authored-by: Robert Fratto <robert.fratto@grafana.com>
  • Loading branch information
2 people authored and mattdurham committed Jul 22, 2021
1 parent 2ee5734 commit 26fb3e2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 20 deletions.
40 changes: 23 additions & 17 deletions docs/getting-started.md → docs/getting-started/_index.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Getting Started
+++
title = Getting started with Grafana Agent
weight = 100
+++

# Getting started with Grafana Agent

This guide helps users get started with the Grafana Agent. For getting started
with the Grafana Agent Operator, please refer to the Operator-specific
Expand Down Expand Up @@ -37,18 +42,18 @@ tk apply ./environment
# Navigate to localhost:30080 in your browser
```

## Installing
## Installation methods

Currently, there are five ways to install the agent:
Currently, there are six ways to install the agent:

1. Use our Docker container
2. Use the Kubernetes install script (_recommended basic_)
3. Use the Kubernetes manifest
4. Installing the static binaries locally
5. Using Grafana Labs' official Tanka configs (_recommended advanced_)
6. Using the [Windows Installer](./windows.md)
- Use our Docker container
- Use the Kubernetes install script (_recommended basic_)
- Use the Kubernetes manifest
- Installing the static binaries locally
- Using Grafana Labs' official Tanka configs (_recommended advanced_)
- Using the [Windows Installer](./install-agent-on-windows.md)

### Docker Container
### Docker container

```
docker pull grafana/agent:v0.17.0
Expand All @@ -62,26 +67,27 @@ Two manifests will be installed: one for collecting metrics, and the other for
collecting logs. You will be prompted for input for each manifest that is
applied.

> **Warning**: Always verify scripts from the internet before running them.
> **Warning:** Always verify scripts from the internet before running them.
```
NAMESPACE="default" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/grafana/agent/release/production/kubernetes/install.sh)" | kubectl -ndefault apply -f -
NAMESPACE="default" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/grafana/agent/release/production/kubernetes/install-loki.sh)" | kubectl apply -f -
NAMESPACE="default" /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/grafana/agent/release/production/kubernetes/install-tempo.sh)" | kubectl apply -f -
```

**Note:** For the above script to scrape your pods, they must conform to the following rules:

1. The pod must _not_ have an annotation matching `prometheus.io/scrape: "false"` (this wouldn't be there unless you explicitly add it or if you deploy a Helm chart that has it).
2. The pod _must_ have a port with a name ending in `-metrics`. This is the port that will be scraped by the Agent. A lot of people using Helm struggle with this, since Helm charts don't usually follow this. You would need to add a new scrape config to scrape helm charts or find a way to tweak the Helm chart to follow this rules.
3. The pod _must_ have a label named name with any non-empty value. Helm usually lets you add extra labels, so this is less of a problem for Helm users.
4. The pod must currently be running. (i.e., Kubernetes must not report it having a phase of Succeeded or Failed).
- The pod must _not_ have an annotation matching `prometheus.io/scrape: "false"` (this wouldn't be there unless you explicitly add it or if you deploy a Helm chart that has it).
- The pod _must_ have a port with a name ending in `-metrics`. This is the port that will be scraped by the Agent. A lot of people using Helm struggle with this, since Helm charts don't usually follow this. You would need to add a new scrape config to scrape helm charts or find a way to tweak the Helm chart to follow this rules.
- The pod _must_ have a label named name with any non-empty value. Helm usually lets you add extra labels, so this is less of a problem for Helm users.
- The pod must currently be running. (i.e., Kubernetes must not report it having a phase of Succeeded or Failed).

### Kubernetes Manifest

If you wish to manually modify the Kubernetes manifest before deploying it
yourself, you can do so by downloading the [`agent.yaml` file](/production/kubernetes/agent.yaml).

### Installing Locally
### Install locally

Our [Releases](https://github.com/grafana/agent/releases) page contains
instructions for downloading static binaries that are published with every release.
Expand All @@ -90,7 +96,7 @@ instructions for downloading static binaries that are published with every relea

We provide [Tanka](https://tanka.dev) configurations in our [`production/`](/production/tanka/grafana-agent) directory.

## Creating a Config File
## Create a Config File

The Grafana Agent supports configuring **integrations**, a
**Prometheus-like** config, and a **Loki** config. All may coexist together
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Windows Installation
+++
title = "Install Agent on Windows"
weight = 120
+++

## Overview
# Install Agent on Windows

The installer will install Grafana Agent into the default directory `C:\Program Files\Grafana Agent`. The [windows_exporter integration](https://github.com/prometheus-community/windows_exporter) can be enabled with all default windows_exporter options.

Expand Down Expand Up @@ -63,4 +66,4 @@ loki:
job: windows
```
Additional windows_events configuration details can be found [here](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#windows_events)
Additional windows_events configuration details can be found [here](https://grafana.com/docs/loki/latest/clients/promtail/configuration/#windows_events).

0 comments on commit 26fb3e2

Please sign in to comment.