Skip to content

Commit 776085b

Browse files
committed
Start documentation. Created Quickstart steps
1 parent d791d40 commit 776085b

File tree

7 files changed

+135
-14
lines changed

7 files changed

+135
-14
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
## QuickStart
2+
3+
This tutorial guides you through running the simplest setup of the observability stack using example configuration files and Docker Compose.
4+
5+
After completing these steps, you will have a full observability stack running locally, showing the availability of web pages you want to target
6+
7+
### Requirements
8+
9+
- Docker installed ([install Docker](https://docs.docker.com/get-docker/))
10+
- Docker Compose installed ([install Docker Compose](https://docs.docker.com/compose/install/))
11+
- A terminal with network access
12+
13+
### Step 1: Download the sample files
14+
15+
Create a folder on your machine, then download these two files from GitHub into it:
16+
17+
- `docker-compose.yml`
18+
- `prometheus-config.yml`
19+
20+
You can do this manually or by running:
21+
22+
```bash
23+
mkdir observability-stack
24+
cd observability-stack
25+
curl -O https://github.com/CogStack/cogstack-platform-toolkit/blob/main/observability/examples/simple/docker-compose.yml
26+
curl -O https://github.com/CogStack/cogstack-platform-toolkit/blob/main/observability/examples/simple/probe-simple.yml
27+
```
28+
29+
### Step 2: Start the stack
30+
31+
In the folder containing the downloaded files, run:
32+
33+
```bash
34+
docker compose up -d
35+
```
36+
37+
### Step 3: Access the dashboards
38+
Open your web browser and go to:
39+
40+
`localhost/grafana`
41+
42+
You should see the Grafana dashboard displaying the availability of the sample web page.
43+
44+
There it is, you can now see the availability of the cogstack homepage, as well as the observability stack
45+
46+
### Step 4: Probe your own web page
47+
Now you can look at getting monitoring on your own page.
48+
49+
In your current folder, edit the file `probe-simple.yml` that you downloaded from git.
50+
51+
Add the following yml to the bottom of the file:
52+
53+
```yaml
54+
- targets:
55+
- https://google.com
56+
labels:
57+
name: google
58+
job: probe-my-own-site
59+
```
60+
61+
62+
The change should get applied automatically, but if you dont want to wait then run
63+
64+
```
65+
docker compose restart
66+
```
67+
68+
Now refresh the grafana dashboard, and you can see the availability of google.com, it's probably 100%!
69+
70+
71+
## Next steps
72+
This is the end of this quickstart tutorial, that enables probing availability of endpoints.
73+
74+
For the next steps we can:
75+
- Productionise our deployment to enable further features
76+
- Enable *Telemetry* like VM memory usage, and Elasticsearch index size, by running Exporters
77+
- Enable *Alerting* based on our availability and a defined Service Level Objective (SLO)
78+
- Look further into the available dashboards
79+
- Fully customize the stack with our own dashboards, recording rules and metrics
80+
-
81+
82+
83+
84+
85+
86+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
This page
3+
4+
5+
6+
## Run the Observability Stack using Docker Compose
7+
8+
See the /examples folder for a working example of running this
9+
10+
To setup the stack for your deployment:
11+
- Create prometheus configurations as listed below
12+
- Copy this docker-compose.yml file
13+
- Mount your site config files into `/etc/prometheus/cogstack/site`
14+
- Run with docker compose
15+
16+
To collect metrics from VMs to fill out the dashboards
17+
- Run the Exporters on each VM as detailed below

observability/docs/get-started/userguide-tutorial.md

Whitespace-only changes.

observability/docs/overview.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Cogstack Observability Stack
2+
3+
This project provides observability of a cogstack deployment.
4+
5+
It provides the following features:
6+
- Dashboards for availability
7+
- Telemetry of infrastructure such as host memory usage, and elasticsearch index size
8+
- Alerting based on a defined Service Level Objective (SLO) and burn rates
9+
- Blackbox Probing of services to find service level indicators of uptime and latency
10+
- A working inventory of what is running where
11+
12+
## Contents
13+
14+
See the [Quickstart](./get-started/quickstart.md) to see how to easily run this stack.
15+
16+
17+
18+

observability/examples/simple/docker-compose.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
image: cogstacksystems/cogstack-observability-prometheus:latest
77
restart: unless-stopped
88
volumes:
9-
- ./prometheus:/etc/prometheus/cogstack/site
9+
- ./probe-simple.yml:/etc/prometheus/cogstack/site/scrape-configs/probers/probe-simple.yml
1010
- prometheus-data:/prometheus
1111
networks:
1212
- observability
@@ -17,8 +17,6 @@ services:
1717
- grafana-data:/var/lib/grafana
1818
networks:
1919
- observability
20-
ports:
21-
- '3000:3000'
2220
environment:
2321
- GF_AUTH_ANONYMOUS_ENABLED=true # Allows use of grafana without sign in
2422
- GF_AUTH_ANONYMOUS_ORG_ROLE=Viewer
@@ -28,17 +26,14 @@ services:
2826
- observability
2927
restart: unless-stopped
3028
ports:
31-
- "80:80"
32-
- "8080:8080"
29+
- "180:80"
3330
volumes:
3431
- /var/run/docker.sock:/var/run/docker.sock:ro # So that Traefik can listen to the Docker events
3532
blackbox-exporter:
3633
image: cogstacksystems/cogstack-observability-blackbox-exporter:latest
3734
restart: unless-stopped
38-
ports:
39-
- "9115:9115"
4035
networks:
41-
- observability-exporters
36+
- observability
4237
networks:
4338
observability:
4439
driver: bridge
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Example of probe targets
2+
- targets:
3+
- https://cogstack.org
4+
labels:
5+
name: cogstack-homepage
6+
job: probe-services
7+
- targets:
8+
- https://google.com
9+
labels:
10+
name: google
11+
job: probe-services

observability/examples/simple/prometheus/scrape-configs/probers/probe-simple.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)