Article title: cacti-based monitoring and alarms in linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I. monitor compilation, installation, and localization of basic snmp and rrdtool
1. the snmpd installation is simple and passes through. the prompt is: due to the hardware firewall, udp packets in different regions may be faulty.
The following describes how to modify an snmp Port:
Snmpd tcp: Port or snmpd udp: Port
You can also directly modify/etc/rc. d/init. d/snmpd in linux.
For example, change to tcp: Port 100001
As follows:
Before modification
OPTIONS = "-s-l/dev/null-P/var/run/snmpd-"
After modification
OPTIONS = "tcp: 100001-s-l/dev/null-P/var/run/snmpd-"
Then
/Etc/rc. d/init. d/snmpd restart is OK
2. rrdtool
If you do not have the requirements for localization, it is best to install the rpm package.
Note: install together during installation, otherwise errors may occur: rpm-ivh perl-rrdtool-1.2.23-1.el5.rf.i386.rpm rrdtool-1.2.23-1.el5.rf.i386.rpm
Mbstring is required. mbstring requires the libmbfl library, and Cacti uses pcre. Therefore, you must add -- with-pcre-regex -- with-mbstring -- with-libmbfl to your own compilation, you do not need to specify the path (remember ).
Compile by yourself:
Cp/usr/local/server/libpng/lib/pkgconfig/libpng12.pc/usr/local/server/libpng/lib/pkgconfig/libpng. pc/usr/local/server/freetype/lib/pkgconfig/freetype2.pc/usr/local/server/fontconfig/lib/pkgconfig/fontconfig. pc/usr/lib/pkgconfig/
3. install and use cacti
Basic applications:
Decompress the package to the web Directory,
Run mysql-uroot-p cacti <cacti. SQL
Vi include/config. php change database connection information
We recommend that you create a new user newuser and grant the rrd and log directory permissions under cacti to the new user,
Create a task crontab-u newuser-e
Add the following */5 */usr/local/server/php5/bin/php/usr/local/server/www/cacti/poller. php>/dev/null 2> & 1
Now, the basic application is ready.
In addition, you need to configure the snmp password and other information of the monitored host:
Vi/etc/snmp/snmpd. conf
Change
1. com2sec notConfigUser default public
Changed to com2sec notConfigUser 127.0.0.1 (changed to the ip address of the monitoring server) public (changed to your own password)
2. access notConfigGroup "" any noauth exact systemview none
Changed to: access notConfigGroup "" any noauth exact all none
3. # view all supported DED. 1 80
Remove the # comment above.
[1] [2] [3] [4] [5] [6] Next page