ソスTソス[ソスoソス[ソスト趣ソスソスVソスXソスeソスソスソス\ソスz(RRDtool+Cacti)

ソスナ終ソスXソスVソスソスソスF 2020.12.29

ソスソスソスTソスv

ソスソスソスソスソスソスソスMRTGソスソスRRDtoolソス利用ソスソスソストサソス[ソスoソス[ソスト趣ソスソスVソスXソスeソスソスソスソスソス\ソスzソスソスソスソスB
ソスソスソスソスソスナは、RRDtoolソスフフソスソスソスソスソスgソスGソスソスソスhソスニゑソスソスソスCactiソス利用ソスソスソスAWebソスCソスソスソス^ソスtソスFソス[ソスXソスナグソスソスソスtソスフ管暦ソスソスソスソスナゑソスソスソス謔、ソスノゑソスソスソスB

ソスTソスソスソスvソスソス(ソスソスソスTソスCソスgソスフグソスソスソスt)

ソスソスApache+PHPソスAMySQLソスソスソスKソスv


ソスソスNet-SNMPソスCソスソスソスXソスgソス[ソスソス

ソスfソス[ソス^ソスソスソスWソスノ必ソスvソスソスNet-SNMPソスソスソスCソスソスソスXソスgソス[ソスソスソスソスソスソスB
[root@centos ~]# yum -y install net-snmpソス@ソスソスソス@Net-SNMPソスCソスソスソスXソスgソス[ソスソス

ソスソスNet-SNMPソスン抵ソス

[root@centos ~]# vi /etc/snmp/snmpd.confソス@ソスソスソス@Net-SNMPソスン抵ソスtソス@ソスCソスソスソスメ集
#       sec.name  source          community
#com2sec notConfigUser  default       publicソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
com2sec local localhost privateソス@ソスソスソス@ソスヌ会ソス
com2sec mynetwork 192.168.1.0/24 publicソス@ソスソスソス@ソスヌ会ソス(ソスlソスbソスgソスソスソス[ソスNソスAソスhソスソスソスXソスヘ各ソスソスソスフ環具ソスソスノ搾ソスソスせソス驍アソスソス)

#       groupName      securityModel securityName
#group   notConfigGroup v1c           notConfigUserソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
#group   notConfigGroup v2c           notConfigUserソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
group MyROGroup v1 localソス@ソスソスソス@ソスヌ会ソス
group MyROGroup v2c localソス@ソスソスソス@ソスヌ会ソス
group MyROGroup v1 mynetworkソス@ソスソスソス@ソスヌ会ソス
group MyROGroup v2c mynetworkソス@ソスソスソス@ソスヌ会ソス

# Make at least  snmpwalk -v 1 localhost -c public system fast again.
#       name           incl/excl     subtree         mask(optional)
#view    systemview    included   .1.3.6.1.2.1.1ソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
#view    systemview    included   .1.3.6.1.2.1.25.1.1ソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
view all included .1 80ソス@ソスソスソス@ソスヌ会ソス

# Finally, grant the group read-only access to the systemview view.

#       group          context sec.model sec.level prefix read   write  notif
#access  notConfigGroup ""      any       noauth    exact  systemview none noneソス@ソスソスソス@ソスRソスソスソスソスソスgソスAソスEソスg
access MyROGroup "" any noauth exact all none noneソス@ソスソスソス@ソスヌ会ソス
access MyRWGroup "" any noauth exact all all noneソス@ソスソスソス@ソスヌ会ソス

# Check the / partition and make sure it contains at least 10 megs.

#disk / 10000
disk / 10000ソス@ソスソスソス@ソスヌ会ソス(ソスfソスBソスXソスNソスgソスpソスソスソス\ソスソスソスpソスン抵ソス)

ソスソスNet-SNMPソスNソスソス

[root@centos ~]# systemctl start snmpdソス@ソスソスソス@Net-SNMPソスNソスソスソスソスCentOS7ソスフ場合

[root@centos ~]# systemctl enable snmpdソス@ソスソスソス@Net-SNMPソスソスソスソスソスNソスソスソスン抵ソスソスソスCentOS7ソスフ場合

ソスソスRRDtoolソスCソスソスソスXソスgソス[ソスソス

EPELソスソスソス|ソスWソスgソスソスソスソスソスソス(EPEL)ソスソスソスQソスニゑソスソスソスEPELソスソスソス|ソスWソスgソスソスソス導難ソスソスソスソスソス

[root@centos ~]# yum -y install rrdtoolソス@ソスソスソス@RRDtoolソスCソスソスソスXソスgソス[ソスソス

ソスソスCactiソスCソスソスソスXソスgソス[ソスソス

[root@centos ~]# yum -y install cactiソス@ソスソスソス@CactiソスCソスソスソスXソスgソス[ソスソス

ソスソスCactiソスン抵ソス

ソスiソスPソスjCactiソスpMySQLソスfソス[ソス^ソスxソス[ソスXソス成
[root@centos ~]# mysql -u root -pソス@ソスソスソス@MySQLソスソスrootソスナソスソスOソスCソスソス
Enter password: ソス@ソスソスソス@MySQLソスソスrootソスpソスXソスソスソス[ソスhソスソスソスソス
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 297
Server version: 5.0.37 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database cacti;ソス@ソスソスソス@Cactiソスpソスfソス[ソス^ソスxソス[ソスXソス成
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on cacti.* to cactiuser@localhost identified by 'ソスCソスモのパソスXソスソスソス[ソスh';ソス@ソスソスソス@Cactiソスpソスfソス[ソス^ソスxソス[ソスXソスAソスNソスZソスXソスソスソス[ソスUソス[ソスoソス^
Query OK, 0 rows affected (0.06 sec)

mysql> exitソス@ソスソスソス@MySQLソスソスソス辜搾ソスOソスAソスEソスg
Bye

[root@centos ~]# mysql -u cactiuser -p cacti < /usr/share/doc/cacti-*/cacti.sqlソス@ソスソスソス@Cactiソスpソスfソス[ソス^ソスxソス[ソスXソスソスソスソスソスソス
Enter password:ソス@ソスソスソス@Cactiソスpソスfソス[ソス^ソスxソス[ソスXソスAソスNソスZソスXソスソスソス[ソスUソス[ソスフパソスXソスソスソス[ソスhソスソスソスソス

ソスiソスQソスjCactiソスン抵ソス
[root@centos ~]# vi /usr/share/cacti/include/config.phpソス@ソスソスソス@Cactiソスfソス[ソス^ソスxソス[ソスXソスン抵ソスtソス@ソスCソスソスソスメ集
$database_password = "cactiuser";
ソスソス
$database_password = "ソスpソスXソスソスソス[ソスh";ソス@ソスソスソス@Cactiソスpソスfソス[ソス^ソスxソス[ソスXソスAソスNソスZソスXソスソスソス[ソスUソス[ソスフパソスXソスソスソス[ソスhソスソスソスwソスソス

ソスiソスRソスjApacheソスン抵ソス
[root@centos ~]# vi /etc/httpd/conf.d/cacti.confソス@ソスソスソス@CactiソスpApacheソスン抵ソスtソス@ソスCソスソスソスメ集
<Directory /usr/share/cacti/>
        <IfModule mod_authz_core.c>
                # httpd 2.4
                Require host localhost
                Require ip 192.168.1.0/24ソス@ソスソスソス@ソスヌ会ソス(ソスソスソスソスソスlソスbソスgソスソスソス[ソスNソスソスソスソスフアソスNソスZソスXソスソスソスソスソスソス)
        </IfModule>
        <IfModule !mod_authz_core.c>
                # httpd 2.2
                Order deny,allow
                Deny from all
                Allow from localhost
                Allow from 192.168.1.0/24ソス@ソスソスソス@ソスヌ会ソス(ソスソスソスソスソスlソスbソスgソスソスソス[ソスNソスソスソスソスフアソスNソスZソスXソスソスソスソスソスソス)
        </IfModulev
</Directory>

[root@centos ~]# systemctl reload httpdソス@ソスソスソス@Apacheソスン定反ソスfソスソスCentOS7ソスフ場合



ソスiソスSソスjCactiソスソスソスソスソスン抵ソス
WebソスuソスソスソスEソスUソスソスソスソスhttp://ソスTソス[ソスoソス[ソスソス/cacti/ソスヨアソスNソスZソスXソスソスソスソスB



Next



New InstallソスフまゑソスNext



ソスeソスソスRソス}ソスソスソスhソスヨのパソスXソスソス[FOUND]ソスニ表ソスソスソスソスソスソストゑソスソス驍アソスニゑソスソスmソスFソスソスソスソスFinish



User NameソスソスadminソスAPasswordソスソスadminソスニ難ソスソスヘゑソスソスソスLogin



Passwordソスノ任ソスモの管暦ソスソスメパソスXソスソスソス[ソスhソスAconfirmソスノ難ソスソスソスソスpソスXソスソスソス[ソスhソスソスソスソスヘゑソスソスソスSave



DevicesソスソスLocalhost
SNMP VersionソスソスVersion 1ソスソスIソスソス
SNMP Communityソスソスprivateソスニ難ソスソスソス
save

ソスiソスTソスjソスlソスbソスgソスソスソス[ソスNソスgソスソスソスtソスBソスbソスNソスOソスソスソスtソスヌ会ソス
consoleソス^ソスu
DevicesソスソスLocalhostソスソスAssociated Data QueriesソスソスAdd Data Query:ソスソスSNMP - Interface StatisticsソスソスIソスソスソスソスソスソスadd
New GraphsソスソスData Query [SNMP - Interface Statistics]-ソスCソスモゑソスName (IF-MIB)(ソスソス:eth0)ソスソスソス`ソスFソスbソスNソスソスソスソスcreate

ソスiソスUソスjソスfソスBソスXソスNソスgソスpソス況グソスソスソスtソスヌ会ソス
consoleソス^ソスu
New GraphsソスソスData Query [Unix - Get Mounted Partitions]-ソスCソスモゑソスMount Pointソスソスソス`ソスFソスbソスNソスソスソスソスcreate

ソスiソスVソスjソスbソスoソスtソスgソスpソスソスソスOソスソスソスtソスヌ会ソス
consoleソス^ソスu
DevicesソスソスLocalhostソスソスAssociated Graph TemplatesソスソスAdd Graph Template:ソスソスucd/net - CPU UsageソスソスIソスソスソスソスソスソスadd
New GraphsソスソスGraph TemplatesソスソスCreate: ucd/net - CPU Usageソスソスソス`ソスFソスbソスNソスソスソスソスcreate

ソスiソスWソスjソスsソスvソスOソスソスソスtソス除
consoleソス^ソスu
Graph Management
ソス除ソスソスソスソスソスソスソスOソスソスソスt(ソスソス:Localhost - Logged in Users )ソスソスソス`ソスFソスbソスN
Choose an action:ソスソスDeleteソスソスIソスソスソスソスソスソスgo

ソスソスCactiソスmソスF

ソスソスPソスOソスソスソスソスgraphsソス^ソスuソスソスソスNソスソスソスbソスNソスソスソストグソスソスソスtソスソスソス\ソスソスソスソスソスソス驍アソスニゑソスソスmソスFソスB

ソスソスHTMLソス成

ソスソスソスJソスpソスノグソスソスソスtソスソスHTMLソスソスソスソスソスソスB

ソスiソスPソスjApacheソスン抵ソス
[root@centos ~]# mkdir /var/www/cactihtmlソス@ソスソスソス@HTMLソス成ソスソスfソスBソスソスソスNソスgソスソスソス成

[root@centos ~]# chown cacti:cacti /var/www/cactihtml/ソス@ソスソスソス@HTMLソス成ソスソスfソスBソスソスソスNソスgソスソスソスソスソスLソスメ変更

[root@centos ~]# echo Alias /cactihtml /var/www/cactihtml > /etc/httpd/conf.d/cactihtml.confソス@ソスソスソス@Apacheソスン抵ソスtソス@ソスCソスソスソス成

[root@centos ~]# systemctl reload httpdソス@ソスソスソス@Apacheソスン定反ソスfソスソスCentOS7ソスフ場合

ソスiソスQソスjCactiソスン抵ソス
WebソスuソスソスソスEソスUソスソスソスソスhttp://ソスTソス[ソスoソス[ソスソス/cacti/ソスヨアソスNソスZソスXソスソスソスソスB

consoleソス^ソスu
Settings
Graph Export
Export MethodソスソスClassic(local path)ソスソスIソスソス
Export Directory (both local and ftp)ソスソス/var/www/cactihtmlソスニ難ソスソスソス
Export timingソスソスClassic(export every x times)ソスソスIソスソス
save

ソスソスHTMLソスmソスF

ソスソスPソスOソスソスソスソスWebソスuソスソスソスEソスUソスソスソスソスhttp://ソスTソス[ソスoソス[ソスソス/cactihtml/ソスヨアソスNソスZソスXソスソスソストグソスソスソスtソスソスソス\ソスソスソスソスソスソス驍アソスニゑソスソスmソスFソスB


ソスソスソスヨ連ソスRソスソスソスeソスソスソスc

<!ソス\ソスeソスLソスXソスgソスフみゑソス4ソスsソス\ソスソスソスノ追会ソスソスソスCソスソスソスソスソスソス\>



ソスソスソスソスソスフペソス[ソスWソスフトソスbソスvソスヨ戻ゑソス

ソスvソスソスソスCソスoソスVソス[ソス|ソスソスソスVソス[
centossrv.com