# How to Setup Prometheus

Step by Step process to install Prometheus:

1. **Create a VM using terraform or from other ways,**
2. Create a gitlab reposirepository which include: Alert Manager script, Black box, nginx and prometheus including docker which has port number and so on.&#x20;
3. Once you create a VM we need to install a required software for prometheus, I am using ansible script to create a Prometheus. \
   I. Git clone the repo\
   II. ssl create\
   III. Install docker\
   IV. Docker-compose up
4. Now prometheus server is ready, Once we docker is up we will have following container running in our server:\
   &#x20;I. Alert Manager\
   &#x20;II. Prometheus\
   &#x20;III. Grafana\
   &#x20;IV. nginx\
   Now prometheus and grafana is up and running&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rajan-silwal-1.gitbook.io/product-docs/monitoring-tools/prometheus/how-to-setup-prometheus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
