Skip to content
View in the app

A better way to browse. Learn more.

hosang I.T.

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Use Grafana and Prometheus on Docker

Featured Replies

  • Administrators

To deploy Prometheus and Grafana on Docker, create a docker-compose.yml file that defines both services, mapping the necessary ports (9090 for Prometheus and 3000 for Grafana). Then, run the command docker-compose up -d to start the containers.

Setting Up Prometheus and Grafana on Docker

To deploy Prometheus and Grafana using Docker, follow these steps to create a docker-compose.yml file and start the services.

Prerequisites

  • Ensure you have Docker and Docker Compose installed on your machine.

  • Open ports 9090 (for Prometheus) and 3000 (for Grafana) on your host.

Create the Docker Compose File

  1. Create a directory for your project.

  2. Inside this directory, create a file named docker-compose.yml with the following content:

version: '3'

services:
  prometheus:
    image: prom/prometheus:latest
    container_name: prometheus
    ports:
      - "9090:9090"
    volumes:
      - ./prometheus.yml:/etc/prometheus/prometheus.yml
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'

  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    ports:
      - "3000:3000"
    volumes:
      - grafana-data:/var/lib/grafana

volumes:
  grafana-data:

Create the Prometheus Configuration File

  1. In the same directory, create a file named prometheus.yml with the following content:

global:
  scrape_interval: 15s

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

Start the Services

Run the following command in your terminal to start Prometheus and Grafana:

docker-compose up -d

Access the Services

  • Prometheus: Open your web browser and go to http://localhost:9090.

  • Grafana: Open your web browser and go to http://localhost:3000. The default login credentials are admin/admin.

Verify the Setup

Check that both services are running correctly by navigating to their respective URLs. You should see the Prometheus interface and the Grafana login page.

  • Replies 1
  • Views 48
  • Created
  • Last Reply

Top Posters In This Topic

  • Author
  • Administrators

If you don't have docker installed yet and if you are like me are running rhel on a VM here are the instructions

Installation Steps

  1. Register Your RHEL System:

    • Use the following command to register your system:

      subscription-manager register
  2. Enable the Extras Repository:

    • The Docker package is available in the RHEL Extras repository. Enable it with:

      subscription-manager repos --enable=rhel-7-server-extras-rpms
  3. Install Docker:

    • Use the package manager to install Docker:

      yum install docker
  4. Start Docker Service:

    • After installation, start the Docker service:

      systemctl start docker
  5. Enable Docker to Start on Boot:

    • To ensure Docker starts automatically on system boot, use:

      systemctl enable docker

Post-Installation

  • Verify Installation: Check if Docker is installed correctly by running:

    docker --version
  • Run a Test Container: You can test your installation by running a simple container:

    docker run hello-world

By following these steps, you will have Docker installed and running on your RHEL virtual machine.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.