diff --git a/include/config_form.php b/include/config_form.php index d4a8e38b7..123a4f9e9 100644 --- a/include/config_form.php +++ b/include/config_form.php @@ -647,7 +647,7 @@ $fields_host_edit = array( "friendly_name" => "SNMP Community", "description" => "Fill in the SNMP read community for this device.", "value" => "|arg1:snmp_community|", - "default" => "public", + "default" => read_config_option("snmp_community"), "form_id" => "|arg1:id|", "max_length" => "100", ), @@ -656,6 +656,7 @@ $fields_host_edit = array( "friendly_name" => "SNMP Username", "description" => "Fill in the SNMP username for this device (v3).", "value" => "|arg1:snmp_username|", + "default" => read_config_option("snmp_username"), "max_length" => "50", ), "snmp_password" => array( @@ -663,6 +664,7 @@ $fields_host_edit = array( "friendly_name" => "SNMP Password", "description" => "Fill in the SNMP password for this device (v3).", "value" => "|arg1:snmp_password|", + "default" => read_config_option("snmp_password"), "max_length" => "50", ), "snmp_version" => array( @@ -670,6 +672,7 @@ $fields_host_edit = array( "friendly_name" => "SNMP Version", "description" => "Choose the SNMP version for this host.", "value" => "|arg1:snmp_version|", + "default" => read_config_option("snmp_ver"), "array" => $snmp_versions, ), "snmp_port" => array( @@ -677,7 +680,7 @@ $fields_host_edit = array( "friendly_name" => "SNMP Port", "description" => "Enter the UDP port number to use for SNMP (default is 161).", "value" => "|arg1:snmp_port|", - "default" => "161", + "default" => read_config_option("snmp_port"), "max_length" => "5", "size" => "15" ), diff --git a/include/config_settings.php b/include/config_settings.php index 1fe447a63..f3549b34d 100644 --- a/include/config_settings.php +++ b/include/config_settings.php @@ -82,8 +82,9 @@ $settings = array( ), "path_cactilog" => array( "friendly_name" => "Cacti Log File Path", - "description" => "The path to your Cacti log file (if blank, defaults to cacti/log/rrd.log)", + "description" => "The path to your Cacti log file (if blank, defaults to /log/cacti.log)", "method" => "textbox", + "default" => read_config_option("path_webroot") . "/log/cacti.log", "max_length" => "255" ), "pollerpaths_header" => array( @@ -165,12 +166,40 @@ $settings = array( "method" => "spacer", ), "snmp_version" => array( - "friendly_name" => "SNMP Version", - "description" => "The type of SNMP you have installed.", + "friendly_name" => "SNMP Utility Version", + "description" => "The type of SNMP you have installed. Only required if you don't use the embedded SNMP in PHP.", "method" => "drop_array", "default" => "net-snmp", "array" => $snmp_implimentations, ), + "snmp_ver" => array( + "friendly_name" => "SNMP Poller Version Default", + "description" => "Default SNMP read community.", + "method" => "drop_array", + "default" => "Version 1", + "array" => $snmp_versions, + ), + "snmp_community" => array( + "friendly_name" => "SNMP Community", + "description" => "Default SNMP read community for polling hosts.", + "method" => "textbox", + "default" => "public", + "max_length" => "100", + ), + "snmp_username" => array( + "friendly_name" => "SNMP v3 Username", + "description" => "The SNMP v3 Username for polling hosts.", + "method" => "textbox", + "default" => "", + "max_length" => "100", + ), + "snmp_password" => array( + "friendly_name" => "SNMP v3 Password", + "description" => "The SNMP v3 Password for polling hosts.", + "method" => "textbox", + "default" => "", + "max_length" => "100", + ), "snmp_timeout" => array( "friendly_name" => "SNMP Timeout", "description" => "Default SNMP timeout in milli-seconds.", @@ -178,6 +207,13 @@ $settings = array( "default" => "500", "max_length" => "100", ), + "snmp_port" => array( + "friendly_name" => "SNMP Port Number", + "description" => "The UDP port to be used for SNMP Calls. Typically 161.", + "method" => "textbox", + "default" => "161", + "max_length" => "100", + ), "snmp_retries" => array( "friendly_name" => "SNMP Retries", "description" => "The number of SNMP retries for host polling.",