Zabbix:Installation A

From TBwiki
(Difference between revisions)
Jump to: navigation, search
(Complete the information on the page)
(Change titles)
 
(One intermediate revision by one user not shown)
Line 40: Line 40:
 
The default user name is '''Admin''', password '''zabbix'''
 
The default user name is '''Admin''', password '''zabbix'''
  
= Configure SNMP traps =
+
= Install NET-SNMP =
 
+
Reference from http://www.zabbix.org/wiki/ConfigureSnmptrapsCentos6_RHEL6).
+
 
+
=== Install Packages===
+
 
  # yum install net-snmp-utils
 
  # yum install net-snmp-utils
 
  # yum install net-snmp-perl
 
  # yum install net-snmp-perl
Line 51: Line 47:
 
'''Note''': perl-Net-SNMP will be installed together with snmptt
 
'''Note''': perl-Net-SNMP will be installed together with snmptt
  
===Configure Zabbix Server===
+
= Install MIBs =
# vi /etc/zabbix/zabbix_server.conf
+
1. Get the "install_mibs.sh" script:
StartSNMPTrapper=1
+
SNMPTrapperFile=/var/log/snmptt/snmptt.log
+
 
+
===Configure snmptrapd===
+
# vi /etc/snmp/snmptrapd.conf
+
traphandle default /usr/sbin/snmptthandler
+
authCommunity  log,execute,net public
+
 
+
===Configure snmptt===
+
# vi /etc/snmp/snmptt.ini
+
translate_log_trap_oid = 2
+
net_snmp_perl_enable = 1
+
date_time_format = %H:%M:%S %Y/%m/%d
+
log_file = /var/log/snmptt/snmptt.log
+
log_system_enable = 1
+
 
+
Install TelcoBridges snmptt.conf:
+
# wget http://download.distribution.telcobridges.com/zabbix/snmptt.conf
+
# cp snmptt.conf /etc/snmp/snmptt.conf
+
 
+
===Install MIBs===
+
Get the "install_mibs.sh" script:
+
 
  # wget http://download.distribution.telcobridges.com/mibs/install_mibs.sh
 
  # wget http://download.distribution.telcobridges.com/mibs/install_mibs.sh
 
  # chmod +x install_mibs.sh
 
  # chmod +x install_mibs.sh
  
Run "install_mibs.sh" script with no argument to get the mibs path configured on your system:
+
2. Run "install_mibs.sh" script with no argument to get the mibs path configured on your system:
 
  # ./install_mibs.sh
 
  # ./install_mibs.sh
 
  ./install_mibs.sh <MibPath>
 
  ./install_mibs.sh <MibPath>
Line 84: Line 58:
 
  init_mib: Seen MIBDIRS: Looking in '/root/.snmp/mibs:/usr/share/snmp/mibs' for mib dirs ...
 
  init_mib: Seen MIBDIRS: Looking in '/root/.snmp/mibs:/usr/share/snmp/mibs' for mib dirs ...
 
   
 
   
Install the mibs files to the MIBDIRS path (ex.'''/usr/share/snmp/mibs'''):
+
3. Install the mibs files to the MIBDIRS path (ex.'''/usr/share/snmp/mibs'''):
 
  # ./install_mibs.sh /usr/share/snmp/mibs
 
  # ./install_mibs.sh /usr/share/snmp/mibs
  
Line 94: Line 68:
 
'''Note''': If for some reason your NET-SNMP does not contain all the required mibs, you can download all the mibs from http://download.distribution.telcobridges.com/mibs and copy them to your MIBDIRS path.
 
'''Note''': If for some reason your NET-SNMP does not contain all the required mibs, you can download all the mibs from http://download.distribution.telcobridges.com/mibs and copy them to your MIBDIRS path.
  
Configure snmp.conf (if the file does not exist, create the file with only the following line):
+
 
 +
4. Configure snmp.conf (if the file does not exist, create the file with only the following line):
 
  # vi /etc/snmp/snmp.conf
 
  # vi /etc/snmp/snmp.conf
 
  mibs +ALL
 
  mibs +ALL
  
===Start services===
+
= Configure SNMP traps =
 +
Reference from http://www.zabbix.org/wiki/ConfigureSnmptrapsCentos6_RHEL6).
 +
 
 +
== Configure Zabbix Server ==
 +
# vi /etc/zabbix/zabbix_server.conf
 +
StartSNMPTrapper=1
 +
SNMPTrapperFile=/var/log/snmptt/snmptt.log
 +
 
 +
== Configure snmptrapd ==
 +
# vi /etc/snmp/snmptrapd.conf
 +
traphandle default /usr/sbin/snmptthandler
 +
authCommunity  log,execute,net public
 +
 
 +
== Configure snmptt ==
 +
# vi /etc/snmp/snmptt.ini
 +
translate_log_trap_oid = 2
 +
net_snmp_perl_enable = 1
 +
date_time_format = %H:%M:%S %Y/%m/%d
 +
log_file = /var/log/snmptt/snmptt.log
 +
log_system_enable = 1
 +
 
 +
== Install TelcoBridges snmptt.conf ==
 +
# wget http://download.distribution.telcobridges.com/zabbix/snmptt.conf
 +
# cp snmptt.conf /etc/snmp/snmptt.conf
 +
 
 +
== Start services ==
 
  # chkconfig snmptt on
 
  # chkconfig snmptt on
 
  # chkconfig snmptrapd on
 
  # chkconfig snmptrapd on
 
  # service snmptrapd start
 
  # service snmptrapd start
 
  # service snmptt start
 
  # service snmptt start

Latest revision as of 00:58, 28 May 2015


This procedure applies to Zabbix v.2.4 on CentOS6

Contents

Install Zabbix

1. Follow RedHat/CentOS installation procedure from Zabbix documentation

https://www.zabbix.com/documentation/2.4/manual/installation/install_from_packages#red_hat_enterprise_linuxcentos

Note: It is possible that you might get the following error while starting httpd on a new CentOS installation:

# service httpd start
Starting httpd: httpd: apr_sockaddr_info_get() failed for myZabbixHost
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Make sure to configure your hostname "myZabbixHost" to /etc/hosts

2. Configure services to automatically starts on reboot of the server

# chkconfig mysqld on
# chkconfig zabbix-server on
# chkconfig zabbix-agent on
# chkconfig httpd on

3. Disable SELinux

# setenforce 0

Edit /etc/selinux/config and set SELINUX to disabled:

# vi /etc/selinux/config
SELINUX=disabled

4. Configure the Zabbix frontend

Follow the procedure in the section Installing frontend from Zabbix documentation

https://www.zabbix.com/documentation/2.4/manual/installation/install#installing_zabbix_web_interface

5. Login to Zabbix frontend

In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix

The default user name is Admin, password zabbix

Install NET-SNMP

# yum install net-snmp-utils
# yum install net-snmp-perl
# yum install snmptt

Note: perl-Net-SNMP will be installed together with snmptt

Install MIBs

1. Get the "install_mibs.sh" script:

# wget http://download.distribution.telcobridges.com/mibs/install_mibs.sh
# chmod +x install_mibs.sh

2. Run "install_mibs.sh" script with no argument to get the mibs path configured on your system:

# ./install_mibs.sh
./install_mibs.sh <MibPath>
Mibs paths returned by snmptranslate:
init_mib: Seen MIBDIRS: Looking in '/root/.snmp/mibs:/usr/share/snmp/mibs' for mib dirs ...

3. Install the mibs files to the MIBDIRS path (ex./usr/share/snmp/mibs):

# ./install_mibs.sh /usr/share/snmp/mibs

The installation of NET-SNMP already comes with defaults mibs. The script install only the mibs that are not included in the default NET-SNMP package and that are needed by the TB snmp zabbix templates:

  • TB-MIB-2014.mib (TB-MIB)
  • rfc-2495.mib (DS1-MIB)
  • rfcperfhist.mib (definition used by rfc-2495.mib)

Note: If for some reason your NET-SNMP does not contain all the required mibs, you can download all the mibs from http://download.distribution.telcobridges.com/mibs and copy them to your MIBDIRS path.


4. Configure snmp.conf (if the file does not exist, create the file with only the following line):

# vi /etc/snmp/snmp.conf
mibs +ALL

Configure SNMP traps

Reference from http://www.zabbix.org/wiki/ConfigureSnmptrapsCentos6_RHEL6).

Configure Zabbix Server

# vi /etc/zabbix/zabbix_server.conf
StartSNMPTrapper=1
SNMPTrapperFile=/var/log/snmptt/snmptt.log

Configure snmptrapd

# vi /etc/snmp/snmptrapd.conf
traphandle default /usr/sbin/snmptthandler
authCommunity   log,execute,net public

Configure snmptt

# vi /etc/snmp/snmptt.ini
translate_log_trap_oid = 2
net_snmp_perl_enable = 1
date_time_format = %H:%M:%S %Y/%m/%d
log_file = /var/log/snmptt/snmptt.log
log_system_enable = 1

Install TelcoBridges snmptt.conf

# wget http://download.distribution.telcobridges.com/zabbix/snmptt.conf
# cp snmptt.conf /etc/snmp/snmptt.conf

Start services

# chkconfig snmptt on
# chkconfig snmptrapd on
# service snmptrapd start
# service snmptt start
Personal tools