Cacti (home)ForumsDocumentation


This shows you the differences between two versions of the page.

manual:100:3a_advanced_topics.0_overview [2012/05/20 12:13] (current)
Line 1: Line 1:
 +====== Advanced Topics ======
 +This chapter shows how to extend Cacti's build-in capabilities with scripts and queries. Some of them are of course part of the standard Cacti distribution files. 
 +Scripts and Queries extend Cacti's capabilities beyond SNMP. They allow for data retrieval using custom-made code. This is not even restricted to certain programming languages; you'll find php, perl, shell/batch and more.
 +These scripts and queries are executed locally by Cacti's poller. But they may retrieve data from remote hosts by different protocols, e.g.
 +  * ICMP; e.g. ping to measure round trip times and availability
 +  * telnet; e.g. programming telnet scripts to retrieve data available to sysadmins only
 +  * ssh; much like telnet, but more secure (and more complicated)
 +  * http(s); invoke remote cgi scripts to retrieve data via a web server or parse web pages for statistical data (e.g. some network printers)
 +  * snmp; e.g. use net-snmp's exec/pass functions to call remote scripts and get data
 +  * ldap: e.g. to retrieve statistical about your ldap server's activities
 +  * use your own; e.g. invoke nagios agents
 +  * ... and much more ...
 +There a two ways extending Cacti's build-in capabilities:
 +  * [[3a_advanced_topics.1_data_input_methods#data_input_methods|Data Input Methods]] for querying single or multiple, but **non-indexed** readings
 +    * temperature, humidity, wind, ...
 +    * cpu, memory usage
 +    * number of users logged in
 +    * IP readings like ipInReceives (number of ip packets received per host)
 +    * TCP readings like tcpActiveOpens (number of tcp open sockets)
 +    * UDP readings like udpInDatagrams (number of UDP packets received)
 +    * ...
 +  * [[3a_advanced_topics.3_data_queries#data_queries|Data Queries]] for **indexed readings**
 +    * network interfaces with e.g. traffic, errors, discards
 +    * other SNMP Tables, e.g. hrStorageTable for disk usage
 +    * you may even create Data Queries as scripts e.g. for querying a name server (index = domain) for requests per domain
 +By using the [[.:3_templates.4_import_templates#template_import_export|Exporting and Importing]] facilities, it is possible to share your results with others.
 +==== Common Tasks ====
 +In principle, it is possible to divide the following tasks into three different parts:
 +  * how to **retrieve data**
 +  * how to **store data**
 +  * how to **present data**
 +{{:manual:088:data-input-method-and-query.png|Basic Principle of Operation for Data Input Method and Data Query}}

Personal Tools