Home

Awesome

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

<!-- TODO: Replace Azure DevOps Pipeline ID here -->

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

<!-- INDEX_START --> <!-- INDEX_ENDF -->

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

<!-- OTHER_REPOS_START -->

Knowledge

Readme Card Readme Card

<!-- Not support on GitHub Markdown: <iframe src="https://raw.githubusercontent.com/HariSekhon/HariSekhon/main/knowledge.md" width="100%" height="500px"></iframe> Does nothing: <embed src="https://raw.githubusercontent.com/HariSekhon/HariSekhon/main/knowledge.md" width="100%" height="500px" /> -->

DevOps Code

Readme Card Readme Card Readme Card Readme Card

<!-- [![Gist Card](https://github-readme-stats.vercel.app/api/gist?id=f8f551332440f1ca8897ff010e363e03)](https://gist.github.com/HariSekhon/f8f551332440f1ca8897ff010e363e03) -->

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.

<!-- 1x1 pixel counter to record hits -->

<!-- OTHER_REPOS_END -->