Skip to content

HariSekhon/Prometheus

Repository files navigation

Hari Sekhon - Prometheus

GitHub stars GitHub forks Lines of Code License My LinkedIn GitHub Last Commit

Codacy Badge CodeFactor Quality Gate Status Maintainability Rating Reliability Rating Security Rating

Python Linux Mac

Mac Homebrew Alpine CentOS Debian Fedora Redhat Rocky Ubuntu

CI Builds Overview Azure DevOps Pipeline GitLab Pipeline BitBucket Pipeline

Repo on GitHub Repo on GitLab Repo on Azure DevOps Repo on BitBucket

Validation Kics Grype Semgrep Semgrep Cloud SonarCloud Systemd-Analyze Verify Trivy YAML

Quick Prometheus Doc

See the Prometheus page in the HariSekhon/Knowledge-Base repo.

Prometheus Management Code

Initialize DevOps-Bash-tools and Template git submodules

make init

or

git submodule update --init --recursive

Prometheus

Download and install Prometheus locally quickly

bash-tools/install/install_prometheus.sh

Download Quick Sample Config from HariSekhon/Templates

HariSekhon/Templates - prometheus.yml

wget https://raw.githubusercontent.com/HariSekhon/Templates/refs/heads/master/prometheus.yml

Run Prometheus

Run Prometheus locally, installing it if not already installed:

bash-tools/monitoring/prometheus.sh

Or using Ansible (Linux only):

ansible-playbook -i localhost, ansible/prometheus/playbook.yml

Or to run it in Docker using docker-compose:

bash-tools/monitoring/prometheus_docker.sh

Open http://localhost:9090 URL to see Prometheus UI.

This script opens it using whatever the default browser on your Mac or Linux system is:

bash-tools/bin/urlopen.sh http://localhost:9090

Add exporters like the local Node Exporter the sample config is expecting using the next section.

Prometheus Exporters

To install an exporter, run the relevant install script from here:

Install Node Exporter

bash-tools/install/install_prometheus_node_exporter.sh

Or using Ansible (Linux only):

ansible-playbook -i localhost, ansible/prometheus_node_exporter/playbook.yml

Run Node Exporter

Run Prometheus Node Exporter locally, installing it if not already installed:

bash-tools/monitoring/prometheus_node_exporter.sh

Systemd Unit Files

Systemd unit files for running Prometheus and Node Exporter are available under systemd.

More Core Repos

Knowledge

Readme Card Readme Card

DevOps Code

Readme Card Readme Card Readme Card Readme Card

Containerization

Readme Card Readme Card

CI/CD

Readme Card Readme Card

DBA - SQL

Readme Card

DevOps Reloaded

Readme Card Readme Card Readme Card Readme Card Readme Card

Templates

Readme Card Readme Card

Misc

Readme Card Readme Card

The rest of my original source repos are here.

Pre-built Docker images are available on my DockerHub.

About

Prometheus deployment / management code

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published