Move inventory to open

This commit is contained in:
Calvo 2022-12-22 12:47:03 +01:00
parent 2ad8fac652
commit b46f9c9319
15 changed files with 30 additions and 17 deletions

View File

@ -207,6 +207,6 @@ module_end
module_plugin grep_log /var/log/auth.log Syslog sshd
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software

View File

@ -269,7 +269,7 @@ module_plugin grep_log /var/log/syslog Syslog ssh
#module_description Used memory in KB postprocessed to be in MB
#module_end
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users process ip route

View File

@ -164,5 +164,5 @@ module_end
module_plugin grep_log /var/log/syslog Syslog ssh
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software

View File

@ -379,6 +379,6 @@ module_end
#module_plugin grep_log /var/log/syslog Syslog ssh
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software

View File

@ -272,7 +272,7 @@ module_plugin pandora_df_free
module_plugin grep_log /var/log/auth.log Syslog sshd
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route
# Log collection modules. Only for enterprise version, this will collect log files for forensic analysis.

View File

@ -269,7 +269,7 @@ module_plugin pandora_netusage
# Service autodiscovery plugin
module_plugin autodiscover --default
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
#module_plugin inventory 1 cpu ram video nic hd cdrom software init_services filesystem users route
# Log collection modules. Only for enterprise version, this will collect log files for forensic analysis.

View File

@ -232,6 +232,6 @@ module_end
module_plugin grep_log /var/log/auth.log Syslog sshd
# Plugin for inventory on the agent (Only Enterprise)
# Plugin for invenotry on the agent.
# module_plugin inventory 1 cpu ram video nic hd cdrom software

View File

@ -1685,3 +1685,10 @@ enterprise/operation/agentes/manage_transmap.php
enterprise/operation/agentes/manage_transmap_creation.php
enterprise/operation/agentes/manage_transmap_creation_phases_data.php
enterprise/operation/agentes/transactional_map.php
enterprise/godmode/agentes/inventory_manager.php
enterprise/operation/agentes/agent_inventory.php
enterprise/godmode/modules/manage_inventory_modules.php
enterprise/godmode/modules/manage_inventory_modules_form.php
enterprise/operation/inventory/inventory.php

View File

@ -211,6 +211,7 @@ $result = db_process_sql($sql);
if (db_get_num_rows($sql) == 0) {
echo '&nbsp;</td></tr><tr><td>';
} else {
$table = new stdClass();
$table->width = '100%';
$table->class = 'databox filters';
$table->data = [];

View File

@ -87,10 +87,12 @@ if ($id_os == 0) {
}
$interpreter = (string) get_parameter('interpreter');
$script_mode = (string) get_parameter('script_mode');
$code = (string) get_parameter('code');
$code = base64_encode(str_replace("\r", '', html_entity_decode($code, ENT_QUOTES)));
$format = (string) get_parameter('format');
$block_mode = (int) get_parameter('block_mode', 0);
$script_path = (string) get_parameter('script_path');
// Create inventory module.
if ($create_module_inventory === true) {
@ -102,6 +104,8 @@ if ($create_module_inventory === true) {
'code' => $code,
'data_format' => $format,
'block_mode' => $block_mode,
'script_mode' => $script_mode,
'script_path' => $script_path,
];
$result = (bool) inventory_create_inventory_module($values);
@ -128,6 +132,8 @@ if ($create_module_inventory === true) {
'code' => $code,
'data_format' => $format,
'block_mode' => $block_mode,
'script_mode' => $script_mode,
'script_path' => $script_path,
];
$result = inventory_update_inventory_module($id_module_inventory, $values);
@ -289,7 +295,7 @@ if ($result === false) {
$data = [];
$begin = false;
if ($management_allowed === true) {
$data[0] = '<strong><a href="index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules_form&id_module_inventory='.$row['id_module_inventory'].'">'.$row['name'].'</a></strong>';
$data[0] = '<strong><a href="index.php?sec='.$sec.'&sec2=enterprise/godmode/modules/manage_inventory_modules_form&id_module_inventory='.$row['id_module_inventory'].'">'.$row['name'].'</a></strong>';
} else {
$data[0] = '<strong>'.$row['name'].'</strong>';
}

View File

@ -153,7 +153,6 @@ $table->data[7][0] .= ui_print_help_tip(__("Here is placed the script for the RE
$table->data[7][1] = html_print_textarea('code', 25, 80, base64_decode($code), '', true);
echo '<form name="inventorymodule" id="inventorymodule_form" method="post"
action="index.php?sec='.$sec.'&sec2=godmode/modules/manage_inventory_modules">';

View File

@ -387,11 +387,11 @@ web_threads 1
# Uncomment to perform web checks with LWP instead of CURL.
#web_engine lwp
# Enable (1) or disable (0) Pandora FMS Inventory Server (PANDORA FMS ENTERPRISE ONLY).
# Enable (1) or disable (0) Pandora FMS Inventory Server.
inventoryserver 1
# Number of threads for the Web Server (PANDORA FMS ENTERPRISE ONLY).
# Number of threads for the Inventory Server.
inventory_threads 1

View File

@ -379,11 +379,11 @@ web_threads 1
# Uncomment to perform web checks with LWP instead of CURL.
#web_engine lwp
# Enable (1) or disable (0) Pandora FMS Inventory Server (PANDORA FMS ENTERPRISE ONLY).
# Enable (1) or disable (0) Pandora FMS Inventory Server.
inventoryserver 1
# Number of threads for the Web Server (PANDORA FMS ENTERPRISE ONLY).
# Number of threads for the Inventory Server.
inventory_threads 1

View File

@ -466,11 +466,11 @@ web_timeout 60
# Uncomment to perform web checks with LWP instead of CURL.
#web_engine lwp
# Enable (1) or disable (0) Pandora FMS Inventory Server (PANDORA FMS ENTERPRISE ONLY).
# Enable (1) or disable (0) Pandora FMS Inventory Server.
inventoryserver 1
# Number of threads for the Web Server (PANDORA FMS ENTERPRISE ONLY).
# Number of threads for the Inventory Server.
inventory_threads 1

View File

@ -384,11 +384,11 @@ web_threads 1
# Uncomment to perform web checks with LWP instead of CURL.
#web_engine lwp
# Enable (1) or disable (0) Pandora FMS Inventory Server (PANDORA FMS ENTERPRISE ONLY).
# Enable (1) or disable (0) Pandora FMS Inventory Server.
inventoryserver 1
# Number of threads for the Web Server (PANDORA FMS ENTERPRISE ONLY).
# Number of threads for the Inventory Server.
inventory_threads 1