Soluții

Intrerupere playback fisiere cu Repeat All pe Android TV media player – mediu de stocare extern

Daca se doreste redarea in regim de loop infinit a unor fisiere media (audio/video) arbitrare de pe un mediu de stocare extern pe un monitor/TV conectat la un device cu sistemul de operare Android TV, cel mai probabil se va observa ca aceasta facilitate functioneaza doar temporar (de ordinul orelor). Pentru perioade indelungate sunt necesare cateva setari specifice sau utilizarea unor aplicatii terte.

[mai mult...]

Use Apple watch backtrack to retrace your steps

On Apple Watch Ultra, Apple Watch SE, and Apple Watch Series 6 and later models running watchOS 9 and newer, you can use the Compass app’s Backtrack feature to track your route and then help you retrace your steps in case you get lost.

Backtrack uses the GPS on your Apple Watch to create a virtual breadcrumb trail of your route so you don’t have to worry about keeping track of where you’re going. According to Apple, Backtrack is designed to be used in remote settings, away from familiar places like your home or workplace, and outside densely populated areas without Wi-Fi, but there’s nothing stopping you from using it anywhere you need it.

[mai mult...]

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...]