There is a long-standing belief that a cactus in front of a screen saves the user from the harmful radioactive radiation generated by the monitor.

A huge number of these prickly plants flaunts in front of, on or near the monitor of millions of users throughout Russia. By the number of adherents, “cactusism” competes on equal terms with many religious denominations. This can not but alarm ... ©
')
As promised, a
little earlier, now we will learn to monitor our network visually.
We will collect statistics using snmp. Setting is trivial to the limit:
# cd /usr/ports/net-mgmt/net-snmp53/
Create a config /usr/local/etc/snmpd.config containing exactly one line:
rocommunity changeme
and run the handles let's say so
/usr/local/sbin/snmpd -c /usr/local/etc/snmpd.config
Operation is checked very simply
# snmpget -c changeme -v1 localhost .1.3.6.1.2.1.1.1.0
SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD…
Go to the actual installation of cactiHow to quickly install apache + php + mysql, we have already considered in the previous article. We assume that the necessary combination of us unexpectedly preserved on the host on which we will collect statistics. It's nice that with the help of cacti it is possible to collect statistics from almost anything that can snmp with centralized and without additional crutches. Ready-made templates are more than enough.
# cd /usr/ports/net-mgmt/cacti
# make install
We go to make coffee, to smoke a pipe, and to have a rest - it pulls it with it a lot, it will be collected for a relatively long time.
While we were drinking coffee and harming our health with all other known methods, everything that was needed reached out and gathered. We continue.
Cacti is now installed. If you intall it for the first time,
you may have to follow this steps to make it work correctly:
Here we follow these instructions.
# mysqladmin --user=root -pourpassword create cacti
# echo "GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser'; FLUSH PRIVILEGES;" | mysql --user=root --password=ourpassword
# mysql --user=root --password=ourpassword cacti < /usr/local/share/cacti/cacti.sql
Now edit the config /usr/local/share/cacti/include/config.php, then add the following to the crontab (#crontab –e)
*/5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1
Well, lastly simlinkaem him where we need
# ln -fs /usr/local/share/cacti/ /usr/local/www/data/cacti
Next we start using mouse



How to enter the default login / password admin / admin, when you first login us politely
asked to change the password.

Change the password and see approximately the following picture.

Add a host that we will monitor

If after this we see something like this on top of this host instead of reds

it means everything is good and you can begin to add him scribbles.
First we add to the Associated Data Queries -> SNMP - Interface Statistics
Then poke Create Graphs for this Host and select the network card that will be drawn

+ Created graph: testhost - Traffic - 10.0.2.15 (em0)
+ Created graph: testhost - Traffic - 192.168.56.2 (em1)
And add the host to the graph tree

Everything. It remains to be expected when statistics are collected for drawing statistics on interfaces.
