====== File Collections ====== {{indexmenu_n>28}} We are working on the translation of the Pandora FMS documentation. Sorry for any inconvenience. ===== File Collections ===== The file collections are resources used to massively deploy the scripts or plugins to later be [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#collection_of_files_and_software_agents|used in Software Agents]], [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#collection_of_files_and_monitoring_policy|Policy s of monitoring]] on agents and in the [[:es:documentation:pandorafms:complex_environments_and_optimization:02_policy#collection_of_files_in_satellite_server|Satellite servers]]. It is accessed from the menu **Configuration** → **Collections** (**Configuration** → **Collections**). {{ :wiki:pfms-configuration-collection-manage_collection.png }} To create a new collection of files, click the **Create** button: {{ :wiki:pfms-configuration-collection-create_new_collection.png }} Fill in the name, group, short name and description and click **Create**. To add resources to a collection go back to the collections list and click on the name of the collection to which resources are to be added. {{ :wiki:pfms-configuration-collection-manage_collection-add_file_directory_text.png }}In the three icons highlighted in the image above, from left to right you can create a directory, create a text (which you can then edit) or store a new file. Once the resources have been added, return to the list of collections and an icon with a yellow triangle where you can click to synchronize the changes with the different elements of Pandora FMS (agents, Software Agents, monitoring policies and Satellite servers). {{ :wiki:pfms-configuration-collection-manage_collection-apply_changes.png }} Each collection has its own base directory. In the Web Console these are stored in the ''/pandora_console/attachment/collection'' directory with a name like ''fc_XXX'', where XXX is the numerical ID of the collection. File collections can contain subdirectories. File collections are transferred as ZIP (compressed) files to the Agent, using [[:en:documentation:pandorafms:technical_reference:09_tentacle|Tentacle]]. File collections are only supported with Tentacle's transfer mode. ==== File Collections and Software Agents ==== Go to **Resources** → **Manage agents** and click on a Software Agent name. Click the **Collection** (**Collection**) tab. You will have a list of available collections similar to this: {{ :wiki:pfms-software_agent-collection-01.png }} If a Software Agent has [[:es:documentation:pandorafms:monitoring:02_operations#remote_configuration|remote configuration]] disabled, it will show the following warning:{{ :wiki:pfms-software_agent-collection-02.png }} To add a collection click the plus icon in the **Add** column: {{ :wiki:pfms-software_agent-collection-03.png }} If you see an icon with a yellow warning triangle in the **Status** column, the collection may either be empty or the collection has not been synced. If the collection contains files or directories, click on the yellow icon. Once you have applied the changes the status of the collection will indicate the success of the synchronization.{{ :wiki:pfms-software_agent-collection-04.png }} After a few minutes you can go to **Configuration** → **Collections** and click the name of the added collection. The newly added Software Agent will be displayed in the agents tab. {{ :wiki:pfms-software_agent-collection-05.png }} ==== Location of file collections in the Software Agent ==== Each collection of files has a ''short name''. This means that the utilities, scripts or executables that are inside the collection will be in: **MS Windows®** %ProgramFiles%\pandora_agent\collections\short-name **GNU/Linux®** /usr/share/pandora_agent/collections/short-name It is important to know that the collection is compressed to be sent to the Software Agent, so the latter must have the **unzip.exe** tool to be able to decompress the file. As of Agent version 3.2 for MS Windows®, this utility is installed inside: %ProgramFiles%\pandora_agent\utils You need to know this to be able to use Modules that work when working with those files, to be able to specify the full "real" path. Each file collection is stored at a different address, to prevent different file collections from overwriting or conflicting with each other. The collection control system is based on **md5** hashes, similar to the management of configuration files of the Agents. When creating the collection in the Pandora FMS Web Console, an md5 hash is created that is sent to the Software Agent. This **md5** will only be updated when changes occur in the collection on the Pandora FMS Web Console side, and not in the Software Agent. Therefore, changes to collections made locally on agents will remain as long as the collection is not changed in the Web Console. If any change is made to the collection on the Web Console side, the **md5** will be recalculated, and when it disagrees with the existing one in the Agents, it will apply the last configuration of the collection, overwriting the previous one and eliminating possible local modifications about the collections. If you want to use a Module that uses a file included in the collection, refer only to the directory that contains the collection, using its fixed identifier. This is an example using a [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#agent_plugins|Plugin module]]: {{ :wiki:collection_module_usage_plugin.png }} ==== File collections and monitoring policies ==== It works much like individual Agent collections, but instead of applying a collection to a specific Agent it applies to a policy: {{ :wiki:pfms-configuration-manage_policies-collection.png }} [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#file_collections|See this section]] to manage and sync collections. ==== File collections on Satellite server ==== Click on the **Servers** menu → **Manage servers** and then click on the remote configuration icon of the Satellite server to which the collection will be added. Click on the **Collections** tab and in the list of available collections, in the **Actions** column add the respective collection by clicking on the ** icon +**. In the same way, you can delete the added collections by clicking the trash can icon. {{ :wiki:pfms-servers-manage_servers-edit_satellite_remote_config-01.png }} When saving the changes, after a few minutes, you will be able to see in the configuration file the new section created with the added collections and their respective short name. {{ :wiki:pfms-servers-manage_servers-edit_satellite_remote_config-02.png }} [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#file_collections|See this section]] to manage and sync collections. ==== File collections in Command Center (Metaconsole) ==== Starting with Pandora FMS 729, OUM can centralize collection management from [[:es:documentation:pandorafms:command_center:01_introduction|Command Center (Metaconsole)]]. To access it, go to the **Centralized management** menu → **Agent management** (**Centralized management** → **Agent management**) and click on the **Collections** tab. {{ :wiki:pfms-configuration-collection-manage_collection-metaconsole.png }} [[:en:documentation:pandorafms:complex_environments_and_optimization:02_policy#file_collections|See this section]] to manage and sync collections, as they work similarly in the Web Console. [[:en:documentation:start|Back to Pandora FMS Documentation Index]]