1Cacti配置安装监控Cisco交换机

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了1Cacti配置安装监控Cisco交换机相关的知识,希望对你有一定的参考价值。

1、实验拓扑

技术分享


2、安装Cacti


2.1、安装相关软件

[[email protected] ~]# yum install -y httpd php php-mysql php-snmp mysql-server php-pdo net-snmp net-snmp-libs  net-snmp-utils  net-snmp-devel  ruby ruby-devel  gcc


[[email protected] ~]# vim /etc/snmp/snmpd.conf 

62行的systemview改为all

修改前 access  notConfigGroup ""      any       noauth    exact  systemview none none

修改后 access  notConfigGroup ""      any       noauth    exact  all none none


85行的#号去掉

修改前 #view all    included  .1                               80

修改后 view all    included  .1                               80


启动相关服务

[[email protected] ~]# service snmpd start

[[email protected] ~]# service httpd start

[[email protected] ~]# service mysqld start


设置开启启动

[[email protected] ~]# chkconfig snmpd on

[[email protected] ~]# chkconfig httpd on

[[email protected] ~]# chkconfig mysqld on



2.2、安装第三方yum源和RRDtool

[[email protected] ~]#rpm -ivh ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/smite:/repo-repo/CentOS_CentOS-6/i686/rpmforge-release-0.5.3-1.1.i686.rpm

[[email protected] ~]# yum -y install rrdtool-* 


2.3、CACTI安装

[[email protected] ~]# mkdir cacti

[[email protected] ~]# cd cacti/

[[email protected] cacti]# wget http://www.cacti.net/downloads/cacti-0.8.8h.tar.gz

[[email protected] cacti]# tar -zxvf cacti-0.8.8h.tar.gz -C /var/www/html/

[[email protected] cacti]# cd /var/www/html/

[[email protected] html]# mv cacti-0.8.8h/ cacti


2.4、MYSQL配置

[[email protected] html]# useradd cacti

[[email protected] html]# echo "cacti" | passwd --stdin cacti


[[email protected] html]# mysql

mysql> create database cacti;

mysql> grant all privileges on cacti.* to [email protected] identified by ‘cacti‘;

mysql> grant all privileges on cacti.* to [email protected] identified by ‘cacti‘; 

mysql> flush privileges; 

mysql> \q


2.5、CACTI配置

[[email protected] html]# crontab -e

*/1 * * * * php /var/www/html/cacti/poller.php >/dev/null 2>&1


[[email protected] html]# mysql -ucacti -pcacti cacti </var/www/html/cacti/cacti.sql

[[email protected] html]#  cd /var/www/html/cacti/ 

[[email protected] cacti]# chown -R root.root *


[[email protected] cacti]# vim /var/www/html/cacti/include/config.php

$database_type = "mysql";

$database_default = "cacti";

$database_hostname = "localhost";

$database_username = "cacti";

$database_password = "cacti";

$database_port = "3306";

$database_ssl = false;


2.6、同步时钟

[[email protected] ~]# yum -y install ntp

[[email protected] ~]# ln -sf /usr/share/zoneinfo/Asia/Shanghai    /etc/localtime


[[email protected] ~]# crontab -e

*/1 * * * * php /var/www/html/cacti/poller.php >/dev/null 2>&1

*/1 * * * * /usr/sbin/ntpdate asia.pool.ntp.org >/dev/null 2>&1


3、配置交换机

en

conf t

interface Vlan1

ip address 192.168.137.2 255.255.255.0

no shut

ip route 0.0.0.0 0.0.0.0 192.168.137.1

snmp-server community cacti RO


4、cacti初始化

技术分享

技术分享

技术分享

技术分享

技术分享


5、caci监控交换机端口流量

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享

技术分享



本文出自 “开源殿堂” 博客,请务必保留此出处http://kaiyuandiantang.blog.51cto.com/10699754/1870059

以上是关于1Cacti配置安装监控Cisco交换机的主要内容,如果未能解决你的问题,请参考以下文章

nagios监控cisco交换机流量

cisco ACS 配置

Cisco 3650交换机温度监控间接监控机房温度

如何使用MAC地址划分VLAN ?(cisco和锐捷的三层交换机!)

cisco如何配置DHCP

cisco交换机密码配置问题