Posts

Showing posts from September, 2024

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

What is API

  What is an API Call? An **API call** involves sending a request to an API (Application Programming Interface) and receiving a response. This is done to interact with a server or service programmatically. API calls are commonly used for: Components of an API Call 1. **Endpoint**:  The specific URL or URI where the API request is sent. It defines the resource you want to access or manipulate. 2. **HTTP Method**(Type of HTTP request):  The type of operation you want to perform. Common methods include: - **GET**: Retrieve data from server. - **POST**: Send new data or create a resource to server. - **PUT/PATCH**: Update existing data. - **DELETE**: Remove data. 3. **Headers**:  Metadata sent with the request, such as content type or authentication tokens. 4. **Body**:  Data sent with the request (usually with POST or PUT requests), typically in JSON format. 5. **Response** : The data or result returned by the server after processing the request. Note:  In Con...

CURL

  curl is a command-line tool for making HTTP requests to web servers.