Installation and use of Zabbix under Ubuntu

Source: Internet
Author: User
Tags snmp

installing zabbix on ubuntu


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


apt-get install libmysqlclient-dev


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


apt-get


[attached]SNMP installation and configuration
(1) SNMP installation
Run the following two commands:zabbix install ubuntu


apt-get install snmp snmpd


After running smoothly, test it with the following command:


lsof-i:161


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, namely: #agentAddress udp:127.0.0.1:161
Then the original line: #agentAddress udp:161,udp6:[::1]:161
Remove the comment, namely: 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 allows all devices to be monitored.
After all the modifications are complete, 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

how to install zabbix on ubuntu 16.04

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


-v2-cpublic 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)

install zabbix 4.4 on ubuntu 18.04

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:install zabbix ubuntu server 18.04


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


5.Unable To create the configuration file.
Unable to create the configuration file.
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;?>


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.