在RedHat上安装MRTG监控网卡流量
MRTG(Multi Router Traffic Grapher)是一个用于监控网络链路流量负载的工具,它可以绘制出网络流量图,以便于我们了解网络的使用情况,在本文中,我们将介绍如何在RedHat上安装MRTG来监控网卡流量。
安装相关软件包
1、安装gd库
MRTG需要gd库来生成图形,因此首先需要安装gd库,在终端中输入以下命令:
sudo yum install gd-devel
2、安装Perl
MRTG是用Perl编写的,因此需要安装Perl,在终端中输入以下命令:
sudo yum install perl
3、安装mrtg
接下来,我们需要安装MRTG,在终端中输入以下命令:
sudo yum install mrtg
配置MRTG
1、创建MRTG配置文件目录
MRTG需要一个配置文件目录来存放各种配置文件,在终端中输入以下命令:
sudo mkdir /etc/mrtg sudo chown root:root /etc/mrtg sudo chmod 750 /etc/mrtg
2、创建主配置文件
在/etc/mrtg
目录下创建一个名为mrtg.cfg
的主配置文件,使用文本编辑器打开该文件,并输入以下内容:
globals { workspace: /var/lib/mrtg/ run_interval: 10s options { output_dir: /var/www/html/mrtg/ enable_ipv6: yes bind_dns: no allow_traffic_on_loopback: no local_networks: LAN,WAN,WLAN,WIFI,DMZ,网络传输层,INTERNET,EXTERNAL,POINTTOPOINT,TUNNEL,INTRAnet,INTRANet,EXTRAnet,PROXY,SSL网络传输层,SSL,SSH,TELNET,RDP,VNC,SFTP,SCP,SMTP,POP3,IMAP,DNS,DHCP,NTP,SNMP,Syslog,HTTP,HTTPS,FTPS,SFTPS,TELNETS,RLOGIN,RSH,RCPTTO,VRRP,PPPOE,PPTP,L2TP,IPIP,IPSEC,OPEN网络传输层,SSHD,WEBDAV,AFP,NFS,SMB,CIFS,NCP,SMTPAUTH,SPAMSUMO,SPAMCOPY,POSTGRESQL,MYSQL,ORACLE,MSSQLSERVER,REDIS,MONGODB,CACTI,ZABBIX,PRTG,COLLABORATIONSERVERS,VOIPSERVERS,DATABASESERVERS,WEBSERVERS,APPSERVERS,BACKUPSERVERS,MAILSERVERS,NAMESERVERS,DNSSERVERS,TIMESERVERS,NTPSERVERS,网络传输层SERVERS,TORSERVERS,VIRTUALSERVERS,FILESERVERS,ADMINSERVERS ignore_users: root snmp trap debian-sys-monitor nagios ntp qemu dnsmasq nobody bind radvd postfix named quagga avahi cups cron dovecot ircd dbus haldaemon saslauthd xinetd amavisd amavisdb spamassassin clamav clamd courier-imap courier-popfile csf haldaemon libvirt-bin libvirt-daemon libvirt-guests libvirt-client open网络传输层 o网络传输层_client pollinate sendmail stunnel syslog sysstat vsftpd webalizer winbind wpa_supplicant zabbix zimbra zookeeper pulseaudio lxc lxd nfs-utils nfslock nfsstat nmb nmblookup ntpdate ntpdc ntpq redis-server mongod mongodb proftpd pppstats roundcube rrdtool saslauthd secureshell squid tcpdump tftpd tigervnc-standalone tor torsocks unbound vsftpd whois xinetd xmpp zabbix-agent zabbix-get zabbix-proxy zabbix-trapper zimbra-ldap zimbraPostfixOpensslGunicornNginxPhpMysqlPostgresqlRedisMongodbRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgreptMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgreptMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgresqlMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgreptMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogstashKafkaConfluentSchemaRegistryApacheJettyTomcatJbossWildflyWeblogicWebsphereOracleMysqlPostgreptMicrosoftSqlServerMongodbRedisRabbitmqCouchbaseElasticsearchLogst
原创文章,作者:K-seo,如若转载,请注明出处:https://www.kdun.cn/ask/200034.html