Nagios Conference 2011 - Tony Roman - Cacti Workshop


Published on

Tony Roman's workshop on Cacti. The workshop was given during the Nagios World Conference North America held Sept 27-29th, 2011 in Saint Paul, MN. For more information on the conference (including photos and videos), visit:

Published in: Technology
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Nagios Conference 2011 - Tony Roman - Cacti Workshop

  1. 1. Cacti Workshop Tony Roman [email_address]
  2. 2. Agenda <ul><li>What is Cacti? </li></ul><ul><li>The Origins of Cacti </li></ul><ul><li>Large Installation Considerations </li></ul><ul><li>Automation </li></ul><ul><li>The Current State of Cacti </li></ul><ul><li>The Future of Cacti </li></ul><ul><li>Questions and Answers </li></ul>2011
  3. 3. What is Cacti? <ul><li>Cacti is the complete front-end for RRDtool! </li></ul><ul><li>Written in PHP </li></ul><ul><li>Optional C based poller (Spine) </li></ul><ul><li>Stores all of the necessary information to create graphs and gather data in a MySQL database. </li></ul><ul><li>Full SNMP support for data gathering </li></ul><ul><li>Ability to use custom scripts for data gathering </li></ul><ul><li>User community created templates for most popular devices </li></ul>2011
  4. 4. The Origins of Cacti <ul><li>Started by Ian Berry in 2001 while he was in High School </li></ul><ul><li>Published as a ‘free’ application on website </li></ul><ul><li>Discovered by many while in search for a replacement for … (you name it) </li></ul><ul><li>Several ink-u-Berry releases and new developers through 2004 </li></ul><ul><li>Widespread global use began after the release of 0.8.6 in the summer of 2004 </li></ul>2011
  5. 5. Large Installation Considerations 2011 Nagios World Conference
  6. 6. Hardware <ul><li>CPU </li></ul><ul><ul><li>The more the better! </li></ul></ul><ul><ul><li>Dependent on the number of devices and data sources being polled </li></ul></ul><ul><ul><li>More concurrent processes (polling, graph generation, web interface, etc…) </li></ul></ul><ul><li>Memory </li></ul><ul><ul><li>The more the better! </li></ul></ul><ul><ul><li>Increase memory to increase the OS disk cache </li></ul></ul><ul><ul><li>More memory to be allocated to MySQL </li></ul></ul>2011
  7. 7. Hardware <ul><li>Disk I/O </li></ul><ul><ul><li>The more I/O operations per second the better! </li></ul></ul><ul><ul><li>Increase memory to increase OS disk cache </li></ul></ul><ul><ul><li>Increase number of spindles in RAID configuration </li></ul></ul><ul><ul><li>Utilize RAID levels that incorporate striping (RAID 10 optimal) </li></ul></ul><ul><ul><li>Fiber channel storage area network (SAN) with appropriate raid level configuration </li></ul></ul><ul><ul><li>Solid State Drives </li></ul></ul><ul><ul><li>Fusion I/O or OCZ PCI Express non-volatile memory storage solutions </li></ul></ul>2011
  8. 8. Hardware <ul><li>Examples of Disk I/O success </li></ul><ul><ul><li>From unable to complete polling for 160,000 data sources in 5 minutes to completing in less than 1 minute by using a Fusion I/O device to store the RRDTool files. </li></ul></ul><ul><ul><li>Fusion I/O write speeds of 3.2 Gigabytes per second seen in operation on Cacti installations. </li></ul></ul>2011
  9. 9. Service Separation <ul><li>What is service separation? </li></ul><ul><ul><li>Cacti Components </li></ul></ul><ul><ul><ul><li>Web Interface </li></ul></ul></ul><ul><ul><ul><li>Polling and RRDtool storage </li></ul></ul></ul><ul><ul><ul><li>Database </li></ul></ul></ul><ul><ul><li>Any of these services can be split to another server. </li></ul></ul><ul><ul><li>Web interface needs access to RRDtool files </li></ul></ul><ul><ul><ul><li>Network File System (NFS or CIFS) </li></ul></ul></ul><ul><ul><ul><li>Shared LUN on SAN </li></ul></ul></ul><ul><ul><ul><li>Replication (Rsync can be intense because RRDtool files all change) </li></ul></ul></ul><ul><ul><ul><li>Disk/SAN or file system replication </li></ul></ul></ul>2011
  10. 10. MySQL Optimization <ul><li>MyISAM vs InnoDB </li></ul><ul><ul><li>MyISAM great for small installation with minimal users </li></ul></ul><ul><ul><li>InnoDB row level locking, unlike MyISAM table level locking, allowing for more concurrent operations </li></ul></ul><ul><ul><li>InnoDB is transaction safe, meaning that data integrity is maintained throughout the entire query operation </li></ul></ul><ul><li>Increase MySQL memory usage for caching and sorts. </li></ul>2011
  11. 11. MySQL Optimization <ul><li>Memory (Hash) tables </li></ul><ul><ul><li>Best for Poller Output tables in Cacti </li></ul></ul><ul><ul><ul><li>Uses system memory which is faster than disk </li></ul></ul></ul><ul><ul><ul><li>Minimizes disk I/O used by database during polling </li></ul></ul></ul><ul><ul><li>System must have the memory available to store the Hash table completely in RAM for all the data sources during a polling cycle. </li></ul></ul><ul><ul><li>Contents erased on MySQL restart or server reboot </li></ul></ul><ul><ul><li>Optimization of the poller_output.output field size to be smaller than varchar(256) if possible. </li></ul></ul>2011
  12. 12. Plugin Architecture and Boost Plugin <ul><li>Graph image caching </li></ul><ul><li>On demand RRDTool file updates </li></ul><ul><li>Integration with Spine for direct inserts into Boost poller output table </li></ul><ul><li>Boost Server </li></ul><ul><ul><li>Allows for independent updating of RRDtool files </li></ul></ul><ul><ul><li>Can use rrdtool-update to improve performance </li></ul></ul><ul><ul><li>Can run from another server for separation of services </li></ul></ul>2011
  13. 13. Automation 2011 Nagios World Conference
  14. 14. Automation with Command Line Tools <ul><li>Command line tools </li></ul><ul><ul><li>Limited support in current version, primarily adding devices, graph templates, permissions and users. </li></ul></ul><ul><ul><li>Future version to bring full set of scripts </li></ul></ul><ul><ul><ul><li>Create, delete and list devices </li></ul></ul></ul><ul><ul><ul><li>Create, delete and list graph trees </li></ul></ul></ul><ul><ul><ul><li>Create, delete and list permissions </li></ul></ul></ul><ul><ul><ul><li>Create, delete and list graphs </li></ul></ul></ul><ul><ul><ul><li>Add, remove, update and list data query associations </li></ul></ul></ul><ul><ul><ul><li>Upgrade the database! </li></ul></ul></ul>2011
  15. 15. Automation with Plugins – Autom8 <ul><li>Autom8 </li></ul><ul><ul><li>Creates new graphs automatically when a device is added </li></ul></ul><ul><ul><li>Creates new tree elements automatically </li></ul></ul><ul><ul><li>All creation activities are based on rule you define </li></ul></ul><ul><ul><ul><li>Only create 64 bit counter graphs on SNMPv2 and higher capable devices </li></ul></ul></ul><ul><ul><ul><li>Only create graphs for interfaces that are “Up” </li></ul></ul></ul><ul><ul><li>Triggered graph creations on: </li></ul></ul><ul><ul><ul><li>New device is added via CLI or web interface </li></ul></ul></ul><ul><ul><ul><li>When a re-index occurs of a data query </li></ul></ul></ul>2011
  16. 16. Automation with Plugins - Discovery <ul><li>Discovery </li></ul><ul><ul><li>Auto discovery SNMP enabled devices on the network </li></ul></ul><ul><ul><li>Auto creations of graph (can use Autom8 for this) </li></ul></ul><ul><ul><li>Allow you to select which discovered devices you would like to graph </li></ul></ul>2011
  17. 17. The State of and Future of Cacti 2011 Nagios World Conference
  18. 18. Current State of Cacti <ul><li>The Cacti Group is alive and well! </li></ul><ul><li>0.8.7h Released </li></ul><ul><ul><li>Lossless re-indexing of hosts </li></ul></ul><ul><ul><li>Poller performance enhancements </li></ul></ul><ul><ul><li>Additional template import options </li></ul></ul><ul><ul><li>RRDtool 1.4.x support </li></ul></ul><ul><ul><li>Improved Spine performance </li></ul></ul><ul><ul><li>Per host parallelization support in Spine </li></ul></ul>2011
  19. 19. The Future of Cacti <ul><li>Development of the next version </li></ul><ul><ul><li>200+ commits by developers in August of this year </li></ul></ul><ul><ul><li>Internationalization support </li></ul></ul><ul><ul><li>Integrated plugin architecture </li></ul></ul><ul><ul><li>Improved installation and platform specific setup </li></ul></ul><ul><ul><li>Extended RRDtool support </li></ul></ul><ul><ul><li>Command line scripts enhancements </li></ul></ul><ul><ul><li>Updated graph presentation (AJAX) </li></ul></ul><ul><ul><li>Web 2.0 Interface (AJAX) </li></ul></ul>2011
  20. 20. Cacti 1.0.0 – Teaser! 2011
  21. 21. Questions and Answers 2011 Nagios World Conference