Posts

Showing posts from August, 2024

OSI Model

 What is OSI Model? The OSI (open system interconnection) model, created in 1984 by ISO, is a reference framework that explains the process of transmitting data between computers. Layers of OSI Model OSI model has seven layers, which are as follows: 1. The Physical Layer 2. The Data Link Layer 3. The Network Layer 4. The Transport Layer 5. The Session Layer 6. The Presentation Layer 7. The Application Layer 1.  Application Layer – Layer 1 (considering we are on sender side ) · User work on app layer. · App layer provide the interface to user like Gmail. · At the very top of the OSI Reference Model stack of layers, we find the Application layer, which is implemented by the network applications. These applications produce the data, which has to be transferred over the network. This layer also serves as a window for the application services to access the network and for displaying the received information to the user. Example: Application – Browsers, Skype Messenger, Gmail, outl...

MY SQL DATABASE

Image
My SQL Database It is an organized collection of data so that it can be easily accessed. To mannage these database, DBMS are used. Type of DBMS Relational DBMS Non-Relational DBMS Relational DBMS: In this, data will be stored in table format. Example: MYSQL, Oracle Non-Relational DBMS: In this, data will be stored in key-value pair. like: { “RollNo”:1, “Name”: “abc”, “Class”: 2 } Example : MongoDB, Redis SQL:  It stand for structure query language. It is used for update, delete, insert the datain table. Data Type in MYSQL: 1. Numeric Data Types INT: Integer type, ranges from -2147483648 to 2147483647. FLOAT : Floating-point number, with optional precision. DOUBLE: Double-precision floating-point number. DECIMAL: Fixed-point number with defined precision and scale. TINYINT: Small integer, ranges from -128 to 127. SMALLINT: Smaller integer, ranges from -32768 to 32767. MEDIUMINT: Medium-sized integer, ranges from -8388608 to 8388607 2.String Data Types CHAR: Fixed-length cha...

File System

 FileSystem A filesystem is a method used by operating systems to organize and store data on storage devices such as hard drives, solid-state drives (SSDs), USB drives, and other storage media. It provides a structured way to store, retrieve, and manage files and directories within a storage device. Key characteristics and functionalities of a filesystem include: Hierarchical Structure: Filesystems organize data in a hierarchical structure consisting of directories (also known as folders) and files. Directories can contain other directories (subdirectories) and files, forming a tree-like structure. File Naming: Each file within a filesystem is identified by a unique name, which allows users and applications to access and manipulate individual files. File Attributes: Filesystems typically store additional information, known as metadata, about each file, including attributes such as file size, creation date, modification date, and permissions. Data Storage: Filesystems manage the a...

Zabbix Tool: Basics

  What is Zabbix Macro? In Zabbix, a macro is a placeholder (symbol/word used as a temperory substitute for another element) that represent a value. Imagine you are setting up a system to monitor your computers. Instead of writing down the name of each computer every time you can use macros. So, instead of saying “monitor computer A”, you can say “Monitor{HOST.NAME}”. When zabbix sees ‘{HOST.NAME}’, it knows to replace it with the actual name of the computer being monitored. In one of typical uses, a macro may be used in a template. Thus a trigger on a template may be named "Processor load is too high on {HOST.NAME}". When the template is applied to the host, such as Zabbix server, the name will resolve to "Processor load is too high on Zabbix server" when the trigger is displayed in the Monitoring section. Macros may be used in item key parameters. A macro may be used for only a part of the parameter, for example item.key[server_{HOST.HOST}_local]. Double-quoting t...

Script via Zabbix frontend

To run any script via Zabbix frontend on a remote server: (a) Uncomment the  AllowKey=system.run[*] in Zabbix agent configuration file on Remote host. (b) Add the rules for zabbix user in sudoers file        visudo       zabbix ALL=(ALL) NOPASSWD: ALL (c) If the script (myscript.sh) is running on /usr/local/bin, make sure the script is executable and the script is owned by the Zabbix user.  chmod +x /path/to/myscript.sh chown zabbix:zabbix /usr/local/bin/myscript.sh Note: The Zabbix agent runs under a specific user account, typically zabbix . Ensure that the script file is owned by this user or has appropriate permissions for the zabbix user to access and execute it. Significance of AllowKey and sudoersfile configuration in Zabbix_agent: 1. AllowKey=system.run[*] in Zabbix Agent Configuration The AllowKey directive in the Zabbix agent configuration file ( zabbix_agentd.conf ) specifies which system.run commands are permitted to be execut...

What is Sudo file

 The sudo file, often referred to as the sudoers file , is a configuration file used by the sudo command to control who can run what commands as other users, including the root user. It defines the permissions and rules for granting or restricting the use of sudo to execute commands with elevated privileges. Here's a brief overview of the sudoers file and how to edit it safely: 1. Location of the sudoers File The sudoers file is usually located at: /etc/sudoers 2. Editing the sudoers File Editing the sudoers file should be done with care to avoid syntax errors that could lead to loss of sudo access. The recommended way to edit this file is using the visudo command, which performs syntax checks before saving changes: Open the terminal and run: sudo visudo This command opens the sudoers file in the default text editor (often vi or vim ). 3. Basic Syntax of the sudoers File The sudoers file contains rules that specify which users can execute which commands with sudo . The...