Monitor cactus or cacti expedited installation

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

    image

    A huge number of these spiny 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 cannot but alarm ... ©


    As promised, a little earlier now we will learn to monitor our network visually.

    We will collect statistics through snmp. Installation is trivial to the limit: We create the /usr/local/etc/snmpd.config config containing exactly one line: and run it with the handles say so Checking for operation is very simple
    # cd /usr/ports/net-mgmt/net-snmp53/



    rocommunity changeme



    /usr/local/sbin/snmpd -c /usr/local/etc/snmpd.config



    # snmpget -c changeme -v1 localhost .1.3.6.1.2.1.1.1.0
    SNMPv2-MIB::sysDescr.0 = STRING: FreeBSD…


    We proceed to the actual installation of cacti.

    How to deliver apache + php + mysql in a very quick way, we already discussed in the previous article. We assume that the necessary bundle was unexpectedly saved on the host on which we will collect statistics. It's nice that with cacti you can centrally and without additional crutches to collect statistics from almost anyone who knows how to snmp. Ready-made templates are more than enough. We go to brew coffee, smoke a pipe, and relax - it draws plenty of dependences with itself, it will gather for a relatively long time. While we drank coffee and injured our health in all other known ways, everything we needed reached out and gathered. We continue. So follow these instructions

    # cd /usr/ports/net-mgmt/cacti
    # make install






    Cacti is now installed. If you intall it for the first time,
    you may have to follow this steps to make it work correctly:



    Создаем базу
    # 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 we’ll edit the /usr/local/share/cacti/include/config.php config, and then add the following to crontab (#crontab –e) Well, finally, link it to where we need it. Next, we begin to click with the mouse. How to enter the default login / password admin / admin, at the first login we are politely asked to change the password. We change the password and see approximately the following picture. Add the host that we will monitor. If we then see something like that instead of the red URLs on this host from above, then everything is fine and you can start adding graphs to it. First, add to the Associated Data Queries -> SNMP - Interface Statistics Then we poke Create Graphs for this Host and select the network cards that we will draw

    */5 * * * * /usr/local/bin/php /usr/local/share/cacti/poller.php > /dev/null 2>&1



    # ln -fs /usr/local/share/cacti/ /usr/local/www/data/cacti




    image
    image
    image




    image


    image


    image


    image





    image

    + 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
    image

    . Then it remains to be expected when statistics are gathered to draw statistics on interfaces
    image


    Also popular now: