Showing posts with label zabbix. Show all posts
Showing posts with label zabbix. Show all posts

Thursday, November 12, 2020

Add MySQL machine on Zabbix Monitoring

Description: Here I have explained, How add MySQL Service on Zabbix 

Procedure: 

  • Download MySQL template in Zabbix from below URL and Import it on Zabbix
           https://www.zabbix.com/integrations/mysql

  • Once you import template, link MySQL template with host from Configuration tab 


  • Install Zabbix-client and MySQL client on Host machine 
  • Download MySQL template file from below URL and paste it to /etc/zabbix/zabbix_agentd.d/ 
https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mysql_agent/template_db_mysql.conf
  • Create MySQL user for monitoring using below command
  CREATE USER 'zbx_monitor'@'%' IDENTIFIED BY '<password>';
  GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO 'zbx_monitor'@'%';
  • Create .my.cnf under /var/lib/zabbix/  and define username  password as follow
    [client]
    user=zbx_monitor
    password=<password>
  • Once file created restart zabbix-agent service and verify monitoring dashboard and host. You will get data under mysql graphs 




Tuesday, October 13, 2020

Zabbix Email Notification Setup

 Description:  Here I have explain, How to setup Email notification on Zabbix when any alert is triggered?


  • To setup email open zabbix URL and navigate to Administration -- Media types then select Email


  • Fill all require details like mail server, mail ID, SMTP port number 
  • Once you fill all the details test email setting by click on test on email 


  • To report problems to administrator you need to enable trigger action. To enable it navigate to Configurations -- Actions and enable Report Problems to Zabbix Administrators

  • This will enable email notification to Zabbix Admin group. You need to change the mail id from the user account configuration 





  • Finally email notification has been setup





Monday, October 5, 2020

Add device using SNMP in Zabbix

Description:  Here I have explained, How to add device using SNMP in Zabbix

Procedure:

  • Login to Zabbix Web Interface and click on configuration > Hosts
  • Create Hosts to add device that you want to monitor
  • Once you click on create host it ask for some details like hostname, Group, Agent details etc... 

  • Select Template of SNMP [Template Module Interface SNMP] 
  • Once you add device, SNMPv2 is configure with device with community name "Test_SNMP" So to define community name open Macro and add your community. You need to set SNMP version as per your environment requirement



  • once You add all require information just wait for some time all require graphs will discover automatically
  • If you want to test SNMP connection from Zabbix server to device you can use snmpwalk command line utility to test connection

# snmpwalk -v 2c -c Test_SNMP 10.10.0.1 




Friday, September 11, 2020

Log file Monitoring in Zabbix

 Description: Zabbix can be used for centralized monitoring and analyzed of log files with/without log rotation support.

To monitor log file you must have:

  • Zabbix agent running on the host 
  • log monitoring item setup
Procedure: 
  • The first step is to configure zabbix agent in client machine and configure below things


Hostname=WindowsWeb1         ==================[Name defined in zabbix console as hostname]
LogFile=/tmp/zabbix_agentd.log ================[Log file of zabbix agent]
Server=127.0.0.1, 192.168.10.10 ===============[DNS name or IP Address of Zabbix Server]
ServerActive=192.168.10.10 ====================[DNS name or IP address of Zabbix Server]
Timeout=10 ====================================[Timeout need to set more than 5]
  • Need to restart zabbix-agent service 
  • Now we need to configure log application and item in Zabbix console 
  • Login to zabbix console http://192.168.10.10/zabbix
  • Navigate to Configuration ---Hosts and select your host [In example WindowsWeb1] then create one Application Named LOG
  • Once you add Application navigate to items and create log item under LOG application 
On the Item creation screen, you need to configure the following items:
• Name: Enter an identification to the Windows log file.
• Type: Zabbix Agent (Active)
• Key: log[E:\Log\Application.log,,,,skip]
• Type of Information: Log
• Update interval: 1 Second
• Application: LOG
  • Once you add item restart zabbix- agent from client machine and wait for 5 minutes to update file and reflect it.
  • To verify it Navigate to Monitoring Tab --- Latest data ---- under server name use WindowWeb1 and verify log file
  • You can also filter expression and other options in Log files like expression, MaxLine, Output etc.. in Key