Installation and use of Zabbix under Ubuntu

Source: Internet
Author: User
Tags snmp

1.configure:error:mysql Library not found MySQL library not found

root@kallen:~# apt-get install libmysqlclient-dev

2.configure error:invalid net-snmp directory-unable to find Net-snmp-config

root@kallen:~# apt-get install snmp snmpd 

[Attached-1] SNMP Installation and Configuration

(1) SNMP Installation

Run the following two commands:

root@kallen:~# apt-get install snmp snmpd

After running smoothly, test it with the following command:

Root@kallen:~# lsof-i:161COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAMESnmpd1141Snmp9UIPv4  127800t0  UDP*: SNMPSnmpd1141Snmp AUIPv6  127810t0  UDPip6-localhost:Snmp

If the SNMP protocol is running, the installation OK is indicated.

(2) SNMP Configuration

SNMP configuration file /etc/snmp/snmpd.conf
My goal is to make a remote SNMP connection, so I need to make the following modifications:
Take the following line: agentAddress udp:127.0.0.1:161
Comment out, i.e.: #agentAddress udp:127.0.0.1:161
The original line is then: #agentAddress udp:161,udp6:[::1]:161
Remove the comment, i.e.: agentAddress udp:161,udp6:[::1]:161
This enables remote monitoring of SNMP.
However, after the modified cacti server can not monitor the CPU, memory, traffic data, so need to make the following changes:
Find the following in the snmpd.conf

view   systemonly  included   .1.3.6.1.2.1.1view   systemonly  included   .1.3.6.1.2.1.25.1

Plus view systemonly included .1 80 , all devices are allowed to listen.
After all the modifications have been completed, restart SNMP: service snmpd restart
Verify that the installation is successful, as follows:>> snmpget --version

root@kallen:/usr/share/snmp#snmpd --versionNET-SNMPversion:5.7.2Web:     http://www.net-snmp.org/Email:   net-snmp-coders@lists.sourceforge.net

To test whether SNMP monitors various metrics, run the following command:

root@kallen:~# snmpwalk -v 2c -c public localhost

If the output has a lot of pages, it should be set up successfully!

3.The Frontend does not match Zabbix database

[Cause of problem] Zabbix database version is incorrect (because SQL is imported in Zabbix-2.4)

[Workaround] First look at the version number of the current Zabbix:

[email protected]:~# dpkg -l | grep zabbixii  zabbix-agent            1:2.2.2+dfsg-1ubuntu1   i386 network    monitoring solution - agentii  zabbix-frontend-php     1:2.2.2+dfsg-1ubuntu1   all     network monitoring solution - PHP front-endii  zabbix-server-mysql     1:2.2.2+dfsg-1ubuntu1   i386    network monitoring solution - server (using MySQL)

Confirm and re-import the SQL of the Zabbix database
(Path under the source package:zabbix–> database–> mysql–> *.sql)

mysql   | - - data   sql  |  - - images   sql    - - schema   sql   
root@kallen:~# mysql -uzabbix -pzabbix zabbix < schema.sqlroot@kallen:~# mysql -uzabbix -pzabbix zabbix < images.sql root@kallen:~# mysql -uzabbix -pzabbix zabbix < data.sql

4.zabbix-server stop/waiting

[Email protected]:/etc/default# vim zabbix-server# defaults file for zabbix-server-mysql#StartThe Zabbix server fromThe Init.d script?# (PossibleValues:"Yes"or"No") # This is  by default Set  to"No"Because a MySQLDatabaseNeeds toBe prepared# andConfiguredbeforeYou canStartThe Zabbix server forThe First  Time. # instructions onHow to SetUp theDatabaseCan befound inch#/usr/share/doc/zabbix-server-mysql/readme. DebianSTART=No#AbsolutePath toThe Configuration fileconfig_file="/etc/zabbix/zabbix_server.conf"

is set to no, of course, can not start, change to Yes, restart can:

root@kallen:/etc/default# service zabbix-server start17802

5.Unable To create the configuration file.

Unable to create the configuration file. Please install it manually,
or fix permissions on the Conf directory.

To manually copy zabbix.conf.php /var/www/html/zabbix/conf , the zabbix.conf.php file format is as follows:

<?php//Zabbix GUI configuration fileGlobal $DB;$DB[' TYPE ']     =' MYSQL ';$DB[' SERVER ']   =' localhost ';$DB[' PORT ']     =' 3306 ';$DB[' DATABASE '] =' Zabbix ';$DB[' USER ']     =' Zabbix ';$DB[' PASSWORD '] =' Zabbix ';//SCHEMA is relevant only for IBM_DB2 database$DB[' SCHEMA '] ="';$ZBX _server=' 172.16.1.231 ';$ZBX _server_port=' 10051 ';$ZBX _server_name=' localhost ';$IMAGE _format_default= Image_format_png;?>

[Attached-2] Zabbix Monitor Sample Map

(1) Server perfermance

(2) CPU Load

(3) Disk Space Usage

(4) Internal Process Busy

(5) Value Cache Effectiveness

(6) Network traffic

(7) CPU utilization

(8) CPU jumps

(9) Apache Access

(+) Apache Processes

(one) Apache Volume

"Summary"

Combined with the above graphics and their own experience in the use of Zabbix, the personal sense of Zabbix (in fact, PHP's drawing module PHP GDD) Ability and performance is good, better than cacti & Nagios (its drawing module is RRD Tools); Zabbix The dashboard experience is also better.

Top Picks

  • LNMP Environment Construction--nginx Chapter

  • Configuring the local Yum source in RHEL6.5

  • Installation and use of Zabbix under Ubuntu

  • MySQL Dual master hot standby problem processing

  • Rsync Sync error Handling

  • Fix Elementary Boot Screen (Plymouth)
    After installing Nvidia Drivers

Copyright NOTICE: This article for Bo Master original article, without BO Master permission cannot reprint |copyright©2011-2015, Kallen Ding, All rights Reserved.

Installation and use of Zabbix under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.