Bài đăng

Hiển thị các bài đăng có nhãn Zabbix

How To Install and Configure Grafana to Plot Beautiful Graphs from Zabbix on CentOS 7

Hình ảnh
Introduction Zabbix is a great monitoring tool that collects data from servers, virtual machines, and other kinds of network devices so you can analyze it for trends or problems. It has feature-rich notifications on emerging issues, but the built-in tools for data analysis and visualization are not easy to use. You can combine graphs into dashboards, but first you need to create them, and there is practically no easy way to create graphs that display real-time data. Also,to there is no way to collect data from different hosts onto a single graph. While the situation is getting better with each new release, it is far from ideal. Grafana is a good alternative to Zabbix's dashboards. It lets you create graphs and dashboards based on data from various monitoring systems, and it specializes in the display and analysis of this data. It is lightweight, easy to install, and it looks beautiful. In this tutorial, you'll install Grafana and configure it to display data from Zabbix,...

Zabbix Configuration Action for sending email Alert

Hình ảnh

SNMP Items with ZABBIX

To find the values or exact names of what you would like to monitor: root@host:~# snmpwalk vpn.openforce.com -v 2c -c mtt |grep -i ifinoctet IF-MIB::ifInOctets.1 = Counter32: 2216 IF-MIB::ifInOctets.2 = Counter32: 2909800100 IF-MIB::ifInOctets.3 = Counter32: 0 IF-MIB::ifInOctets.4 = Counter32: 948093493 IF-MIB::ifInOctets.5 = Counter32: 252207088 IF-MIB::ifInOctets.6 = Counter32: 0 IF-MIB::ifInOctets.7 = Counter32: 0 IF-MIB::ifInOctets.8 = Counter32: 0 IF-MIB::ifInOctets.9 = Counter32: 0 IF-MIB::ifInOctets.10 = Counter32: 0 IF-MIB::ifInOctets.11 = Counter32: 0 IF-MIB::ifInOctets.12 = Counter32: 0 IF-MIB::ifInOctets.13 = Counter32: 0 IF-MIB::ifInOctets.14 = Counter32: 0 IF-MIB::ifInOctets.15 = Counter32: 0 IF-MIB::ifInOctets.16 = Counter32: 0 IF-MIB::ifInOctets.17 = Counter32: 0 IF-MIB::ifInOctets.18 = Counter32: 0 IF-MIB::ifInOctets.19 = Counter32: 0 IF-MIB::ifInOctets.20 = Counter32: 0 IF-MIB::ifInOctets.21 = Counter32: 258005245 To find the OID of the item you want to get: root@...

CLEANING UP THE ZABBIX DATABASE

My Zabbix database size increased a lot in the last few months and since my disk was running out space, I decided to clean up the old events from the database. Looking at the database tables, the biggest one was  history_uint , which holds the items history data – over 400 millions of records and over 30 Gb of disk space before the clean up. Since deleting the old records from this table directly would be a very slow process, I decided to create a new table and insert the latest records from the  history_uint  table and then just replace the old table with a new one. Since this is not an offical procedure, use it at your own risk. Environment: Zabbix v2.2 MySql 5.1 – InnoDB with  innodb_file_per_table=ON Step 1 – Stop the Zabbix server Step 2 – Open your favourite MySQL client and create a new table CREATE TABLE  history_uint_new  LIKE  history_uint; Step 3 – Insert the latest records from the  history_uint  table to the...

[Zabbix Alert] Configure msmtp to work with gmail on linux

Hình ảnh
Zabbix integrated Email media facility is restricted to basic SMTP protocol. It does not support advanced SMTP capabilities such as authentication or encrypted communication with  TLS Zabbix notification system can be extended with external programs. This solution is based on  msmtp  command line utility that integrates advanced SMTP capabilities. Email content customization Zabbix integrated Email media facility can only send simple text emails. With an external script, it is possible to add custom email headers. It allows to use HTML formatted messages or change message priority. Installation Prerequisites msmtp must be installed. On CentOS: yum install msmtp msmtp media script zext_msmtp.sh  script ( latest version ) should be installed in alert scripts directory on Zabbix server. This directory is defined in zabbix_server.conf by AlertScriptsPath parameter. Default value is: # vi /etc/zabbix/zabbix_server.conf AlertScriptsPath=/etc/zabbix/...

[Zabbix] Fping can only be run by or not supported

+ Install fping + Check fping path # whereis fping  fping: /usr/sbin/fping /usr/share/man/man8/fping.8.gz + Edit file # vi /etc/zabbix/zabbix_server.conf  Change: FpingLocation=/usr/sbin/fping + Chown fping # chown root:zabbix /usr/sbin/fping # chmod 710 /usr/sbin/fping # chmod ug+s /usr/sbin/fping + Result [root@localhost ~]# ll /usr/sbin/fping -rws--s--- 1 root zabbix 27824 May 19  2010 /usr/sbin/fping

Auto restart Linux service using zabbix

Hình ảnh
Configuration Those remote commands that are executed on Zabbix agent (custom scripts) must be first enabled in the respective zabbix_agentd.conf . Make sure that the EnableRemoteCommands parameter is set to 1 and uncommented. Restart agent daemon if changing this parameter. Remote commands do not work with active Zabbix agents. Then, when configuring a new action in Configuration→Actions : In the Operations tab, select the Remote command operation type Select the remote command type ( IPMI , Custom script, SSH , Telnet, Global script) Enter the remote command For example: sudo /etc/init.d/apache restart In this case, Zabbix will try to restart an Apache process. With this command, make sure that the command is executed on Zabbix agent (mark the respective radio button against Execute on ). Note the use of sudo - Zabbix user does not have permissions to restart system services by default. See below for hints on how to configure sudo . Zabbix agent ...