Skip to content

Prometheus

In this article

Information

Prometheus is an open-source monitoring and alerting system that specializes in collecting and processing metrics from various sources such as applications, data storage systems, and services. Prometheus is widely used for monitoring cloud platforms, containerized environments (Kubernetes, Docker), and traditional IT systems.

Prometheus. Main Features

  • Metric collection: Prometheus periodically queries target services and collects metrics as time-series data through HTTP using the export protocol.
  • Data storage: collected metrics are stored locally on Prometheus servers in memory and on disk in its own high-performance format.
  • PromQL query language: the built-in PromQL query language allows for flexible selection, aggregation, and combination of metrics.
  • Alerting: a flexible alerting system enables setting up rules and sending notifications when specific conditions occur.
  • Federated approach: support for the federated approach enables combining data from multiple Prometheus instances for monitoring large-scale systems.
  • Open-source code: Prometheus is an open-source project with an active community of developers and users.

Features of the assembly

  • Installation is possible on Ubuntu 20.04+, AlmaLinux 8/9, RockyLinux 8/9;
  • Installation time is approximately 15-20 minutes along with OS installation;
  • Main configuration files for Prometheus and Alertmanager are located in the /root/prometheus directory.

The web interface will be accessible at: https://{Server_ID_from_Invapi}.hostkey.in

Getting started after deploying Prometheus

The service is managed in the Prometheus dashboard with a web interface, the link to which is located in the Invapi:

You can find the authorization data either in the Info >> 'Tags tab of the server control panel or in the email that was sent.

  • Link: in the webpanel tag;
  • Login and Password: in a letter to your e-mail upon receipt of the server;

Prometheus Startup Screen

The startup page of Prometheus presents an intuitive user interface containing numerous functional elements for effective monitoring and analysis of metric data. On this page, you will find a menu for navigation to key sections, settings for personalizing the interface, a field for entering queries to metric data, as well as panels for displaying query results in table or graph format.

Menu Items:

  • Alerts - shows current alerts and notifications generated by Prometheus rules.
  • Graph - allows visualizing and analyzing metric data using graphs.
  • Status - displays the overall state of the Prometheus monitoring system and its components.
  • Help - provides access to documentation and reference materials for Prometheus.

Settings:

  • Use local time - display time on graphs in the user's local timezone.
  • Enable query history - save query history for reuse.
  • Enable autocomplete - enable auto-complete when entering queries.
  • Enable highlighting - highlight syntax in queries.
  • Enable linter - enable syntax checking of queries.

The line Expression (press Shift+Enter for newlines) with the Execute button is a field for entering queries to metric data, allowing multi-line queries and executing them by clicking the Execute button.

The Table and Graph buttons allow you to choose how to display the query results: as a table (Table) or graph (Graph).

Buttons:

  • Add Panel - add a new panel to display the query result.
  • Remove Panel - remove an existing panel.

Note

Detailed information on the main settings of the Prometheus server can be found in the developer documentation.

Setting up a Telegram Bot

In this setup, there is a Telegram bot that can be immediately configured for use if needed. The bot's configuration files are located in the directory /root/prometheus_bot. A detailed instruction on setting up the bot can be found in the developers' documentation.

Ordering a server with Prometheus using the API

curl -s "https://invapi.hostkey.com/eq.php" -X POST \
--data "action=order_instance" \
--data "token=" \
--data "deploy_period=" \
--data "deploy_notify=" \
--data "email=" \
--data "pin=" \
--data "id=" \
--data "os_id=" \
--data "root_pass=" \
--data "hostname=" \
--data "ssh_key=" \
--data "post_install_callback=" \
--data "post_install_script=" \
--data "reinstall_key=" \
--data "os_name=" \
--data "imitate_deploy=" \
--data "imitate_error=0" \
--data "own_os=" \
--data "jenkins_task=" \
--data "traffic_plan=" \
--data "invoice_relid=" \
--data "preset=" \
--data "location_name=" \