Showing posts with label Monitoring. Show all posts
Showing posts with label Monitoring. Show all posts

Monday, November 23, 2020

How to Install and Configure Munin Monitoring with Nginx and CGI on CentOS 8

Setting up Munin on CentOS 8 via EPEL 8 provides turnkey server performance graphs. This guide walks through configuring systemd timer units, fastcgi spawners for dynamic graph generation, and integrating the dashboard into an Nginx virtual host.

Packages: munin • munin-node • munin-cgi • spawn-fcgi

1. Installing Packages from EPEL 8

dnf install epel-release -y
dnf install munin munin-cgi munin-node spawn-fcgi nginx -y

2. Enabling Node and Systemd Services

systemctl enable --now munin-node
systemctl enable --now munin-cgi-graph.socket
systemctl enable --now munin-cgi-html.socket

3. Nginx Server Block (/etc/nginx/conf.d/munin.conf)

server {
    listen 80;
    server_name munin.example.com;

    location / {
        root /var/www/html/munin;
        index index.html;
    }

    location ^~ /munin-cgi/munin-cgi-graph/ {
        fastcgi_split_path_info ^(/munin-cgi/munin-cgi-graph)(.*);
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass unix:/run/munin/fcgi-graph.sock;
        include fastcgi_params;
    }
}

Thursday, January 17, 2019

How to Install and Configure the Xymon Monitoring Client on CentOS 7 and Debian 9

The Xymon infrastructure monitoring system (formerly Hobbit / Big Brother) provides lightweight, low-overhead system health tracking for servers. While Debian repositories package xymon-client directly via APT, Enterprise Linux distributions like CentOS 7 require building from source.

Supported Platforms: CentOS 7 (Source compilation) • Debian 9 (APT package)

1. Compiling on CentOS 7

# 1. Create dedicated system user
groupadd xymon
useradd -g xymon -m xymon

# 2. Install build dependencies
yum install gcc make fping pcre-devel openssl-devel openldap-devel rrdtool-devel libtirpc-devel -y

# 3. Download and compile client
cd /usr/src
wget https://sourceforge.net/projects/xymon/files/Xymon/4.3.30/xymon-4.3.30.tar.gz
tar -zxf xymon-4.3.30.tar.gz
cd xymon-4.3.30
./configure --client

make && make install

# 4. Install system service script
cp rpm/xymon-client.init /etc/init.d/xymon-client
cp rpm/xymon-client.default /etc/default/xymon-client
chmod +x /etc/init.d/xymon-client

# Configure server IP in /etc/default/xymon-client:
# XYMONSERVERS="YOUR.XYMON.SERVER.IP"

service xymon-client start
chkconfig xymon-client on

2. Installation on Debian 9 / Ubuntu

sudo apt-get update
sudo apt-get install xymon-client -y

Tuesday, July 31, 2012

How to Install and Configure Munin 2.0 with Nginx and FastCGI on CentOS 6

Munin 2.0 introduced dynamic CGI graph and HTML generation, allowing monitoring dashboards to scale efficiently without requiring static graph regeneration during every 5-minute cron cycle. Here is how to compile Munin 2.0 from source and integrate it with Nginx using spawn-fcgi on CentOS 6.

Stack: Munin 2.0.x • Nginx • FastCGI (spawn-fcgi) • CentOS 6 / RHEL 6

1. Installing Build Dependencies

Install Perl module prerequisites and development tools:

yum groupinstall 'Development Tools' -y
yum install perl-CGI perl-FCGI perl-File-Copy-Recursive perl-Module-Build perl-Cache-Cache git spawn-fcgi -y
groupadd munin
useradd munin -g munin -s /sbin/nologin -d /var/www/html/munin

2. Compiling Munin 2.0 from Source

cd /usr/src
git clone git://github.com/munin-monitoring/munin.git
cd munin
git checkout tags/2.0.0
make
make install

3. Spawning FastCGI Processes for Graph and HTML Generation

Munin 2.0 relies on two FastCGI workers: one for HTML page rendering and one for real-time RRD graph generation.

spawn-fcgi -s /var/run/munin/fcgi-graph.sock -u munin -g munin -- /var/www/html/munin/cgi/munin-cgi-graph
spawn-fcgi -s /var/run/munin/fcgi-html.sock -u munin -g munin -- /var/www/html/munin/cgi/munin-cgi-html

4. Nginx Server Configuration

Configure Nginx to proxy requests to the Munin FastCGI sockets:

location ^~ /cgi-bin/munin-cgi-graph/ {
    access_log off;
    fastcgi_split_path_info ^(/cgi-bin/munin-cgi-graph)(.*);
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass unix:/var/run/munin/fcgi-graph.sock;
    include fastcgi_params;
}

location /munin/static/ {
    alias /etc/munin/static/;
}

location /munin/ {
    fastcgi_split_path_info ^(/munin)(.*);
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass unix:/var/run/munin/fcgi-html.sock;
    include fastcgi_params;
}

5. Testing

Execute the Munin cron job under the munin system user to build the initial state:

sudo -u munin munin-cron

How Google Antigravity Solved the Mysterious NVIDIA Sleep Reboot on My Dell Inspiron 7567 (Ubuntu Linux)

If you run modern Ubuntu or Linux on a Dell Inspiron 15 Gaming (7567) or a similar 7th-gen Intel laptop paired with an NVIDIA GeForce GTX ...