GithubHelp home page GithubHelp logo

ibmi-system-metrics's Introduction

ibmi-system-metrics

Grafana and Prometheus deployments for analyzing ibm i system metrics

Container Architecture Overview

This project uses Docker Compose to launch two containers: Grafana and Prometheus. Grafana is a popular open-source dashboarding and visualization tool, while Prometheus is a monitoring and alerting toolkit for time series data.

In this architecture, Prometheus collects metrics from two ibm i systems running prometheus-jdbc-exporter and stores them in its time series database. Grafana then retrieves these metrics from Prometheus and displays them in customizable dashboards.

Setup and Usage

To get started, follow these steps:

  1. Install Docker on your system if you haven't already done so. You can find installation instructions for your platform on the Docker website.

  2. Clone this repository to your local machine:

git clone https://github.com/ajshedivy/ibmi-system-metrics.git
  1. Navigate to the repository directory:
cd ibmi-system-metrics/
  1. Start the containers using Docker Compose:
docker compose up -d

This command will start the containers in the background and leave them running. By default, Prometheus is configured to scrape metrics from the localhost endpoint. Nativate to http://localhost:9090/targets to see the list of ibm i exporters running:

image

You can now access Grafana by opening a web browser and navigating to http://localhost:3000. Login using the Grafana credentials

  • user: admin
  • password: grafana

image

Install Prometheus Plugin

To install a plugin, just find the "Settings" button (a gear icon) on the left-hand pane and go to "Plugins"

image

Search for "Prometheus" and install the Prometheus plugin from Grafana Labs image

Add a data source

Now, you will add your running prometheus deployment as a data source. To do so, go to Grafana configurations and find the "Data sources" option. Click the button to add a data source.

image

add the url: http://host.docker.internal:9090

host.docker.internal is a special hostname that can be used to connect from within a Docker container to the host machine's network.

Click "Save and Test" to verify that Grafana can talk to your backend!

Import Grafana dashboard

Click the Dashboards button on the left-hand navigation pane (looks like four small squares) and click the "import" button.

image

Upload the json configuration file src\grafana\multi-host-dashboard.json and click "load".

image

Now you're visualizing live metric data from two ibm i systems ut33p23 and ut51p41

image

Data exploration

Feel free to experiment with the dashboard configuration and differenet metrics. I have linked an example python scraper for analyzing the prometheus data in a local python environment. We can utilize the prometheus deplyment endpoint http://localhost:9090/api/v1/query to query the various metrics. There is also a prometheus client api that we can experiment with which you can install using pip.

ibmi-system-metrics's People

Contributors

ajshedivy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.