Zabbix Server & Agent Configuration in Linux | Configure Zabbix Monitoring in RHEL 7 | Nehra Classes

Поделиться
HTML-код
  • Опубликовано: 3 окт 2024
  • Install & Configure Zabbix Server as well as agent in RHEL 7:
    ================================================
    Configure Zabbix Server: (192.168.1.114)
    Step 1 - Disable Or Permissive SELinux
    setenforce 0
    Step 2 - Install and Configure Apache
    yum -y install httpd
    Start & Enable the httpd service.
    systemctl start httpd.service
    systemctl enable httpd.service
    systemctl status httpd.service
    Step 3 - Configure Needed Repositories, Install epel and remi repos.
    wget dl.fedoraproje...
    yum -y install epel-release-latest-7.noarch.rpm
    yum install rpms.remirepo.n...
    Disable PHP 5 repositories and enable PHP 7.2 repo.
    yum-config-manager --disable remi-php54
    yum-config-manager --enable remi-php72
    Step 4 - Install PHP
    yum install php php-pear php-cgi php-common php-mbstring php-snmp php-gd php-pecl-mysql php-xml php-mysql php-gettext php-bcmath
    Modify the PHP time Zone by editing the php.ini file.
    vim /etc/php.ini
    Uncomment the following line and add your time zone.
    date.timezone = Asia/Kolkata
    max_execution_time = 600
    max_input_time = 600
    memory_limit =256M
    post_max_size = 32M
    upload_max_filesize = 16M
    Step 5 - Install MariaDB
    yum --enablerepo=remi install mariadb-server
    Start the MariaDB service.
    systemctl start mariadb.service
    Enable MariaDB on system boot.
    systemctl enable mariadb
    Run the following command to secure MariaDB.
    mysql_secure_installation
    Add a new root password and continue. Then it will ask a few questions. Type “Y” to agree to that.
    Login to DB server and verify.
    mysql -u root -p
    Step 6 - Create a Database for Zabbix
    create database zabbix_db character set utf8 collate utf8_bin;
    Create a DB user and grant privileges.
    create user 'zabbix'@'localhost' identified BY 'redhat';
    grant all privileges on zabbix_db.* to zabbix@localhost ;
    Flush privileges.
    flush privileges;
    Step 7 - Install Zabbix and needed dependencies
    Adding Zabbix repository.
    rpm -ivh repo.zabbix.co...
    Install Zabbix.
    yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get
    Step 8 - Configure Zabbix
    Change Time Zone by editing the Zabbix Apache configuration file.
    vim /etc/httpd/conf.d/zabbix.conf
    Uncomment the following line and add your Time Zone.
    php_value date.timezone Asia/Kolkata
    Restart HTTPD service.
    systemctl restart httpd.service
    Generally, Zabbix installation package gives SQL file which includes an initial schema and data for the Zabbix server with MySQL.
    Change directory and go the Zabbix directory.
    cd /usr/share/doc/zabbix-server-mysql-4.0.4/
    Import the MySQL dump file.
    zcat create.sql.gz | mysql -u zabbix -p zabbix_db
    Now modify the Zabbix configuration file with Database details.
    vim /etc/zabbix/zabbix_server.conf
    Modify the following parameters
    DBHost=localhost
    DBName=zabbix_db
    DBUser=zabbix
    DBPassword=redhat
    Then save and exit the file. Restart Zabbix service.
    systemctl restart zabbix-server.service
    Enable Zabbix on system boot.
    systemctl enable zabbix-server.service
    Modify firewall rules.
    firewall-cmd --add-service={http,https} --permanent
    firewall-cmd --add-port={10051/tcp,10050/tcp} --permanent
    firewall-cmd --reload
    Now restart httpd service.
    systemctl restart httpd
    Step 9 - Setup Zabbix
    You can access Zabbix using following URL:
    192.168.1.114/zabbix/
    Step 10 - Monitor Servers with Zabbix Agent
    Zabbix Agent collects the data from the client machine and sends them to the Zabbix Server.
    -----------------------------
    Agent Configuration:
    yum install zabbix-agent
    Now modify the agent configuration file.
    vim /etc/zabbix/zabbix_agentd.conf
    Modify the following parameters. Replace IP and hostname with yours in the below command:
    Server=192.168.1.114
    ServerActive=192.168.1.114
    Hostname=Zabbix-Agent
    Save and exit the file.
    Restart Zabbix agent.
    systemctl restart zabbix-agent
    Enable on system boot.
    systemctl enable zabbix-agent
    Step 11 - Add host to monitor on Zabbix server
    Go to Configuration -) Hosts -) Create host.
    Then you will get the interface as follows:
    Add Hostname, Visible Name and agent interface IP. Select a group from the list. In our scenario, we are going to monitor the Ubuntu server. So we will select Linux servers from the list.
    Select and go to Template Tab. Then click on the select button and select “Template OS Linux” from the list.
    Click “add,” and it will list linked templates.
    Click on the update button to update.
    Step 12 - View Graphs
    Go to Monitoring -) Graphs. You can select needed group, host and graph to display the graphs.
    Congratulations! You have successfully configured Zabbix server and added hosts to monitor. Let us know your feedback in the comments below.
    Configure Yum in RHEL 7:
    • Configure Local Yum Re...
    =======
    ©COPYRIGHT. ALL RIGHTS RESERVED.
    #NehraClasses #LinuxTraining

Комментарии • 40

  • @jaykumar-lz1mj
    @jaykumar-lz1mj 4 года назад +1

    mind blowing sir

  • @sajalnigam8916
    @sajalnigam8916 Год назад +1

    Hey , Im getting this error on executing yum-config-manager --disable remi-php54
    Updating Subscription Management repositories.
    Unable to read consumer identity
    This system is not registered with an entitlement server. You can use subscription-manager to register.

    • @NehraClasses
      @NehraClasses  Год назад

      please contact us in our telegram group.

  • @seekhoaursikhao4046
    @seekhoaursikhao4046 Год назад +1

    Hello Brother..God Bless Us. 1.I am stuck in one step from long time. How to export the Zabbix Dashboard in PDF, Word,Excel,CSV files. Can you create a video step by step , with a very easy steps like a spoon feeding kid. It will be really helpful for us. No one is explained clearly on Zabbix 6.2 and 6.4 using Cent OS 9 Stream ...Waiting for your reply
    2.Also share a very easy step video for How to take backup and restore, And How to upgrade easily from Zabbix GUI console, without any interruption.. For example Sophos Central Antivirus web console, and all is done by GUI mode , we need not to check through CLI mode or process CentOS commands.
    3.We want as a ISO image for Zabbix server just like Windows 11 ISO Image user friendly for our on promise environment with 100% opensource. We can install that in Server Hardware's or Client Hardware's (laptops) and get all the features, patches updates in a finger tips. Can you share like that. If you are not the right person , please pass this message to the right person please, a hamble request.

  • @skyhawk0
    @skyhawk0 2 года назад +1

    setenforce mode change when i reboot the system and zabbix server offine everytime when was reboot my system

    • @NehraClasses
      @NehraClasses  2 года назад

      Change it in selinux config file

    • @skyhawk0
      @skyhawk0 2 года назад

      @@NehraClasses thanks sir one more Qns in Samba Server how we can permission to user can save data but cannt del it thanks

  • @pankajsharma-ic3jr
    @pankajsharma-ic3jr Год назад

    Sir how to install and configure zabbix in cent OS 7.Please make the video

  • @humzamuddasar
    @humzamuddasar Год назад +1

    Thank you So much. Can please also do a video on Splunk if possible?

  • @asad9110
    @asad9110 2 года назад +1

    hello dear sir how to add cisco router or switch or ASA firewall to Zabbix server ? thanks

  • @Shashwath730
    @Shashwath730 2 года назад +1

    Please share a Zabbix tool in Linux platform.

  • @ankitnegi163
    @ankitnegi163 2 года назад +1

    Thank you sir... It was interesting I have configured mine.

  • @shambhunathsahani6505
    @shambhunathsahani6505 Год назад +1

    Please make tutorial on dynatrace

  • @deepakmishra1819
    @deepakmishra1819 Месяц назад +1

    Sir can i confirm odbc in zabbix for monitaring

    • @NehraClasses
      @NehraClasses  Месяц назад

      Yes, you can configure ODBC (Open Database Connectivity) in Zabbix for monitoring databases. Zabbix supports ODBC for monitoring databases such as MySQL, PostgreSQL, Oracle, and others.
      Here’s a basic outline of how to set up ODBC monitoring in Zabbix:
      1. Install ODBC Driver and Zabbix Agent
      First, install the necessary ODBC drivers for your database.
      Install the unixODBC package on your Zabbix server or proxy:
      sudo yum install unixODBC unixODBC-devel
      2. Configure ODBC Connection
      Edit the ODBC configuration files (/etc/odbcinst.ini and /etc/odbc.ini) to define the database drivers and data sources.
      Example for /etc/odbcinst.ini:
      [MySQL]
      Description = ODBC for MySQL
      Driver = /usr/lib64/libmyodbc5.so
      Setup = /usr/lib64/libodbcmyS.so
      FileUsage = 1
      Example for /etc/odbc.ini:
      [MySQL-DSN]
      Description = MySQL Database
      Driver = MySQL
      Server = localhost
      Database = zabbix
      User = zabbix
      Password = password
      Port = 3306
      3. Test ODBC Connection
      Test the ODBC connection to ensure it’s working correctly:
      isql -v MySQL-DSN
      4. Configure Zabbix
      In the Zabbix frontend, go to Configuration > Hosts, and select the host where you want to monitor the database.
      Create a new item with the key db.odbc.select[].
      Specify the query and DSN in the item key, for example:
      db.odbc.select[MySQL-DSN,"SELECT COUNT(*) FROM my_table"]
      Set the appropriate update interval and type of information (e.g., Numeric).
      5. Monitor and Visualize
      After setting up the item, Zabbix will start collecting data based on your query.
      You can create triggers and graphs to monitor database performance.

  • @munnasarkar6262
    @munnasarkar6262 2 года назад +1

    Hi Sir,
    why php is not getting installed in my machine if each configuration is installed and configured.

    • @NehraClasses
      @NehraClasses  2 года назад

      please provide us error screenshots.

  • @TechNetworking
    @TechNetworking 2 года назад +1

    When ever I add more 35+ device then it's showing me error ""zabbix Server not running ""after deleting devices it's work very well

    • @NehraClasses
      @NehraClasses  2 года назад

      please share system logs in telegram

  • @priyamore295
    @priyamore295 3 года назад +1

    Hi Can we Install Zabbix on RHEL 5.* ?

    • @NehraClasses
      @NehraClasses  3 года назад

      RHEL 5 is out of date and have no support from Redhat

  • @TheGdhungana
    @TheGdhungana 4 года назад +1

    Bro..Zabbix is a huge topic..What about diving deep into it to prepare a good series on this? At least make 8 to 10 videos on Zabbix. I have been following you and I can suggest topics for you which will grow your subscribers:
    -Nagios/Cacti/Zabbix
    -HA solutions like Pacemaker, Corosync, HAProxy,etc
    -Cluster Solutions like (DRBD, GlusterFS, CEPH, etc)
    -WebServer Solution (Apache, Nginx, Wordpress,etc)
    -Database Cluster Solutions like Galera, Percona, etc
    These topics will gain a lot of subscribers man!

    • @NehraClasses
      @NehraClasses  4 года назад +2

      Thanks for your valuable suggestions, will try to upload more videos on these topics.
      Zabbix Server & Agent configuration tutorial was requested by one of our subscribers, so on his special demand we have uploaded this video.

  • @rasidakhtar2628
    @rasidakhtar2628 3 года назад +1

    Hi Sir, I am getting bellow error while configure in web browser.
    The frontend does not match Zabbix database.

    • @NehraClasses
      @NehraClasses  3 года назад +1

      Please provide us all the details in our telegram channel so that we can look into it

    • @rasidakhtar2628
      @rasidakhtar2628 3 года назад +1

      @@NehraClasses can you please share me your telegram channel details ?

    • @NehraClasses
      @NehraClasses  3 года назад

      Either u can click this link to join our telegram channel or search for nehra classes in telegram.
      t.me/NehraClasses

  • @PRAVINGOUD
    @PRAVINGOUD 4 года назад +1

    Sir If possible can you please make a video on clustering RHEL or SUSE Linux? *Cluster and resource adding*

    • @NehraClasses
      @NehraClasses  4 года назад +2

      Sure, please give me some time. I will try to upload it next week.

    • @PRAVINGOUD
      @PRAVINGOUD 4 года назад +1

      @@NehraClasses tysm sir :)

    • @ALOKSHARMA-el8zx
      @ALOKSHARMA-el8zx 3 года назад +2

      @@NehraClasses yes sir please make a video on clustering

    • @NehraClasses
      @NehraClasses  3 года назад

      Cluster video already uploaded on the demand of Mr. Pravin Goud. Click below link to watch the video.
      ruclips.net/video/ayPLYjGZ19Y/видео.html

  • @PRAVINGOUD
    @PRAVINGOUD 4 года назад +1

    Nice tutorial sir 😊 👌

  • @ऊँश्रींब्रह्मशंकराचार्य

    जय नाराय