Posts

Showing posts with the label monitoring

NRPE Agent Configuration on Client Nodes (Linux Machine)

Image
NRPE Agent Configuration: Steps to be followed on client Node are mentioned below: Step 1. Pre-requisite software:                yum install -y gcc glibc glibc-common openssl openssl-devel perl wget                cd /tmp                wget  --no-check-certificate -O nrpe.tar.gz                   https://github.com/NagiosEnterprises/nrpe/archive/nrpe-3.2.1.tar.gz Step 2. nrpe agent installation on the client node                tar xzf nrpe.tar.gz                cd /tmp/nrpe-nrpe-3.2.1/                ./configure --enable-command-args                                       #Configure NRPE Agent                make all                                                                            #Compalie NRPE Agent                make install-groups-users                                                 # Install NRPR Agent                make install                make install-config Step 3. Service file configuration                 echo >> /etc/servi

Nagios Server Configuration (Monitoring Tool)

Image
Installation of Nagios Server on Linux Machine: Step 1. Pre-requisite software:             sudo su             yum install httpd php -y                   yum install gcc glibc glibc-common -y             yum install gd gd-devel -y Step 2. Create user to run Nagios             adduser -m nagios             passwd nagios Step 3. Create group and add users into group             groupadd nagioscmd             usermod -a -G nagioscmd nagios             usermod -a -G nagioscmd apache Step 4. Download Nagios core and plugins on created directory             mkdir ~/downloads             cd ~/downloads             wget  http://prdownloads.sourceforge.net/sourceforge/nagios/nagios-4.4.6.tar.gz             wget  http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz Step 5. compile and installation             tar zxvf nagios-4.0.8.tar.gz             cd nagios-4.0.8 Run configuration script in group              ./configure --with-command-group=nagioscmd Compile source code          

Grafana Monitoring Tool Configuration ( AWS EC2)

Image
Grafana Server Setup: Step 1:  Update the yum package repositories. sudo yum update -y Step:2 . Add Grafana repository sudo vi /etc/yum.repos.d/grafana.repo   add below lines into grafana.repo file:   [grafana] name=grafana baseurl=https://packages.grafana.com/oss/rpm repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://packages.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt Step:3. Install grafana: sudo yum install grafana -y Step:4. Reload and start the service: sudo systemctl daemon-reload sudo systemctl start grafana-server sudo systemctl status grafana-server Step:5. Now open your browser and enter the server IP address and port 3000 http://ec2ip:3000 Default logins are: Username: admin Password: admin Note:- we need to change the password immediately after authenticating. Grafana Server Configuration Grafana Alert Configuration --- Thanks & Regards, Kanchan Soni  ( https://linktr.ee/kanchansoni ) (A girl who saw the dream with an open ey

Prometheus Push Gateway (AWS EC2)

Image
Setup Push gateway Binary: Step 1: Download the latest Push Gateway package.  wget https://github.com/prometheus/pushgateway/releases/download/v1.4.2/pushgateway-1.4.2.linux-amd64.tar.gz tar -xvf pushgateway-1.4.2.linux-amd64.tar.gz Copy Push Gateway file into binary and change the ownership  sudo cp pushgateway-1.4.2.linux-amd64/pushgateway /usr/local/bin/ sudo useradd -rs /bin/false pushgateway sudo chown pushgateway:pushgateway /usr/local/bin/pushgateway Step 2: Create a service file and add below mentioned code into it. sudo vi /etc/systemd/system/pushgateway.service [Unit] Description=Prometheus Pushgateway Wants=network-online.target After=network-online.target [Service] User=pushgateway Group=pushgateway Type=simple ExecStart=/usr/local/bin/pushgateway [Install] WantedBy=multi-user.target Step 3: Enable the process. sudo systemctl enable pushgateway sudo systemctl start pushgateway sudo systemctl status pushgateway To verify and read the matrics :-   http://localhost:9091/metr

Alert Manager for Prometheus (AWS EC2)

Image
Configure Alert Manager: Step1: Download the latest Alert manager package. wget https://github.com/prometheus/alertmanager/releases/download/v0.16.2/alertmanager-0.16.2.linux-amd64.tar.gz unpack it:  tar -xvzf alertmanager-0.16.2.linux-amd64.tar.gz Move binary to /usr/local/bin/ folder  sudo su mv alertmanager-0.16.2.linux-amd64/alertmanager /usr/local/bin/ Step 2:  Create an Alert manager user to run the Alert manager service. sudo vi /etc/systemd/system/alertmanager.service [Unit] Description=AlertManager Server Service Wants=network-online.target After=network-online.target [Service] User=root Group=root Type=Simple ExecStart=/usr/local/bin/alertmanager \     --config.file /etc/alertmanager/alertmanager.yml [Install] WantedBy=multi-user.target Step 3: Log in to the Prometheus server and open the prometheus.yml file. vi /etc/prometheus/prometheus.yml configure alertmanager and rules file . # Alertmanager configuration alerting:   alertmanagers:   - static_configs:     - targets:    

Prometheus Node Exporter on AWS EC2

Image
Setup Node Exporter Binary: Step 1: Download the latest node exporter package. You should check the Prometheus downloads section for the latest version and update this command to get that package. cd /tmp wget  https://github.com/prometheus/node_exporter/releases/download/v1.4.0-rc.0/node_exporter-1.4.0-rc.0.linux-amd64.tar.gz Step 2: Unpack the tarball tar -xvf node_exporter-0.18.1.linux-amd64.tar.gz Step 3: Move the node export binary to /usr/local/bin sudo mv node_exporter-0.18.1.linux-amd64/node_exporter /usr/local/bin/ Create a Custom Node Exporter Service: Step 1: Create a node_exporter user to run the node exporter service. sudo useradd -rs /bin/false node_exporter   Step 2: Create a node_exporter service file under systemd.   sudo vi /etc/systemd/system/node_exporter.service Step 3: Add the following service file content to the service file and save it. [Unit] Description=Node Exporter After=network.target [Service] User=node_exporter Grou

Prometheus Server Configuration on AWS EC2 Machine

Image
Prometheus Server Setup: Step 1: Update the yum package repositories. sudo yum update -y Step 2: Create a Prometheus user, and required directories, and make the Prometheus user as the owner of those directories. sudo useradd --no-create-home --shell /bin/false prometheus sudo mkdir /etc/prometheus sudo mkdir /var/lib/prometheus sudo chown prometheus:prometheus /etc/prometheus sudo chown prometheus:prometheus /var/lib/prometheus Step 3: Go to the official Prometheus downloads page ( https://prometheus.io/ )and get the download link for the Linux binary. https://github.com/prometheus/prometheus/releases/download/v2.36.1/prometheus-2.36.1.linux-amd64.tar.gz Step 4: Download the source using wget, unzip the package then rename the extracted folder to prometheus-files. wget https://github.com/prometheus/prometheus/releases/download/v2.36.1/prometheus-2.36.1.linux-amd64.tar.gz tar -xvf tar_pkg_name mv prometheus-2.17.3.linux-amd64 prometheus-files Step 5: Copy Prometheus and promtool binar

TOP MOST MONITORING TOOLS (OPEN SOURCE MONITORING TOOLS)

Image
Hey folks, On the topic of monitoring, we have been discussing it for quite some time. I believe this is a good time to move on to some overviews of tools and applications. But before I get to the topic, I would suggest reading my old blogs on monitoring so you can keep up with me on the topic. Link:   ALL ABOUT MONITORING (A COMPLETE GUIDE TO MONITORING) Now, we all know what monitoring is and its importance, so in the market, there are numerous types of open-source monitoring tools are available, and we will discuss some of these here: Monitoring Tools 1. Prometheus:  Prometheus is an open-source monitoring and alerting toolkit. It records real-time metrics in a time series database (allowing for high dimensionality) built using an HTTP pull model , with flexible queries and real-time alerting .  Uses a multi-dimensional data model with time series data identified by metrics name and key/value pairs. Prometheus Prometheus Server Configuration 2. Grafana   Grafana

All About Open-Source Monitoring Tools

Image
Hey Folks,  As per the topic, you all would have understood what we are going to discuss today, since a long time, you have been listening to the word called  Monitoring,  from so many places. I am assuming you all are having basic knowledge of Planning, Monitoring, and Evaluation and how they work. If still, some of you may not have an idea about all these terms. No worries, friends before jumping to the topic I would suggest you all first check the mentioned blog to cover some basic fundamentals:  ALL ABOUT MONITORING (A COMPLETE GUIDE TO MONITORING) So, let’s back to today's topics of Monitoring…!!! as of now, we all know about monitoring and its importance but now it's the time to level up you all into the next steps towards a high-level understanding of monitoring.  As we all have so many questions in our minds like: How do we do the monitoring?  How can we monitor a server?  How do big companies monitor their system?  Do they have any t