Soluții

How to install and configure Nagios Core

1.Prerequisites

Make sure your system is updated and install necessary packages:

bash
sudo apt update && sudo apt upgrade -y
sudo apt install -y apache2 php libapache2-mod-php build-essential libgd-dev unzip curl openssl libssl-dev daemon

Create a Nagios user and group:

bash
sudo useradd nagios
sudo groupadd nagcmd
sudo usermod -a -G nagcmd nagios

Install required dependencies:

bash
sudo apt install -y gcc make autoconf libc6 libmcrypt-dev libssl-dev bc gawk dc build-essential snmp libnet-snmp-perl gettext

2.  Install Nagios Core

Step 1: Download Nagios Core

bash
cd /tmp
curl -LO https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.5.1.tar.gz
tar -xvzf nagios-4.5.1.tar.gz
cd nagios-4.5.1

Step 2: Compile and Install Nagios

bash
./configure --with-command-group=nagcmd
make all
sudo make install-groups-users
sudo make install
sudo make install-daemoninit
sudo make install-commandmode
sudo make install-config
sudo make install-webconf

Step 3: Set up Web Interface

Set up Apache user password:

bash
sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Enable Apache modules and restart Apache:

bash
sudo a2enmod cgi rewrite
sudo systemctl restart apache2

3.  Install Nagios Plugins

Nagios uses plugins to monitor services.

bash
cd /tmp
curl -LO https://nagios-plugins.org/download/nagios-plugins-2.3.3.tar.gz
tar -zxvf nagios-plugins-2.3.3.tar.gz
cd nagios-plugins-2.3.3
./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
sudo make install

4. Install NRPE (for remote monitoring)

bash
sudo apt install -y nagios-nrpe-server nagios-plugins

Edit the NRPE config file on remote hosts (/etc/nagios/nrpe.cfg):

  • Add your Nagios server IP to allowed_hosts

  • Restart NRPE: sudo systemctl restart nagios-nrpe-server

On the Nagios server, install NRPE plugin:

bash
sudo apt install nagios-nrpe-plugin

5. Configure Nagios

Main configuration directory:
/usr/local/nagios/etc/

Verify default config:

bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Enable additional configs in nagios.cfg:

bash
cfg_dir=/usr/local/nagios/etc/servers

Create the directory:

bash
sudo mkdir /usr/local/nagios/etc/servers

6. Start Nagios and Access Web UI

Enable and start Nagios:

bash
sudo systemctl enable nagios
sudo systemctl start nagios

Access via browser:
http://<server_ip>/nagios/
Login with user: nagiosadmin and the password you set earlier.

7. Add Hosts and Services

 (/usr/local/nagios/etc/servers/webserver.cfg):

cfg
define host {
use linux-server
host_name webserver
alias Web Server
address 192.168.1.10
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name webserver
service_description HTTP
check_command check_http
}

Restart Nagios:

bash
sudo systemctl restart nagios

8. Optional Enhancements

  • Email alerts: Configure contacts.cfg with email details

  • SSL for web UI: Use Let’s Encrypt or self-signed certs

  • Mobile UI: Install mobile-friendly frontends like NagiosMobile or Nagios V-Shell

  • NagiosQL / Centreon: Use GUIs for easier management

  • Performance Graphing: Integrate with PNP4Nagios or NagiosGraph.

Check for errors:

bash
sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Log file:
/usr/local/nagios/var/nagios.log

Web Interface:
Monitor hosts/services and acknowledge problems.

[mai mult...]

How to use Instreamly sponsorships extension in OBS – 2025

Instreamly is a platform that connects streamers with brands for sponsorship opportunities. It allows you to display automated, non-intrusive sponsored content on your live streams, primarily through animated artworks that appear for a specified period. This helps streamers monetize their content and access brand collaborations they might not otherwise have.

[mai mult...]

Properly use and manage networks in Google Admin Center

To properly use and manage networks in Google Admin Center (Admin Console), follow these best practices and steps:

1. Setting Up and Managing Network Configurations

  • Sign in to the Admin Console with an administrator account

  • Navigate to Devices or the relevant section for managed devices

  • Select the organizational unit (OU) if you want to apply network settings to a specific group (like a department or team).

  • To add a network:

    • For Wi-Fi, Ethernet, or VPN: Click to create the desired network type (e.g., “Create Wi-Fi network” or “Create VPN network”).

    • Enter the required details such as network name, authentication method (e.g., WPA2-Enterprise for Wi-Fi, 802.1X for Ethernet), or VPN configuration (remote host, VPN type, credentials).

    • Specify which device platforms (ChromeOS, Android, iOS, etc.) can use this network.

    • Optionally, set the network to connect automatically for managed devices.

  • To edit or remove a network, select the existing configuration, make changes, and save, or click “Remove” to delete it from the OU.

2. Best Practices for Network Management

  • Use organizational units to apply different network policies to different groups.

  • For Wi-Fi and Ethernet, prefer secure authentication (such as 802.1X Enterprise) to protect network access.

  • For VPN, ensure only supported configurations are pushed, and use strong credentials and certificates1.

  • Regularly review and update network configurations as your organization’s needs change.

3. Advanced Network Design and Connectivity (Google Cloud)

If your organization uses Google Cloud networking (VPCs, hybrid networks, etc.), consider these best practices:

  • Choose the right VPC connection method for your needs (Network Connectivity Center, VPC Peering, Cloud VPN, etc.).

  • Use Cloud NAT for fixed outbound IPs and secure internet access for VMs without external IPs.

  • Use private DNS zones for internal service name resolution.

  • For Google API access, use Private Google Access or Private Service Connect to allow secure, internal API communication without public IPs.

  • When managing complex network topologies (multiple VPCs, hybrid cloud), use Network Connectivity Center and assign appropriate IAM roles (like Network Management Admin or Hub Admin) to control who can create, modify, and review network connections and routing.

4. Permissions and Roles

  • Assign Network Management Admin or Network Management Viewer roles as appropriate to control access to network management features and resources.

  • For VPC hub and spoke architectures, use the Hub Admin role to manage connectivity and routing between networks.

[mai mult...]