Git Product home page Git Product logo

hands-on-infrastructure-monitoring-with-prometheus's Introduction

Hands-On Infrastructure Monitoring with Prometheus

Hands-On Infrastructure Monitoring with Prometheus

This is the code repository for Hands-On Infrastructure Monitoring with Prometheus , published by Packt.

Implement and scale queries, dashboards, and alerting across machines and containers

What is this book about?

Prometheus is an open source monitoring system. It provides a modern time series database, a robust query language, several metric visualization possibilities, and a reliable alerting solution for traditional and cloud-native infrastructure.

This book covers the following exciting features:

  • Grasp monitoring fundamentals and implement them using Prometheus
  • Discover how to extract metrics from common infrastructure services
  • Find out how to take full advantage of PromQL
  • Design a highly available, resilient, and scalable Prometheus stack
  • Explore the power of Kubernetes Prometheus Operator
  • Understand concepts such as federation and cross-shard aggregation
  • Unlock seamless global views and long-term retention in cloud-native apps with Thanos

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

annotations:
     description: "Node exporter {{ .Labels.instance }} is down."
     link: "https://example.com"

Following is what you need for this book: If you’re a software developer, cloud administrator, site reliability engineer, DevOps enthusiast or system admin looking to set up a fail-safe monitoring and alerting system for sustaining infrastructure security and performance, this book is for you. Basic networking and infrastructure monitoring knowledge will help you understand the concepts covered in this book.

With the following software and hardware list you can run all code files present in the book (Chapter 1-14).

Software and Hardware List

Chapter Software required OS required
3-14 VirtualBox (6.0.4) Ubuntu 18.04 LTS / macOS 10.14.3
3-14 Vagrant (2.2.4) Ubuntu 18.04 LTS / macOS 10.14.3
3-14 Minikube (1.0.1) Ubuntu 18.04 LTS / macOS 10.14.3
3-14 kubectl (1.14.1) Ubuntu 18.04 LTS / macOS 10.14.3

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Related products

Get to Know the Author

Joel Bastos is an open source supporter and contributor, with a background in infrastructure security and automation. He is always striving for the standardization of processes, code maintainability, and code reusability. He has defined, led, and implemented critical, highly available, and fault-tolerant enterprise and web-scale infrastructures in several organizations, with Prometheus as the cornerstone. He has worked at two unicorn companies in Portugal and at one of the largest transaction-oriented gaming companies in the world. Previously, he has supported several governmental entities with projects such as the Public Key Infrastructure for the Portuguese citizen card. You can find his blogs at kintoandar and on Twitter with the handle @kintoandar.

Pedro Araújo is a site reliability and automation engineer and has defined and implemented several standards for monitoring at scale. His contributions have been fundamental in connecting development teams to infrastructure. He is highly knowledgeable about infrastructure, but his passion is in the automation and management of large-scale, highly-transactional systems. Pedro has contributed to several open source projects, such as Riemann, OpenTSDB, Sensu, Prometheus, and Thanos. You can find him on Twitter with the handle @phcrva.

Suggestions and Feedback

Click here if you have any feedback or suggestions.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781789612349

hands-on-infrastructure-monitoring-with-prometheus's People

Contributors

kintoandar avatar mig4ng avatar nitgeo avatar packt-itservice avatar packtutkarshr avatar pharaujo avatar rutujapatade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hands-on-infrastructure-monitoring-with-prometheus's Issues

chapter 3 "curl" is not available

Hi everyone.

I have an issue when trying to set up the environment.
I tried it on Windows and Linux but the error is the same.

Would be great if anyone could help me.
Thanks in advance.

Bringing machine 'prometheus' up with 'virtualbox' provider...
Bringing machine 'grafana' up with 'virtualbox' provider...
Bringing machine 'alertmanager' up with 'virtualbox' provider...
==> prometheus: Importing base box 'bento/ubuntu-18.04'...
==> prometheus: Matching MAC address for NAT networking...
==> prometheus: Checking if box 'bento/ubuntu-18.04' version '202303.13.0' is up to date...
==> prometheus: Setting the name of the VM: prometheus
==> prometheus: Clearing any previously set network interfaces...
==> prometheus: Preparing network interfaces based on configuration...
prometheus: Adapter 1: nat
prometheus: Adapter 2: hostonly
==> prometheus: Forwarding ports...
prometheus: 22 (guest) => 2222 (host) (adapter 1)
==> prometheus: Running 'pre-boot' VM customizations...
==> prometheus: Booting VM...
==> prometheus: Waiting for machine to boot. This may take a few minutes...
prometheus: SSH address: 127.0.0.1:2222
prometheus: SSH username: vagrant
prometheus: SSH auth method: private key
prometheus:
prometheus: Vagrant insecure key detected. Vagrant will automatically replace
prometheus: this with a newly generated keypair for better security.
prometheus:
prometheus: Inserting generated public key within guest...
prometheus: Removing insecure key from the guest if it's present...
prometheus: Key inserted! Disconnecting and reconnecting using new SSH key...
==> prometheus: Machine booted and ready!
==> prometheus: Checking for guest additions in VM...
prometheus: The guest additions on this VM do not match the installed version of
prometheus: VirtualBox! In most cases this is fine, but in rare cases it can
prometheus: prevent things such as shared folders from working properly. If you see
prometheus: shared folder errors, please make sure the guest additions within the
prometheus: virtual machine match the version of VirtualBox you have installed on
prometheus: your host and reload your VM.
prometheus:
prometheus: Guest Additions Version: 7.0.6
prometheus: VirtualBox Version: 6.1
==> prometheus: Setting hostname...
==> prometheus: Configuring and enabling network interfaces...
==> prometheus: Mounting shared folders...
prometheus: /vagrant => /home/lukas/Schreibtisch/Projektarbeit/Git/Hands-On-Infrastructure-Monitoring-with-Prometheus
==> prometheus: Running provisioner: shell...
prometheus: Running: /tmp/vagrant-shell20240126-37471-ptebvi.sh
==> prometheus: Running provisioner: shell...
prometheus: Running: /tmp/vagrant-shell20240126-37471-kjx8oo.sh
prometheus: [2024-01-26T19:54:10+0000] ERROR: Software requirement "curl" is not available
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Out of memory on Prometheus VM

When spinning the VMs up (Chapter 3), the script times out. When visiting the VM in Virtualbox it has an Out of memory error.

Increasing the memory from 256 to 512 in vagrant_defaults.rb solves this issue.

(Edit: This is on Windows 10)

Error running 'vagrant up' for Hands-On-Infrastructure-Monitoring-with-Prometheus

Error with vagrant up

==> prometheus: Running provisioner: shell...
prometheus: Running: C:/Users/esudbat/AppData/Local/Temp/vagrant-shell20201214-17024-1xbwb5v.sh
prometheus: /vagrant/utils/helpers.sh: line 2: $'\r': command not found
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

Error with completing "vagrant up" in Chapter 3

Without getting vagrant to complete successfully, the book is not useful. Can anyone help with this error? Spending more time trying to figure out vagrant than learning Prometheus. :-(

Vagrant = Vagrant 2.2.17
VirtualBox = 6.1.24
Running on Windows 10

==> prometheus: Attempting graceful shutdown of VM...
==> prometheus: Booting VM...
==> prometheus: Waiting for machine to boot. This may take a few minutes...
==> prometheus: Machine booted and ready!
==> prometheus: Checking for guest additions in VM...
==> prometheus: Setting hostname...
==> prometheus: Configuring and enabling network interfaces...
==> prometheus: Mounting shared folders...
prometheus: /vagrant => C:/Users/bgcha/git_repos/Hands-On-Infrastructure-Monitoring-with-Prometheus
==> prometheus: Running provisioner: shell...
prometheus: Running: C:/Users/bgcha/AppData/Local/Temp/vagrant-shell20210721-12700-eb6oyd.sh
==> prometheus: Running provisioner: shell...
prometheus: Running: C:/Users/bgcha/AppData/Local/Temp/vagrant-shell20210721-12700-oukj9g.sh
prometheus: /vagrant/utils/helpers.sh: line 2: $'\r': command not found
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

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.