github.com/thanos-io/thanos@v0.32.5/docs/getting-started.md (about)

     1  # Getting started
     2  
     3  Thanos provides a global query view, high availability, data backup with historical, cheap data access as its core features in a single binary.
     4  
     5  Those features can be deployed independently of each other. This allows you to have a subset of Thanos features ready for immediate benefit or testing, while also making it flexible for gradual roll outs in more complex environments.
     6  
     7  In this quick-start guide, we will explain:
     8  
     9  * How to ask questions, build and contribute to Thanos.
    10  * A few common ways of deploying Thanos.
    11  * Links for further reading.
    12  
    13  Thanos will work in cloud native environments as well as more traditional ones. Some users run Thanos in Kubernetes while others on the bare metal.
    14  
    15  ## Dependencies
    16  
    17  Thanos aims for a simple deployment and maintenance model. The only dependencies are:
    18  
    19  * One or more [Prometheus](https://prometheus.io) v2.2.1+ installations with persistent disk.
    20  * Optional object storage
    21    * Thanos is able to use [many different storage providers](storage.md), with the ability to add more providers as necessary.
    22  
    23  ## Get Thanos!
    24  
    25  You can find the latest Thanos release [here](https://github.com/thanos-io/thanos/releases).
    26  
    27  Main should be stable and usable. Every commit to main builds docker image named `main-<data>-<sha>` in [quay.io/thanos/thanos](https://quay.io/repository/thanos/thanos) and [thanosio/thanos dockerhub (mirror)](https://hub.docker.com/r/thanosio/thanos)
    28  
    29  We also perform minor releases every 6 weeks.
    30  
    31  During that, we build tarballs for major platforms and release docker images.
    32  
    33  See [release process docs](release-process.md) for details.
    34  
    35  ## Building from source:
    36  
    37  Thanos is built purely in [Golang](https://go.dev/), thus allowing to run Thanos on various x64 operating systems.
    38  
    39  Thanos can **not** be downloaded nor installed via the `go get` or `go install` methods. Starting in Go 1.17, installing executables with `go get` is deprecated. `go install` may be used instead. However, in order to avoid ambiguity, when go install is used with a version suffix, all arguments must refer to main packages in the same module at the same version. If that module has a `go.mod` file, it must not contain directives like *replace* or *exclude* that would cause it to be interpreted differently if it were the main module.
    40  
    41  Thanos uses the directive *replace*. The reason is to provide a way to unblock ourselves promptly while also being flexible in the packages that we (re)use. Support for `go install` is not likely at this point.
    42  
    43  If you want to build Thanos from source you would need a working installation of the Go 1.18+ [toolchain](https://github.com/golang/tools) (`GOPATH`, `PATH=${GOPATH}/bin:${PATH}`). Next one should make a clone of our repository:
    44  
    45  ```
    46  git clone git@github.com:thanos-io/thanos.git
    47  ```
    48  
    49  When you have access to the source code locally, we have prepared a `Makefile`. Invoke this by using `make` in your CLI. For example `make help` will list all options. For building Thanos one could use `make build`
    50  
    51  The `thanos` binary should now be in your project folder and is the only thing required to deploy any of its components.
    52  
    53  ## Contributing
    54  
    55  Contributions are very welcome! See our [CONTRIBUTING.md](../CONTRIBUTING.md) for more information.
    56  
    57  ## Community
    58  
    59  Thanos is an open source project and we value and welcome new contributors and members of the community. Here are ways to get in touch with the community:
    60  
    61  * Slack: [#thanos](https://slack.cncf.io/)
    62  * Issue Tracker: [GitHub Issues](https://github.com/thanos-io/thanos/issues)
    63  
    64  ## Maintainers
    65  
    66  See [MAINTAINERS.md](../MAINTAINERS.md).
    67  
    68  ## Community Thanos Kubernetes Applications
    69  
    70  Thanos is **not** tied to Kubernetes. However, Kubernetes, Thanos and Prometheus are part of the CNCF so the most popular applications are on top of Kubernetes.
    71  
    72  Our friendly community maintains a few different ways of installing Thanos on Kubernetes. See those below:
    73  
    74  * [prometheus-operator](https://github.com/coreos/prometheus-operator): Prometheus operator has support for deploying Prometheus with Thanos
    75  * [kube-thanos](https://github.com/thanos-io/kube-thanos): Jsonnet based Kubernetes templates.
    76  * [Community Helm charts](https://artifacthub.io/packages/search?ts_query_web=thanos)
    77  
    78  If you want to add yourself to this list, let us know!
    79  
    80  ## Deploying Thanos
    81  
    82  * Detailed, free, in-browser interactive tutorial [as Killercoda Thanos Course](https://killercoda.com/thanos/)
    83  * [Quick Tutorial](quick-tutorial.md) on Thanos website.
    84  
    85  ## Operating
    86  
    87  See up to date [jsonnet mixins](https://github.com/thanos-io/thanos/tree/main/mixin/README.md) We also have example Grafana dashboards [here](https://github.com/thanos-io/thanos/blob/main/examples/dashboards/dashboards.md) and some [alerts](https://github.com/thanos-io/thanos/blob/main/examples/alerts/alerts.md) to get you started.
    88  
    89  ## Talks
    90  
    91  * 2022
    92    * [Story of Correlation: Integrating Thanos Metrics with Observability Signals](https://www.youtube.com/watch?v=rWFb01GW0mQ)
    93    * [Running the Observability As a Service For Your Teams With Thanos](https://www.youtube.com/watch?v=I4Mfyfd_4M8)
    94    * [Monitoring multiple Kubernetes Clusters with Thanos](https://www.youtube.com/watch?v=V4v-c0VeqLw)
    95    * [Thanos: Scaling Prometheus 101](https://www.youtube.com/watch?v=iN6DR28gAyQ)
    96    * [MaaS for the Masses: Build Your Monitoring-as-a-Service Solution With Prometheus](https://www.youtube.com/watch?v=EFPPic9dBS4)
    97  
    98  * 2021
    99    * [Adopting Thanos gradually across all of LastPass infrastructures](https://www.youtube.com/watch?v=Ddq8m04594A)
   100    * [Using Thanos to gain a unified way to query over multiple clusters](https://www.youtube.com/watch?v=yefffBLuVh0)
   101    * [Thanos: Easier Than Ever to Scale Prometheus and Make It Highly Available](https://www.youtube.com/watch?v=mtwwUqeIHAw)
   102  
   103  * 2020
   104    * [Absorbing Thanos Infinite Powers for Multi-Cluster Telemetry](https://www.youtube.com/watch?v=6Nx2BFyr7qQ)
   105    * [Turn It Up to a Million: Ingesting Millions of Metrics with Thanos Receive](https://www.youtube.com/watch?v=5MJqdJq41Ms)
   106    * [Thanos: Cheap, Simple and Scalable Prometheus](https://www.youtube.com/watch?v=Wroo1n5GWwg)
   107    * [Thanos: Prometheus at Scale!](https://www.youtube.com/watch?v=q9j8vpgFkoY)
   108    * [Introduction to Thanos](https://www.youtube.com/watch?v=j4TAGO019HU)
   109    * [Using Thanos as a long term storage for your Prometheus metrics](https://www.youtube.com/watch?v=cedzqLgRgaM)
   110  
   111  * 2019
   112    * [FOSDEM + demo](https://fosdem.org/2019/schedule/event/thanos_transforming_prometheus_to_a_global_scale_in_a_seven_simple_steps/)
   113    * [Alibaba Cloud user story](https://www.youtube.com/watch?v=ZS6zMksfipc)
   114    * [CloudNative Warsaw Slides](https://docs.google.com/presentation/d/1cKpbJY3jIAtr03M-zcNujwBA38_LDj7NqE4LjNfvglE/edit?usp=sharing)
   115    * [CloudNative Deep Dive](https://www.youtube.com/watch?v=qQN0N14HXPM)
   116    * [CloudNative Intro](https://www.youtube.com/watch?v=m0JgWlTc60Q)
   117    * [Prometheus in Practice: HA with Thanos](https://www.slideshare.net/ThomasRiley45/prometheus-in-practice-high-availability-with-thanos-devopsdays-edinburgh-2019)
   118  
   119  * 2018
   120    * [Very first Prometheus Meetup Slides](https://www.slideshare.net/BartomiejPotka/thanos-global-durable-prometheus-monitoring)
   121  
   122  ## Blog posts
   123  
   124  * 2023:
   125    * [Thanos Ruler and Prometheus Rules — a match made in heaven.](https://medium.com/@helia.barroso/thanos-ruler-and-prometheus-rules-a-match-made-in-heaven-a4f08f2399ac)
   126  
   127  * 2022:
   128    * [Thanos at Medallia: A Hybrid Architecture Scaled to Support 1 Billion+ Series Across 40+ Data Centers](https://thanos.io/blog/2022-09-08-thanos-at-medallia/)
   129    * [Deploy Thanos Receive with native OCI Object Storage on Oracle Kubernetes Engine](https://medium.com/@lmukadam/deploy-thanos-receive-with-native-oci-object-storage-on-kubernetes-829326ea0bc6)
   130    * [Leveraging Consul for Thanos Query Discovery](https://nicolastakashi.medium.com/leveraging-consul-for-thanos-query-discovery-34212d496c88)
   131  
   132  * 2021:
   133    * [Adopting Thanos at LastPass](https://krisztianfekete.org/adopting-thanos-at-lastpass/)
   134  
   135  * 2020:
   136    * [Banzai Cloud user story](https://banzaicloud.com/blog/multi-cluster-monitoring/)
   137    * [Monitoring the Beat microservices: A tale of evolution](https://build.thebeat.co/monitoring-the-beat-microservices-a-tale-of-evolution-4e246882606e)
   138  
   139  * 2019:
   140    * [Metric monitoring architecture](https://improbable.io/blog/thanos-architecture-at-improbable)
   141    * [Red Hat user story](https://blog.openshift.com/federated-prometheus-with-thanos-receive/)
   142    * [HelloFresh blog posts part 1](https://engineering.hellofresh.com/monitoring-at-hellofresh-part-1-architecture-677b4bd6b728)
   143    * [HelloFresh blog posts part 2](https://engineering.hellofresh.com/monitoring-at-hellofresh-part-2-operating-the-monitoring-system-8175cd939c1d)
   144    * [Thanos deployment](https://www.metricfire.com/blog/ha-kubernetes-monitoring-using-prometheus-and-thanos)
   145    * [Taboola user story](https://blog.taboola.com/monitoring-and-metering-scale/)
   146    * [Thanos via Prometheus Operator](https://kkc.github.io/2019/02/10/prometheus-operator-with-thanos/)
   147  
   148  * 2018:
   149    * [Introduction blog post](https://improbable.io/blog/thanos-prometheus-at-scale)
   150    * [Monzo user story](https://monzo.com/blog/2018/07/27/how-we-monitor-monzo)
   151    * [Banzai Cloud hand's on](https://banzaicloud.com/blog/hands-on-thanos/)
   152    * [uSwitch user story](https://medium.com/uswitch-labs/making-prometheus-more-awesome-with-thanos-fbec8c6c28ad)
   153    * [Thanos usage](https://www.infracloud.io/blogs/thanos-ha-scalable-prometheus/)
   154  
   155  ## Integrations
   156  
   157  See [Integrations page](integrations.md).
   158  
   159  ## Testing Thanos on Single Host
   160  
   161  We don't recommend running Thanos on a single node on production. Thanos is designed and built to run as a distributed system. Vanilla Prometheus might be totally enough for small setups.
   162  
   163  However, in case you want to play and run Thanos components on a single node, we recommend following the port layout:
   164  
   165  | Component      | Interface               | Port  |
   166  |----------------|-------------------------|-------|
   167  | Sidecar        | gRPC                    | 10901 |
   168  | Sidecar        | HTTP                    | 10902 |
   169  | Query          | gRPC                    | 10903 |
   170  | Query          | HTTP                    | 10904 |
   171  | Store          | gRPC                    | 10905 |
   172  | Store          | HTTP                    | 10906 |
   173  | Receive        | gRPC (store API)        | 10907 |
   174  | Receive        | HTTP (remote write API) | 10908 |
   175  | Receive        | HTTP                    | 10909 |
   176  | Rule           | gRPC                    | 10910 |
   177  | Rule           | HTTP                    | 10911 |
   178  | Compact        | HTTP                    | 10912 |
   179  | Query Frontend | HTTP                    | 10913 |
   180  
   181  You can see example one-node setup [here](../scripts/quickstart.sh).