Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to monitor the compilation, installation and Sinicization of linux snmp and rrdtool by cacti

2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how cacti monitors the compilation, installation and Sinicization of linux snmp and rrdtool". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

In the past, cacti or mrtg has been used to monitor switch traffic, but rarely used to monitor servers. Today, let's use cacti to monitor the specific implementation steps of linux. Today, we will first install the basic installation, compilation, installation and Chinese translation of snmp and rrdtool.

1. The installation of snmpd needed by cacti to monitor linux is easy to skim.

Tip: due to the hardware firewall, there may be problems with remote udp packages. Provide the method to modify the snmp port:

Snmpd tcp: Port or snmpd udp: Port

You can also modify it directly in linux: / etc/rc.d/init.d/snmpd

For example, change to tcp protocol: Port 100001

As follows:

Before modification

OPTIONS= "- s-l / dev/null-P / var/run/snmpd-a"

After modification

OPTIONS= "tcp:100001-s-l / dev/null-P / var/run/snmpd-a"

And then

/ etc/rc.d/init.d/snmpd restart is ok.

2. Rrdtool installation required for cacti monitoring linux

If there is no Chinese requirement, install the rpm package.

Note: install it together during installation, otherwise there may be errors: rpm-ivh perl-rrdtool-1.2.23-1.el5.rf.i386.rpm rrdtool-1.2.23-1.el5.rf.i386.rpm

Libmbfl library is required to support mbstring,mbstring, and Cacti uses pcre, so when compiling, be sure to add three items-- with-pcre-regex-- with-mbstring-- with-libmbfl, without specifying 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. Installation and use of cacti

Basic applications:

Extract it to the web directory and execute mysql-uroot-p cacti

< cacti.sql vi include/config.php 更改数据库的连接信息 建议新建一个用户newuser,把cacti下rrd和log目录权限给新用户,新建任务 crontab -u newuser -e 添加下面这条 */5 * * * * /usr/local/server/php5/bin/php /usr/local/server/www/cacti/poller.php >

/ dev/null 2 > & 1

At this point, the basic application is ready.

In addition, you need to configure information such as the snmp password of the monitored host:

Vi / etc/snmp/snmpd.conf

Change

1 、 com2sec notConfigUser default public

Change to: com2sec notConfigUser 127.0.0.1 (change to ip of monitoring server) public (change to your own password)

2. Access notConfigGroup "" any noauth exact systemview none none

Change it to: access notConfigGroup "" any noauth exact all none none

3 、 # view all included. 1 80

Remove the previous # comment.

This is the end of the content of "how cacti monitors the compilation, installation and Sinicization of linux snmp and rrdtool". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report