pax_global_header00006660000000000000000000000064136270306620014517gustar00rootroot0000000000000052 comment=39683a8e582ae1e7d6bfed2aba8b06ec668385bf documentation-release-1.2.10/000077500000000000000000000000001362703066200160675ustar00rootroot00000000000000documentation-release-1.2.10/.gitignore000066400000000000000000000003311362703066200200540ustar00rootroot00000000000000# Ignore vim swap files *.swp # Ignore any mac DS_Store files .DS_Store # Ignore build HTML output html/* # Ignore local test filese footer.html include/* manual/* # Ignore any CertBot files .well-known .well-known/* documentation-release-1.2.10/.mdl_style.rb000066400000000000000000000007741362703066200204760ustar00rootroot00000000000000# customize style guide all rule "MD010", code_blocks: false rule "MD013", code_blocks: false, tables: false rule "MD029", style: "ordered" rule "MD046", style: "fenced" # Lesser rules exclude_rule "MD010" # hard tabs #exclude_rule "MD013" # line length # Rule Exclusions exclude_rule "MD001" # Headers are useful in other ways exclude_rule "MD024" # Headers with same name are useful, but break link labeling (Rework needed on affected files before enabling this rule) exclude_rule "MD046" # seems broken documentation-release-1.2.10/.mdlrc000066400000000000000000000000741362703066200171720ustar00rootroot00000000000000# mdl cli configuration style ".mdl_style.rb" verbose false documentation-release-1.2.10/.travis.yml000066400000000000000000000017421362703066200202040ustar00rootroot00000000000000before_install: - gem install mdl script: - ./bin/check_missing_link.sh - ./bin/check_markdown_style.sh notifications: email: on_success: change on_failure: always recipients: - developers@cacti.net slack: on_success: change on_failure: always rooms: - secure: VjWdzdjUSMGwKCObjuyCOwyzCUV+LDwPsUxdmgPojTLGgZS12QOQxD0QNRUkvvtaus2SgbFP/B49NYsqOGrRCFy21aa2goNcqCXUlty8Pcs4L1NIT3L4rmC5DjwKtlL6sO9/HwbS1woFE7fhZ1KA2nIoTHYeGCZFpW1gGpm9VUEbab9m9gP3HagtULInzx02M7vVHA6WwgumWpYqX62St6Tb11YK0SjkUYRKuZN8Ezf8euChEN6OwFwmJnDbKc37kYPHy7SLCKJ3Vy9wbw8O+tYLf8sNauHu0XJGaTg1cvDMbNwLdVBcV6CeaVZTkLyPY46UJ0wprIieKu+HxCQT6CNX4UT3qd27OFtlNDnsJ1o/9f6OKjnRTqPcF6ynLZuzWVIvnPo45bsafvDl/AcfYnm0c4UG+gCZnyMfr432WJ+RJxYZvPgqCEwiweQQMvBSSD3GP2/lbYNRCgI/NU9JDEEWWrYMj/cJxDn1qvKJmdNj4W9nFnF1BqAldzVAQQgLO04K215t1skENChyvEi4+ocZ2A2EwGx582d2PrIK0CpQHcQKxAZl5TwKiuIFQlIOCqh8vt45KG1mY/t9FmVbyhxtrlMdjAAd/6Rxh7aICJQ0PQc0Lw9LX1f2a9/JBNrQ4QxRo/xco4ZI9AfonG5PbMxHEusnfeTC3ZnFU6y+P3I= documentation-release-1.2.10/Aggregate-Templates.md000066400000000000000000000013651362703066200222400ustar00rootroot00000000000000# Aggregate Templates This section will describe **Aggregate Templates** in Cacti. ![Aggregate Templates](images/aggregate-templates.png) ![Aggregate Templates Edit General Options](images/aggregate-templates-edit1.png) ![Aggregate Templates Edit Canvas Options](images/aggregate-templates-edit2.png) ![Aggregate Templates Edit Common Options](images/aggregate-templates-edit3.png) ![Aggregate Templates Edit Scaling Options](images/aggregate-templates-edit4.png) ![Aggregate Templates Edit Grid Options](images/aggregate-templates-edit5.png) ![Aggregate Templates Edit Axis Options](images/aggregate-templates-edit6.png) ![Aggregate Templates Edit Legend Options](images/aggregate-templates-edit7.png) --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/Aggregates.md000066400000000000000000000001731362703066200204630ustar00rootroot00000000000000# Aggregate Graphs This section will describe **Aggregate Graphs** in Cacti. --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/Automation-Networks.md000066400000000000000000000027461362703066200223540ustar00rootroot00000000000000# Automation Networks This section will describe **Automation Networks** in Cacti. Adding a network to scan in the automation plugin is easy on the main console click Automation once on the below page click the + on the top right of the page ![Automation Networks](images/automation-network-main.png) You will now see the below page for example if you want to scan 192.168.1.0/24 you would enter that in the subnet range textbox and you will need to enter the subnet in CIDR format Other important options are Optiom | Descriptiom --- | --- Schedule type | How often you want to scan this subnet for devices Discovery threads | How many proccessess to spawn during the scan Max Runtime | to prevent the scan from running indefinetly Automatically add to cacti | If a device is SNMP reachable and matches a rule from this subnet the device will be added Netbios | Attempt to resolve the hostname by netbios After you are done adding your network details, ensure you enable the rule and save. ![Automation Networks Edit General](images/automation-networks-edit1.png) Ensure that if you have a SNMP rule for this part of the network to select the SNMP option set this will tie the network to the SNMP rules ![Automation Networks Edit General](images/automation-reachability-settings.png) To begin the scanner click on the bottom right drop down and select "Discover Now" this will start the discovery ![Automation Networks](images/automation-networks.png) --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/CDEFs.md000066400000000000000000000004051362703066200172740ustar00rootroot00000000000000# CDEFs This section will describe **CDEFs** in Cacti. ![CDEFs](images/cdefs.png) ![CDEFs Edit](images/cdefs-edit1.png) ![CDEFs Item Edit](images/cdefs-edit2.png) ![CDEFs Item Type Edit](images/cdefs-edit3.png) --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/Color-Templates.md000066400000000000000000000026221362703066200214250ustar00rootroot00000000000000# Color Templates **Color Templates** define a list of Colors to be used for **Aggregate Graphs** in Cacti. As you add **Graphs** to an **Aggregate Graph**, you need to distinguish one **Graph** from the next within the **Aggregate Graph**. These **Color Templates** are a list of colors that will be looped through in Round Robin fashion to render the **Aggregate Graph**. So, for example, if your **Color Template** uses 8 differing **Colors**, and your **Aggregate Graph** includes 16 *Graph Items*, then each color will be used twice in the **Aggregate Graph**. Below, you can see the four standard **Color Templates**, you can see that you have the ability to either *Delete* or *Duplicate* the **Color Templates**. As with other Cacti objects, you will not be allowed to *Delete* a **Color Template** in use. ![Color Templates](images/color-templates.png) In the image below, you can see the **Color Template** edit screen. This simply screen allows you to add, remove and re-order colors in the list. ![Color Templates Edit](images/color-templates-edit1.png) Shown in the image below, only Cacti **Colors** are allowed to be selected for Aggregate **Color Templates**. The **Color** drop down can by typed into if you wish to search through the list of approximately 340 legacy and *Named Colors*. ![Color Templates Item Edit](images/color-templates-edit2.png) --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/Colors.md000066400000000000000000000026601362703066200176560ustar00rootroot00000000000000# Colors Colors in Cacti come in two types and used to maintain a list of colors that can be used in Cacti for **Graph Templates** and **Graphs**. The first type are the legacy Cacti colors imported from earlier versions of Cacti. Starting with Cacti 1.0, Cacti started to support the concept of *Named Colors* which come from a well known dictionary of well defined colors. *Named Colors* are read only in Cacti. While the legacy Cacti colors can be named as the Cacti administrator desires. The image below shows a list of Cacti *Named Colors*. You can see that there is a search bar and check boxes for showing just *Named Colors* or all colors, and another check box for showing Colors that are used in **Graph Templates** and *Graphs*. You can not remove either the *Named Colors* or Colors that are in use by either a **Graph Template** or **Graph**. ![Colors](images/colors.png) The image below is the Color edit screen. If the color is read only, you can open this page, but not change any of the details. For legacy Cacti colors, or for Colors added by the Cacti Administrator, you can change the name and the Color hex value. ![Colors Edit](images/colors-edit1.png) Below, you can see the color picker that allows you to visually find the appealing color. You can also use hex values that were previously supported in earlier Cacti version. ![Colors Color Edit](images/colors-edit2.png) --- Copyright (c) 2004-2020 The Cacti Group documentation-release-1.2.10/Command-Line-Scripts.md000066400000000000000000001264611362703066200223130ustar00rootroot00000000000000# Command Line Scripts Cacti supports a number of command line scripts. You will find them in the `./cli` directory. As of current, following scripts are supported: add_device.php add_data_query.php add_graph_template.php add_graphs.php add_perms.php add_tree.php copy_user.php input_whitelist.php poller_graphs_reapply_names.php poller_output_empty.php poller_reindex_hosts.php rebuild_poller_cache.php The following scripts should only be used when recommended in response to an outstanding issue: analyze_database.php audit_database.php convert_tables.php install_cacti.php md5sum.php rebuild_poller_cache.php repair_database.php repair_graphs.php repair_templates.php splice_rra.php sqltable_to_php.php structure_rra_paths.php upgrade_database.php Package maintainers may wish to utilize the CLI methods of install_cacti.php and upgrade_database.php to perform in place installations and upgrades. > **Caution** > > In the following examples, several numbers are shown as output from various > scripts. They will vary between different installations. So don't bother, if > your numbers will vary ## Rebuild Poller Cache The poller cache holds all commands that cacti will issue during the polling process in an internal format. It is possible, to review the current contents of the poller cache by visiting `System Utilities`, `View Poller Cache`. It is possible to apply filters to this view; it will show up like ```console Localhost - Hard Drive Space Script Server: /var/www/html/cacti/scripts/ss_host_disk.php ss_host_disk 127.0.0.1 1 1:161:500:somesecret:::::: get total 6 RRD: /var/www/html/cacti/rra/localhost_hdd_total_61.rrd Localhost - Load Average Script: /usr/bin/perl /var/www/html/cacti/scripts/loadavg_multi.pl RRD: /var/www/html/cacti/rra/localhost_load_1min_5.rrd Localhost - Logged in Users Script: /usr/bin/perl /var/www/html/cacti/scripts/unix_users.pl RRD: /var/www/html/cacti/rra/localhost_users_6.rrd Localhost - Memory - Free Script: /usr/bin/perl /var/www/html/cacti/scripts/linux_memory.pl MemFree: RRD: /var/www/html/cacti/rra/localhost_mem_buffers_3.rrd Localhost - Memory - Free Swap Script: /usr/bin/perl /var/www/html/cacti/scripts/linux_memory.pl SwapFree: RRD: /var/www/html/cacti/rra/localhost_mem_swap_4.rrd Localhost - mtaReceivedMessages SNMP Version: 1, Community: somesecret, OID: .1.3.6.1.2.1.28.1.1.1.1 RRD: /var/www/html/cacti/rra/localhost_mtareceivedmessages_47.rrd Localhost - mtaReceivedVolume SNMP Version: 1, Community: somesecret, OID: .1.3.6.1.2.1.28.1.1.4.1 RRD: /var/www/html/cacti/rra/localhost_mtareceivedvolume_49.rrd ``` There are several circumstances, that may result in the poller cache being out of sync. An example would be a change of the name of a script used in a `Data Input Method`. This change is *not* automatically propagated to the poller cache. It is required, to run `php -q rebuild poller_cache.php` manually. Calling the script with the parameter `--help` yields ```console shell>php -q rebuild_poller_cache.php --help Cacti Rebuild Poller Cache Script 1.0, Copyright 2004-2018 - The Cacti Group usage: rebuild_poller_cache.php [-d] [-h] [--help] [-v] [--version] -d - Display verbose output during execution -v --version - Display this help message -h --help - Display this help message ``` Debug mode lists the data sources items that are worked upon. ```console shell>php -q rebuild_poller_cache.php -d WARNING: Do not interrupt this script. Rebuilding the Poller Cache can take quite some time DEBUG: There are '38' data source elements to update. DEBUG: Data Source Item '1' of '38' updated DEBUG: Data Source Item '2' of '38' updated DEBUG: Data Source Item '3' of '38' updated DEBUG: Data Source Item '4' of '38' updated .... ``` Without any parameter, some dots are shown as progress indicators. ```console shell>php -q rebuild_poller_cache.php WARNING: Do not interrupt this script. Rebuilding the Poller Cache can take quite some time ...................................... shell> ``` > **Caution** > > Rebuilding the poller cache interferes with the poller operation. Make sure > that the poller is not running and will not start during a rebuild operation ## Re-Index Hosts Re-Indexing is required only for SNMP/Script Data Queries. Remember, that when applying a Data Query to a Host, a `Re-Index Method` has to be chosen. This reindex method governs the automatic re-indexing based on specific events. ###### Table 20-1. Re-Index Methods Re-Index Method | Description --- | --- Uptime Goes Backwards | Refers to a system reboot Index Count Changed | Refers to a change of the number of indexed items Verify All Fields | All index fields of the according XML file are checked for changes If the method is set to `Uptime Goes Backwards`, Cacti will detect if the target has been rebooted by querying sysUptime (.1.3.6.1.2.1.1.3.0). If the current value for the uptime is lower than the previous one (uptime goes backwards), a reboot is assumed and a re-index is performed If the method is set to `Index Count Change`, e.g. the number of interfaces, without checking sysUptime. It is of particular interest in cases, where indexed entries may change without the need of a reboot. As modern operating systems seldom require reboots for system configuration changes, you may want to consider this setting for many cases (e.g. creating of a new filesystem without a reboot). The index to be considered is defined by the according XML file. If the method is set to `Verify All Fields`, all indexes of the data source are checked for changes. This is of particular interest e.g. in cases, where the index is non-numeric (e.g. a MAC address). It should be noted that in the 1.0 and 1.1 releases, this method was found to be broken and has been corrected since 1.2. If you feel the need for manual re-indexing, you may run it from CLI. Calling the script with the parameter `--help` yields ```console shell>php -q poller_reindex_hosts.php --help Cacti Reindex Host Script 1.2, Copyright 2004-2018 - The Cacti Group usage: poller_reindex_hosts.php --id=[host_id|All] [--qid=[ID|All]] [--host-descr=[description]] [-d] [-h] [--help] [-v] [--version] --id=host_id - The host_id to have data queries reindexed or 'All' to reindex all hosts --qid=query_id - Only index on a specific data query id; defaults to 'All' --host-descr=description - The host description to filter by (SQL filters acknowledged) --debug - Display verbose output during execution -v --version - Display this help message -h --help - Display this help message ``` Running it in debug mode for the host with `id=2` may yield ```console shell>php -q poller_reindex_hosts.php -id=2 -d WARNING: Do not interrupt this script. Reindexing can take quite some time DEBUG: There are '1' data queries to run DEBUG: Data query number '1' host: '2' SNMP Query Id: '1' starting DEBUG: Data query number '1' host: '2' SNMP Query Id: '1' ending ``` A silent run for all devices is issued by ```console shell>php -q poller_reindex_hosts.php -id=All WARNING: Do not interrupt this script. Reindexing can take quite some time .....shell> ``` You may run this script against a specific data query id using `--qid=[data query id]` like ```console shell>php -q poller_reindex_hosts.php --id=All --qid=1 -d WARNING: Do not interrupt this script. Reindexing can take quite some time DEBUG: There are '3' data queries to run DEBUG: Data query number '1' host: '1' SNMP Query Id: '1' starting DEBUG: Data query number '1' host: '1' SNMP Query Id: '1' ending DEBUG: Data query number '2' host: '2' SNMP Query Id: '1' starting DEBUG: Data query number '2' host: '2' SNMP Query Id: '1' ending DEBUG: Data query number '3' host: '15' SNMP Query Id: '1' starting DEBUG: Data query number '3' host: '15' SNMP Query Id: '1' ending ``` It is possible, to select a host based on its host description using `--host-descr=[host description]`. It is allowed to apply an SQL filter expression for the description like `--qid=some%descr`. Use this parameter in conjunction with either `--id=[host id]` or `--qid=[data query id]` or both: ```console shell>php -q poller_reindex_hosts.php --id=All --qid=1 --host-descr=ga%f -d WARNING: Do not interrupt this script. Reindexing can take quite some time DEBUG: There are '1' data queries to run DEBUG: Data query number '1' host: '2' SNMP Query Id: '1' starting DEBUG: Data query number '1' host: '2' SNMP Query Id: '1' ending ``` > **Caution** > > Re-Indexing interferes with the poller operation. Make sure that the > poller is not running and will not start during a reindex operation ## Empty Poller Output Table During normal poller operation, all retrieved results are intermediately stored in the table named poller_output After execution of cmd.php or Spine, this table holds all results. The poller.php finally issues all rrdtool update operations. Thus, after polling has completed, the table should be empty. Conditions may arise, where the table is not (completely) emptied. The most often known issue is lack of php memory. In those cases, the table is bigger than the php memory size, thus not all items are handled correctly. If that issue occurs, you may save all pending updates *after increasing PHP memory appropriately* by running this very script. Calling the script with the parameter `--help` yields ```console shell>php -q poller_output_empty.php --help Cacti Empty Poller Output Table Script 1.0, Copyright 2004-2018 - The Cacti Group usage: poller_output_empty.php [-h] [--help] [-v] [--version] -v --version - Display this help message -h --help - Display this help message ``` You see, no parameter is required for operating successfully. Under normal circumstances, running this script should yield ```console shell>php -q poller_output_empty.php There were 0, RRD updates made this pass shell> ``` In case, you hit the poller process or if the table was really not fully processed, you may find ```console shell>php -q poller_output_empty.php OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.04 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.00 r:0.05 OK u:0.00 s:0.01 r:0.06 There were 21, RRD updates made this pass shell> ``` If logging level verbosity was switched to `DEBUG` you may find additional debug messages that usually show up in `cacti.log` ## Reapply Suggested Names to Graphs For a general understanding of suggested names used with data queries, please see ?. Be aware, that changes to the `Suggested Names` section of a data query will not automatically be propagated to all existing graphs. This is, where poller_graphs_reapply_names.php drops in. Calling the script with the parameter `--help` yields ```console shell>php -q poller_graphs_reapply_names.php --help Cacti Reapply Graph Names Script 1.0, Copyright 2004-2018 - The Cacti Group usage: poller_graphs_reapply_names.php -id=[host_id|All][host_id1|host_id2|...] [-s=[search_string] [-d] [-h] [--help] [-v] [--version] -id=host_id - The host_id or 'All' or a pipe delimited list of host_id's -s=search_str - A graph template name or graph title to search for -d - Display verbose output during execution -v --version - Display this help message -h --help - Display this help message ``` Assume a situation, where the suggested names where changed for the standard data query named `SNMP - Get Mounted Partitions`. In this case, you will want to rework all graphs for this data query only. A verbose run will yield ```console shell>php -q poller_graphs_reapply_names.php -id=All -d -s="Used space" WARNING: Do not interrupt this script. Interrupting during rename can cause issues DEBUG: There are '6' Graphs to rename DEBUG: Graph Name 'Localhost - Used Space - Memory Buffers' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - Memory Buffers' DEBUG: Graph Name 'Localhost - Used Space - Real Memory' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - Real Memory' DEBUG: Graph Name 'Localhost - Used Space - Swap Space' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - Swap Space' DEBUG: Graph Name 'Localhost - Used Space - /' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - /' DEBUG: Graph Name 'Localhost - Used Space - /sys' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - /sys' DEBUG: Graph Name 'Localhost - Used Space - /boot' starting DEBUG: Graph Rename Done for Graph 'Localhost - Used Space - /boot' ``` Notice the miss-spelling of the word “Space”. The `-s=` option is not case sensitive. ## Copy Local Cacti Users For use and understanding the limitation of this script, it is of importance to read [User Management](User-Management.md) Calling the script with the parameter `--help` yields ```console shell>php -q copy_user.php --help Cacti Copy User Utility, Version 1.2.0, Copyright (C) 2004-2018 The Cacti Group usage: copy_cacti_user.php