Posts

Parameters: Command Execution Via Zabbix

AllowKey=system.run[*]---> Allows system.run[] to execute commands via item -----> High risk if unrestricted commands are allowed AllowRoot=1 -----> Allows Zabbix to execute commands as root EnableRemoteCommands=1---->Allows Zabbix server to run commands on agent----->High risk if unauthorized commands are sent

Public key/ private key

How to make the ssh connection on remote server from Ansible server Step1: Generate key ssh-keygen -t rsa -b 4096 Step2: Go to the path cd /root/.ssh ls authorized_keys id_rsa id_rsa.pub known_hosts Where id_rsa ----> private key (Used to login on the remote server without password)       id_rsa.pub ---->public key Note: If someone gets access to this file (id_rsa), they can log in to any server where the matching public key is stored! Step3: Copy the public key cat id_rsa.pub Step4: Paste the public key on remote server vi ~/.ssh/authorized_keys or vi /root/.ssh/authorized_keys Step5: Now we can login on remote server From Private key: ssh -i ~/.ssh/id_rsa user@remote-server From Public key:  Note: In case of ansible ansible-playbook playbook.yml --private-key ~/.ssh/id_rsa Note: In file /etc/ssh/sshd_config, below parameter should be enable: PubkeyAuthentication yes   PermitRootLogin yes   AuthorizedKeysFile .ssh/authorized_keys  Passwor...

Zabbix installation: Distribution setup

  On Zabbix core server: Step1:   Install Zabbix repository rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-latest-6.0.el8.noarch.rpm dnf clean all Step2: Install Zabbix server, frontend, agent dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-selinux-policy zabbix-agent Step3:   Configure the database for Zabbix server Edit file /etc/zabbix/zabbix_server.conf DBHost= DBserver_ip DBName= DBUser= DBPassword= DBPort=3306 Step4:  Start Zabbix server and agent processes systemctl restart zabbix-server zabbix-agent httpd php-fpm systemctl enable zabbix-server zabbix-agent httpd php-fpm On Zabbix Database Server: Step1:   Install Zabbix repository rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-latest-6.0.el8.noarch.rpm dnf clean all Step2: Install the sql script, zabbix agent  dnf install zabbix-sql-scripts zabbix-selinux-policy zabbix-agent Step3: Install the mysql server yum install my...

What is process

The process  is an instance of a program that is being executed. Processes are managed by the operating system (OS). A process in a computer is a program that is currently running. Program vs. Process: A program is just a file with instructions (e.g., a game or an app you install). A process happens when you open or run that program, making it active.  How it's work? When you launch an application, the OS creates a process for it. The process has a unique Process ID (PID) , which is used to manage it. Processes can have child processes. For example: If you open a web browser (parent process) and open tabs, each tab might be a child process.   A process affects the CPU, memory, and other resources because it requires these components to perform its tasks. How processes interact with key system resources: 1. CPU (Central Processing Unit) What Happens: A process runs by sending instructions to the CPU for execution. The CPU divides its time among all active processes, ...

ILO (Integrated Lights-Out)

 ILO (Integrated Lights-Out) is a remote management technology for servers that allows control, monitoring, and troubleshooting of hardware independently of the operating system. Why ILO? 1. Server is Unresponsive or Crashed Without iLO : If the server crashes or becomes unresponsive (e.g., due to a kernel panic, hardware failure, or OS-level issue), you won’t be able to log in via traditional methods like SSH, Remote Desktop, or console access. With iLO : iLO operates independently of the server’s operating system. Even if the OS has crashed or is hung, iLO allows you to interact with the server, reboot it, or troubleshoot the problem from a hardware perspective. 2. Remote Power Control Without iLO : If the server needs to be restarted (e.g., during a crash or firmware update), you would need physical access to the machine to press the power button or connect to a local KVM switch. With iLO : iLO allows you to power on, power off, or reboot the server remotely. This can be done ev...

How to enable the syslog monitoring-Zabbix

Steps need to be performed:  On the Syslog server side:  1. Install the rsyslog sudo yum install rsyslog 2.  Enable rsyslog service: Start and enable the rsyslog service if it’s not already running: sudo systemctl start rsyslog sudo systemctl enable rsyslog 3.  Configure rsyslog to accept remote logs: Open the rsyslog configuration file: vi /etc/rsyslog.conf Uncomment or add the following lines to enable UDP or TCP log reception: # Provides UDP syslog reception module(load="imudp") input(type="imudp" port="514") # Provides TCP syslog reception module(load="imtcp") input(type="imtcp" port="514") 4.  Restart the rsyslog service: After saving the configuration file, restart rsyslog to apply the changes: sudo systemctl restart rsyslog 5. Ensure the firewall is configured to allow the TCP/UDP port 514 or disable the firewall service. 6. Ensure that SELinux is disable if not disable it Check the status of SELinux sestatus Disa...

CRONTAB

Crontab (short for "cron table") is a configuration file in Unix-like operating systems that specifies shell commands to run periodically on a given schedule.  The commands are executed by the cron daemon, a system process that runs in the background. Crontab allows users to automate repetitive tasks such as backups, updates, and scheduled maintenance. Components of Crontab Each line in the crontab file consists of two parts: Timing information : Specifies when the command should run. Command : The shell command to execute. The timing information is divided into five fields: Minute (0-59) Hour (0-23) Day of the month (1-31) Month (1-12) Day of the week (0-7, where both 0 and 7 represent Sunday) Note : The fields can be filled with numbers, ranges, lists, or special characters like * , which means "every" value for that field. Crontab Format: * * * * * command_to_run | | | | |  | | | | +---- Day of the week (0-7) | | | +------ Month (1-12) | | +-------- Day of ...