{"id":23,"date":"2007-11-21T23:34:04","date_gmt":"2007-11-22T05:34:04","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=23"},"modified":"2023-07-27T02:12:47","modified_gmt":"2023-07-27T08:12:47","slug":"cacti","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/cacti\/","title":{"rendered":"CACTI"},"content":{"rendered":"<p><strong>About Cacti<\/strong><\/p>\n<p>Cacti is a PHP\/MySQL front end to rrdtool. It handles the storage of all the information required to create and populate rrdtool graphs. Along with being able to maintain Graphs, Data Sources, and RoundRobin Archives in a DataBase, Cacti handles the data gathering also. There is also SNMP support for those used to creating traffic graphs with MRTG.<br \/>\nYou can use Cacti to gather any sort of data or fetch information from SNMP capable hosts.<\/p>\n<p>To manually handle data gathering, you can feed Cacti the Command Line for any external script\/command along with any data that the user will need to fill in (IP addresses etc). Cacti will then gather this data in a cron job and populate a MySQL database\/the RoundRobin Archives.<br \/>\nData Sources can also be created, which correspond to actual data on the graph. For instance, if a user wants to graph the ping times to a host, they could create a data source, choosing a script that pings a host and returns its value in milliseconds. After defining options for rrdtool such as how to store the data you will be able to define any additional information that the data input source requires, such as a host to ping in this case. Once a data source is created, it is automatically maintained at 5-minute intervals.<br \/>\nFor people who are used to creating traffic graphs in MRTG, this process has become much simpler in Cacti. An SNMP interface allows you to enter SNMP capable hosts and Cacti will display that hosts interfaces, all of which can be graphed with once click from that point.<br \/>\nOnce one or more data sources are defined, an rrdtool graph can be created using the data. Cacti allow you to create almost any imaginable rrdtool graph using all of the standard rrdtool graph types and consolidation functions. A color selection area and automatic text padding function also aid in the creation of graphs to make the process easier.<br \/>\nCacti has a user management system so you can allocate people various levels of access to the program and their own settings.<\/p>\n<p><!--more--><\/p>\n<p><strong>Cacti Requirements<\/strong><\/p>\n<p>Cacti require that the following software is installed on your system.<br \/>\nRRDTool 1.0.48 or greater<br \/>\nMySQL 3.23 or greater, 4.0.20d or greater highly recommended for advanced features<br \/>\nPHP 4.1 or greater, 4.3.6 or greater highly recommended for advanced features<\/p>\n<p><strong>What are RRDTOOL and SNMPD?<\/strong><\/p>\n<p>RRDtool is a round-robin database tool designed to handle time-series data like network bandwidth, temperatures, CPU load etc. The data is stored in the round-robin database so that system storage footprint remains constant over time.<br \/>\nWho provides the data to RRDtool ? In our case , its done by SNMP (The Simple Network Management Protocol). Though the name contains simple , SNMP is not that easy to understand. This is clearly stated in the FAQ of SNMP. http:\/\/www.snmp.com\/FAQs\/snmp-faq-part1.txt<\/p>\n<p>Packages for RPM-based Operating Systems<br \/>\nhttpd<br \/>\nphp<br \/>\nphp-mysql<br \/>\nphp-snmp<br \/>\nmysql<br \/>\nmysql-server<br \/>\nnet-snmp<br \/>\nPorts for FreeBSD<br \/>\nwww\/apache2<br \/>\nnet\/rrdtool<br \/>\nnet\/net-snmp<br \/>\nwww\/php4-cgi<br \/>\nlang\/php4 (With MySQL and SNMP Support)<br \/>\ndatabases\/mysql323-server<\/p>\n<p><strong>MySQL Configuration for Cacti:<\/strong><\/p>\n<p>[root:~]# mysql -uroot -p<br \/>\nEnter password:<br \/>\nmysql&gt; create database cactidb;<br \/>\nmysql&gt; grant all on cactidb.* to root;<br \/>\nmysql&gt; grant all on cactidb.* to root@localhost;<br \/>\nmysql&gt; grant all on cactidb.* to cactiuser;<br \/>\nmysql&gt; grant all on cactidb.* to cactiuser@localhost;<br \/>\nmysql&gt; set password for cactiuser@localhost=password(cactipw);<br \/>\nmysql&gt; flush privileges;<br \/>\nmysql&gt; exit<br \/>\n[root:~]#<\/p>\n<p><strong>RRDTool Installation:<\/strong><\/p>\n<p>[root:~]# cd \/usr\/local\/src\/<br \/>\n[root:~]# wget http:\/\/people.ee.ethz.ch\/~oetiker\/webtools\/rrdtool\/pub\/rrdtool.tar.gz<br \/>\n[root:~]# tar -zxf rrdtool.tar.gz<br \/>\n[root:~]# cd rrdtool*<br \/>\n[root:~]# .\/configure<br \/>\n[root:~]# make<br \/>\n[root:~]# make install<br \/>\n[root:~]# make site-perl-install<br \/>\n[root:~]# cd ..<br \/>\n[root:~]# rm -fr rrdtool*<br \/>\n[root:~]#<\/p>\n<p><strong>Download and Setup Cacti:<\/strong><\/p>\n<p>[root:~]# group-add cacti<br \/>\n[root:~]# useradd -g cacti cactiuser<br \/>\n[root:~]# tar -zxvf cacti*<br \/>\n[root:~]# mv cacti-0.8.xx \/home\/cactiuser\/cacti<br \/>\n[root:~]# cd \/home\/cactiuser\/cacti<br \/>\n[root:~]# mysql user=root password=rootpw cactidb &lt; cacti.sql<br \/>\n[root:~]# chown -R cactiuser rra\/ log\/<br \/>\nMake the proper changes for database and database password:<\/p>\n<p>[root:~]# vi \/include\/config.php<\/p>\n<p>$database_defaut = cactidb;<br \/>\n$database_hostname = localhost;<br \/>\n$database_username = cactiuser;<br \/>\n$database_password = cactipw<\/p>\n<p>Add this cron in \/etc\/crontab<\/p>\n<p>*\/5 * * * * cactiuser php \/home\/cactiuser\/cacti\/poller.php &gt; \/dev\/null 2&gt;&amp;1<\/p>\n<p>Add an alias or virtual host in your apache configuration file:<\/p>\n<p>Alias \/cacti\/ \/home\/cactiuser\/cacti\/<\/p>\n<p>Save and restart the apache and mysql service.<\/p>\n<p>Post Installation Steps:<\/p>\n<p>Browse the below-mentioned URL:<\/p>\n<p>http:\/\/localhost\/cacti<\/p>\n<p>-OR-<\/p>\n<p>http:\/\/remoteIP\/cacti<\/p>\n<p>1. Click Next<br \/>\n2. Default (New Install) -&gt; Click Next<br \/>\n3. In the third step, you will have to provide the correct path of rrdtool and php<br \/>\nRRDTOOL = \/usr\/local\/rrdtool-1.2.15\/bin\/rrdtool<br \/>\n4. Click Finish<br \/>\n5. Login with Username\/Password: admin\/admin<br \/>\n6. Change Password for user admin<br \/>\n7. Click Save<\/p>\n<p><strong><em>That&#8217;s all cacti is installed!<\/em><\/strong><\/p>\n<p><strong>Article authored by Dileep<\/strong><\/p>\n<p><strong>Author, Dileep, is a Systems Engineer with <a href=\"https:\/\/www.supportpro.com\/\">SupportPRO<\/a>. Dileep specializes in cPanel, Direct Admin and Linux servers. SupportPRO offers 24X7 technical support services to <a href=\"https:\/\/www.supportpro.com\/plans.php\">Web hosting<\/a> companies and service providers.<\/strong><\/p>\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><\/p>\n<p style=\"text-align: center;\"><!--HubSpot Call-to-Action Code --><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><!-- [if lte IE 8]><\/p>\n\n\n\n\n\n<div id=\"hs-cta-ie-element\"><\/div>\n\n\n<![endif]--><a href=\"https:\/\/www.supportpro.com\/freecheckup.php\"><img decoding=\"async\" id=\"hs-cta-img-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-img\" style=\"border-width: 0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b.png\" alt=\"Server not running properly? Get A FREE Server Checkup By Expert Server Admins - $125 Value\" \/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '9d590242-d641-4383-94b4-8cfd62f0af6b', {}); <\/script><\/span><!-- end HubSpot Call-to-Action Code --><\/p>\n","protected":false},"excerpt":{"rendered":"<p>About Cacti Cacti is a PHP\/MySQL front end to rrdtool. It handles the storage of all the information required to create and populate rrdtool graphs. Along with being able to&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-23","post","type-post","status-publish","format-standard","hentry","category-technical-articles"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/23","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=23"}],"version-history":[{"count":10,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions"}],"predecessor-version":[{"id":13223,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/23\/revisions\/13223"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=23"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=23"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=23"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}