Differences
This shows you the differences between two versions of the page.
— |
manual:100:6_reference.4_cli_script.4_reapply_suggested_names [2019/10/29 15:16] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Reapply Suggested Names to Graphs ==== | ||
+ | For a general understanding of suggested names used with data queries, please see [[3a_advanced_topics.3b_snmp_data_query_walkthrough#revisiting_the_data_query|Associated Graph Templates]]. 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 | ||
+ | |||
+ | <code>shell>php -q poller_graphs_reapply_names.php --help | ||
+ | Cacti Reapply Graph Names Script 1.0, Copyright 2007 - 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</code> | ||
+ | |||
+ | 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 | ||
+ | |||
+ | <code>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'</code> | ||
+ | |||
+ | Please notice my miss-spelling of the word //"Space"//. The //-s=// option is not case sensitive. |