Installing Prometheus

enaio® mail-archive-service 10.10 »

Prometheus is an optional component that can be installed and integrated to monitor enaio® mail-archive-service.

Prometheus offers interfaces to detailed monitoring tools such as Grafana and can usually also be integrated into existing monitoring systems.

You can find the installation data and instructions here.

As an example, the configuration file for Prometheus can be created using the following data:

# meine globale Konfiguration
global:
  scrape_interval: 15s # Legen Sie das Scrape-Intervall auf 15 Sekunden fest. Der Standardwert ist ein Mal pro Minute.
  evaluation_interval: 15s # Evaluieren Sie Regeln alle 15 Sekunden. Der Standardwert ist ein Mal pro Minute.
  # scrape_timeout ist auf den globalen Standardwert (10s) eingestellt.

# Konfiguration des Alertmanagers
alerting:
  alertmanagers:
    - static_configs:
        - targets:
          # - alertmanager:9093

# Laden Sie die Regeln einmal und werten Sie sie in regelmäßigen Abständen gemäß dem globalen 'evaluation_interval' aus.
rule_files:
  # - "first_rules.yml"
  # - "second_rules.yml"

# Eine Scrape-Konfiguration, die genau einen zu scrapenden Endpunkt enthält:
# Hier ist es Prometheus selbst.
scrape_configs:

  - job_name: "mail-journaling-service"
  
    scrape_interval: 15s

    metrics_path: '/manage/prometheus'

    static_configs:
      - targets: ["localhost:8100"]

Scrape and evaluation intervals are specified here as 15 seconds each.

Prometheus as a Service

  • Ensure that Prometheus can be run with the specified configuration by executing prometheus.exe and calling up localhost:9090 from a browser.

    If the Prometheus port is already in use, change the port as follows:

    • Run the following command:

      <Path to prometheus.exe> --web.listen-address=:9010

    • To install the Windows service with this argument, run the following command:

      nssm.exe install Prometheus "<Path to prometheus.exe>" "--web.listen-address=:9010"

  • Install the latest version of NSSM Tools.

  • Open the command prompt from the extracted nssm.exe folder and add the service using the following command:

    nssm.exe install Prometheus <Path to prometheus.exe>

Prometheus will then be available as a Windows service.