".__('Agent configuration'); if (isset($_GET["create_agent"])){ $create_agent = 1; echo " > ".__('Create agent'); } else { echo " > ".__('Update agent'); } echo ""; echo "
"; // Agent remote configuration editor $agent_md5 = md5($nombre_agente, FALSE); if (isset($_GET["disk_conf"])){ require ("agent_disk_conf_editor.php"); exit; } // Agent remote configuration DELETE if (isset($_GET["disk_conf_delete"])){ $agent_md5 = md5($nombre_agente, FALSE); $file_name = $config["remote_config"] . "/" . $agent_md5 . ".conf"; unlink ($file_name); $file_name = $config["remote_config"] . "/" . $agent_md5 . ".md5"; unlink ($file_name); } echo '
'; echo ''; echo ""; echo '"; } echo '"; echo ''; echo ''; echo '
'.__('Agent name').' '.__('The Agent\'s name must be the same as the one defined at the Console').''; print_input_text ('agente', $nombre_agente, '', 30, 100); if (isset ($id_agente) && $id_agente != "") { echo " "; } // Remote configuration available if (file_exists ($config["remote_config"] . "/" . $agent_md5 . ".md5")) { echo " "; echo ' '.__('You can remotely edit this agent configuration').''; } echo '
'; echo ''.__('IP Address').''; echo ''; print_input_text ('direccion', $direccion_agente, '', 16, 100); if ($create_agent != 1) { echo "    "; echo '"; echo " ".__('Delete selected'); echo "
'.__('Parent').''; echo ''; print_select_from_sql ('SELECT id_agente, nombre FROM tagente ORDER BY nombre', 'id_parent', $id_parent, '', 'None', '0'); echo '
'.__('Group').''; echo ''; print_select_from_sql ('SELECT id_grupo, nombre FROM tgrupo ORDER BY nombre', 'grupo', $grupo, '', '', ''); echo "
"; echo "".__('Interval')."'; echo '
'.__('OS').''; print_select_from_sql ('SELECT id_os, name FROM tconfig_os ORDER BY name', 'id_os', $id_os, '', '', ''); // Network server echo '
'.__('Network Server').''; echo ' '.__('You must select a Network Server for the Agent, so it can work properly with this kind of modules').''; echo ''; $none = ''; $none_value = ''; if ($id_network_server == 0) { $none = __('None'); $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE network_server = 1 ORDER BY name', 'network_server', $id_network_server, '', $none, $none_value); // Plugin Server echo '
'.__('Plugin Server').''; echo ' '.__('You must select a Plugin Server for the Agent, so it can work properly with this kind of modules').''; echo ''; $none_str = __('None'); $none = ''; $none_value = ''; if ($id_plugin_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE plugin_server = 1 ORDER BY name', 'plugin_server', $id_plugin_server, '', $none, $none_value); // WMI Server echo '
'.__('WMI Server').''; echo ' '.__('You must select a WMI Server for the Agent, so it can work properly with this kind of modules').''; echo ''; $none = ''; $none_value = ''; if ($id_wmi_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE wmi_server = 1 ORDER BY name', 'wmi_server', $id_wmi_server, '', $none, $none_value); // Prediction Server echo '
'.__('Prediction Server').''; echo ' '.__('You must select a Prediction Server for the Agent, so it can work properly with this kind of modules').''; echo ''; $none = ''; $none_value = ''; if ($id_prediction_server == 0) { $none = $none_str; $none_value = 0; } print_select_from_sql ('SELECT id_server, name FROM tserver WHERE prediction_server = 1 ORDER BY name', 'prediction_server', $id_prediction_server, '', $none, $none_value); enterprise_hook ('inventory_server'); // Description echo '
'; echo __('Description'); echo ''; print_input_text ('comentarios', $comentarios, '', 45, 255); // Learn mode / Normal mode echo '
'; echo __('Module definition'); pandora_help("module_definition"); echo ''; echo __('Learning mode'); print_radio_button_extended ("modo", 1, '', $modo, false, '', 'style="margin-right: 40px;"'); echo __('Normal mode'); print_radio_button_extended ("modo", 0, '', $modo, false, '', 'style="margin-right: 40px;"'); // Status (Disabled / Enabled) echo '
'.__('Status').''; echo ''; echo __('Disabled'); print_radio_button_extended ("disabled", 1, '', $disabled, false, '', 'style="margin-right: 40px;"'); echo __('Active'); print_radio_button_extended ("disabled", 0, '', $disabled, false, '', 'style="margin-right: 40px;"'); // Remote configuration echo '
'.__('Remote configuration').''; echo ''; $filename = $config["remote_config"] . "/" . $agent_md5 . ".md5"; if (file_exists($filename)){ echo date("F d Y H:i:s.", fileatime($filename)); // Delete remote configuration echo ""; } else { echo ''.__('Not available').''; } echo '
'; if ($create_agent == 1) { print_submit_button (__('Create'), 'crtbutton', false, 'class="sub wand"'); print_input_hidden ('create_agent', 1); } else { print_submit_button (__('Update'), 'updbutton', false, 'class="sub upd"'); print_input_hidden ('update_agent', 1); print_input_hidden ('id_agente', $id_agente); } echo "
"; ?>