====== Discovery 2 . 0 ====== {{indexmenu_n>4}} We are working on the translation of the Pandora FMS documentation. Sorry for any inconvenience. ===== What is Pandora FMS Discovery? ===== Version NG 732 or later. **Discovery PFMS** provides a set of tools to simplify monitoring through wizards. You can get more information in the video tutorial "[[https://www.youtube.com/watch?v=Bfu4Ll5w6SE&ab_channel=PandoraFMS|Learning about Pandora FMS Discovery]]" * **Tasklist**: The Pandora FMS **Discovery** tool allows you to see a list of all the tasks scheduled in our environment, both at the console level and at the server level. * **Host & devices**: It includes the necessary tools to discover or import devices and computers on the network. * **Console Tasks**: It includes the necessary tools to execute scheduled tasks from the Pandora FMS console, such as: - Backups of the Pandora FMS database. - Execute PHP functions. - Execute custom scripts. - Save custom reports. - Send personalized reports (from a template) by mail. - Send personalized reports by mail. * **Applications**: It includes the necessary tools to monitor different applications from plugins loaded in the system, such as MySQL®, Oracle® or VMware®. * **Cloud**: It includes the necessary tools to monitor different cloud environments from plugins loaded in the system, such as Amazon Web Services® or Azure Microsoft Compute®. * **Custom**: It includes the necessary tools to monitor different environments or custom applications from plugins loaded in the system. * **Manage disk packages**: The Pandora FMS **Discovery** tool allows you to load plugins from ''.disco'' packages that can be used to monitor environments or applications. See also [[:en:documentation:pandorafms:technical_reference:12_disco_development|.Disco development]] {{ :wiki:discovery_start_2.png }} ===== Task list ===== The **Discovery Pandora FMS** tool allows you to see a list of all the tasks scheduled in the environment, both at the Web Console level and at the server level. These tasks are distributed in blocks, depending on the type of task configured. * Console tasks. * Host & devices tasks. * Application tasks. * Cloud tasks. * Custom tasks. {{ :wiki:discovery_task_list_all_tasks_2.png }} ==== Console tasks ==== {{ :wiki:discovery_task_list_console_tasks_2.png }} {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise Version}}For each console task listed we will see: * **User**: Who created the task. * **Task**: Summary of the task. * **Scheduled**: Calendar planning. * **Next Execution**: Specifies the next execution. * **Last Execution**: Indicates when it was last executed. * **Group**: The group to which it belongs. * **Operations**: Shows the actions that can be performed for the current user: edit, delete or disable. * **Console ID**: To balance the load in the execution of tasks, you can declare and add consoles in the ''config.php'' section. Use the **Console ID** to identify and assign those consoles when creating or editing **Console Tasks**. * Version 770 or later. * You can indicate the console that will execute the task by **Console ID**. * **Each console has its own CRON that executes the respective tasks**. You can only force the execution of a console task in its respective button. For example, if you have two consoles named A and B, these consoles work independently of each other, both are incommunicado with each other. * See also [[:en:documentation:pandorafms:management_and_operation:11_managing_and_administration#consolas|Manage Consoles]]. * See also [[:en:documentation:pandorafms:management_and_operation:12_console_setup#console_dedicated_for_reports|Consoles dedicated to reports]]. === Create or edit console tasks === To **create** a Console task go to the **Management menu →** **Discovery** → **New console task**. {{ :wiki:discovery_create_console_task_2.png }} To **edit** a Console task go to the **Management menu →** **Discovery** → **Task list** and click the pencil icon corresponding to each task. {{ :wiki:icon_pencil_edit.png?nolink& }} In both cases the interface is the same except for the respective button to create (**Create**) or edit (**Update**) and save the changes. {{ :wiki:pfms-discovery-create_new_console_task_2.png }} The common fields for each task are: - **Scheduled**: Periodicity of the task, daily (**Daily**), every hour (**Hourly**), monthly (**Monthly**), once (**Not scheduled** , see next point), weekly (**Weekly**) and annually (**Yearly**). - **Next execution**: Next execution of the task, select date in the first field and time in the second field (pop-up menu when clicking on each one).- **Group**: Group to which the task will belong. The parameters to fill in change depending on the task you choose from the **Task** drop-down list: * **Backup Pandora FMS database** Pandora FMS database backup task: **Save to disk in path**: Path in which the information backup will be stored. **Active backups**: Specific number of backups to keep to conserve storage space. * **Call PHP function** Function execution task written in PHP language: **Function name**: Name of the PHP function to be executed once or periodically. * **Execute custom script** Script execution task **Custom script**: Name of the script to execute. * **Save custom report to disk** Custom report generation and saving task. **Report pending to be created**: Custom report (drop-down list) from which this report will be generated. See “[[:en:documentation:pandorafms:management_and_operation:08_data_presentation_reports#creating_a_report|Creating a (custom) report]]”. **Save to disk in path**: Path where the created report will be stored (the ''apache'' user must have read and write rights to that directory) **File name prefix**: Name prefix for successive reports. **Report Type**: To be saved in XML, PDF, JSON or CSV format. * **Send CSV log** Task for sending event records (logs) in CSV format, by email. **Send to e-mail**: Mailbox to which to send the event records (logs) in CSV format. * **Send custom report (from template) by email** Reports (created from a template) to be sent by email: * Personalized template for report creation, **Template pending to be created**. * Information of the Agents for the report, **Agents**; if you want to generate separate reports for each report, **Report per agent**. * Email addresses (separated by commas) to send the report, **Send to email addresses**. * Subject of the email to be sent, **Subject**. * Body of the message with which the reports will be sent, **Message** . * Type of report that will be sent, **Report Type**. * **Send custom report by email** Reports to be sent by email: * Custom report (see “[[:en:documentation:pandorafms:management_and_operation:08_data_presentation_reports#report_creation|Creating a report]]” ) for report creation, **Report pending to be created**. * Information of the Agents for the report, **Agents**; if you want to generate separate reports for each report, **Report per agent**. * Email addresses (separated by commas) to send the report, **Send to email addresses**. * Subject of the email to be sent, **Subject**. * Body of the message with which the reports will be sent, **Message** . * Type of report that will be sent, **Report Type**. ==== Host & devices tasks ==== {{ :wiki:discovery_task_list_network_tasks_2.png }} For each task listed: * **Force**: Force execution. * **Task name**: Name. * **Server name**: Server that will execute it. * **Interval**: Time interval in which it will be carried out. * **Network**: Network where the checks will be carried out. * **Status**: Status of the scheduled task. * **Task type**: Type * **Progress**: Progress, if running. * **Updated at**: Last update. * **Operations**: The icons allow you to perform actions such as editing or deleting the task, among others. As of version NG 752, an icon is available that allows you to enable or disable each task in the task view. ==== Applications tasks, cloud tasks and custom tasks ==== {{ :wiki:discovery_task_list_apps_cloud_tasks_2.png }} For each task listed: * **Force**: Force execution. * **Task name**: Name. * **Server name**: Server that will execute it. * **Interval**: Time interval in which it will be carried out. * **Status**: Status of the scheduled task. * **Task type**: Type. * **Progress**: Progress, if running. * **Updated at**: Last update. * **Operations**: The icons allow you to perform actions such as editing or deleting the task, among others. ===== Discovery Host&Devices ===== ==== NetScan ==== NetScan allows you to discover devices on a network and apply different monitoring rules to them. When creating a task, the group to which it will belong is established in advance and you must select, in recognition, between uploading a file in CSV format with the specific devices to be checked (**Use CSV file definition:**) or the network (**Network:**). Intervals selected as manual will need to be launched manually. **Discovery will not launch a manual task automatically.** * **Auto discover known hardware**: Auto discover known hardware dynamically applies the added templates thate have been added via Private Enterprise Number. * **Modules templates**: Try to apply the modules of the selected templates. If the execution fails the test, they will not be added to the watch list. * **Review results**: The user must validate the results by selecting which agents will be created from those found by the discovery task. * **Apply autoconfiguration rules**: Applies the previously defined auto configuration rules to the detected agents. Automatic configuration allows you to apply policies, group and configuration changes, as well as launch custom events or execute scripts on actions. The agents detected by NetScan are remote agents without a configuration file. You won't be able to apply local monitoring policies or add configuration changes in bulk if you don't deploy an agent to the targets. * **SNMP enabled**: To complete the information obtained from discovered network devices, SNMP must be enabled. This improves detection by scanning available SNMP information on discovered targets. By enabling this token, two additional options will appear: * **SNMP version**: The SNMP version (1,2, 2c and 3) configured in the scanned network devices must be selected. * **SNMP communities to try with**: The community configured in the environment must be indicated. You can add as many communities as you need in the next box. * **WMI enabled**: WMI scanning can be enabled. The credentials must be selected in **Credentials to try with**, which were previously loaded into the keystore. The different credentials provided will be tested against the detected targets that support WMI, complementing the monitoring with modules that will report on the use of CPU, memory and disk. * **OS detection**: Detect the operating system of the target. * **Name resolution**: Resolve the name of the target. * **Parent detection**: Through the information collected through SNMP, the different interconnections between devices will be calculated, in order to represent their network infrastructure. * **Parent recursion**: Improves parent detection by adding recursion to the process. * **VLAN enabled**: Detects the VLANs to which the different devices are connected. After the wizard completes, Discovery will start running it at each defined interval. If the interval is manual, the task must be started manually. Once the task is finished, if accessed from **Review**, you will see a summary of the devices found and that respond to **ping** or **fping** and the rest of the metrics available through SNMP or WMI. All IP addresses will be displayed, each in one of these two states: * **Disabled**: An agent or module already exists in the environment being monitored and it will not be created or modified. * **Enabled**: It is a new element that is not being monitored or within the metrics that are obtained a new module has responded that will be seen in a drop-down. In the devices that are in this state, you can select to add it to the list of monitored agents or if you want to add any of the new enabled metrics. Once the objectives to be monitored have been selected, the system will create them systematically. During this process, the target's operating system will be detected to complement the information already collected. ==== Automatic agent deployment ==== The steps to deploy Software Agents from the Console are: * **Register the versions of Software Agents to be deployed in the agents repository**: You will need the installers of the agents to be deployed. You can also use custom agents. * **Register the credentials that will be used to connect to the targets in the credentials manager**: You will need to specify the credentials with which access to the found or specified targets will be tested. * **Confirm that the environment is ready for deployment**: * You must define **targets for deployment**. * You must define the **Public Access URL**. * You must register **installers to deploy the software**. This system does not perform PUSH type operations; all deployments are broadcast offering the software and ordering the target to install it. === Goal Pursuit === **Objectives for deployment** You can use any of the following options to define goals: * **Scan for targets**. * **Add target**. * **Load targets**. == Scan one or more networks for targets == Pressing the scan targets button will display a pop-up box with the following fields: * **Network/mask**: The network (or networks, separated by commas) to scan. * **Scan from**: The Discovery server that will perform the scan. * **Credentials to try with**: The credentials that will be used to try to connect with discovered targets. * **Desired agent version**: The version of the Software Agent that registers as desired for the discovered targets. * **Target server IP**: The IP of the target server where these Software Agents will point when they are installed (corresponds to the ''server_ip'' field of the agent configuration file). When you press the **Scan** button you will receive a confirmation, with a link you can follow to check the progress of this task. The discovered targets added to this list are all devices found whose operating system matches Windows or Linux/Unix based systems, regardless of whether or not valid credentials were found. == Manually define a goal == You can manually register the target by defining: * **IP**: IP address or addresses to display. * **OS**: Operating system; Only Windows and Linux/Unix-based ones that are compatible with the agent's ''tar.gz'' installer are supported in this release. * **Architecture**: Processor architecture, x86 (32-bit) or x64 (64-bit). * **Credentials**: The credentials that will be used to connect to the target. * **Desired agent version**: The version of the Software Agent that you wish to deploy. * **Target server IP**: The IP address of the server where this agent will point to once installed (corresponds to the ''server_ip'' field of the software agent configuration). == Upload a CSV file with objective information == Attention, this CSV importer will not perform any Discovery tasks, it will only create empty agents with the name, IP address, OS type, description and group provided in the CSV file. If you want to register targets in bulk, you can upload a CSV file in the following format: Agent alias, IP address, OS id, Interval, Group id, Description * **Agent alias**: Alias of the future agent, if you select the **Alias as name** option, the name will be the same as the alias. * **IP address**: IP address of the computer where the agent will be installed. * **OS id**: Operating system identifier number, AIX, BSD, HP-UX, GNU/Linux, Solaris, MS Windows® are compatible. * **Interval**: Time in seconds between each check. * **Group id**: Group identifier number to which the agent will belong. The system will create the objectives based on what is defined in the CSV. === Deploy the software === You can only schedule the deployment against targets whose information is complete, specifying both credentials and software versions to deploy As soon as you have possible targets on the list, you can launch the agent deployment. Select the IP addresses of the targets from the list (only valid targets will appear) and press drop down. A Discovery task will automatically be created for deployment in the background, which will be in charge of installing the agent on the desired targets. You will be able to confirm that the agent has been successfully installed from the target list of the deployment center. The target name also becomes a link to the corresponding Pandora FMS agent. ==== Custom NetScan ==== It allows the execution of custom scripts for the execution of network recognition tasks. Please specify: * **Task name**: Name of the recognition task. * **Comment**: Allows you to add comments. * **Discovery server**: Server that will execute the task. * **Group**: Group to which it belongs. * **Interval**: Execution interval. Once the task creation process is completed, it will be necessary to specify the script that you want to run, as well as the configuration file necessary for its execution. ==== Net scan scripts ==== This section shows the different scripts that have been created for the custom recognition tasks. A view is displayed in which the name and description of the task are defined. Pandora FMS allows adding additional scripts to facilitate the monitoring and recognition of the required networks. Parameters to define: * **Name**: Name of the script. * **Script fullpath**: Path where the script is located. * **Description**: Description of the script. Descriptions of the different fields can be defined, as well as default values for them. * **Hide value**: If you want to hide the value of a field. * **Help**: Help fields. The creation of scripts allows adding macros with which to define all the parameters that are necessary for the correct execution.tion of the script. ===== Applications, cloud and custom ===== Version NG 773 or later. With Pandora FMS it is possible to monitor applications and cloud environments remotely using **Discovery PFMS**. To do this, it will be necessary to load the plugins that you want to use for monitoring, which may be custom or official Pandora FMS plugins. These plugins are loaded [[:en:documentation:pandorafms:technical_reference:12_disco_development|in ''.disco'' packages]] which will include their own configuration interface and executables necessary for proper operation. {{ :wiki:discovery_apps_2.png }} ==== Creating and editing tasks ==== When creating or editing a task for applications, cloud or custom, the form that we must fill in will be adjusted according to the plugin used in the task. This means that, for example, the VMware task form will be different from the XenServer task form. However, for all tasks, a minimum necessary information must be indicated. {{ :wiki:discovery_task_definition_2.png }} * **Task name**: Name. * **Description**: Description of the task. * **Discovery server**: Server that will execute it, mandatory parameter. * **Group**: Group. * **Interval**: Task execution interval. * **Timeout**: Expiration time for the execution of the task scripts. Once this minimum information is filled in, the following steps of the form will be adjusted according to the plugin used, being able to have tasks with more configuration steps than others. {{ :wiki:discovery_task_first_step_2.png }} During the definition of the task we can go from one step to the next using the **Next** button, which will update the parameters of each step for the task. We can also finish the definition of the task using the **Complete setup** button, which will update the parameters of the step in which we are and mark the task as fully configured so that the server can execute it. A task that has not been completely configured will not be executed by the Pandora FMS server, which is why the last configuration step of any task will always only give us the option of the **Complete setup** button. {{ :wiki:discovery_task_last_step_2.png }} When a task is not fully configured, it will be displayed in the task list with an icon indicating so. {{ :wiki:discovery_task_list_task_incomplete_2.png }} ==== Task execution result ==== When a task has finished its execution, from the list of tasks we can see the result of it. All completed tasks will have a status associated, which may be: * **Done**: The server has completed the task without encountering any errors during its execution. * **Failed**: The server has encountered at least 1 error during the execution of the task. {{ :wiki:discovery_task_list_failed_task_2.png }} For any completed task, we can consult its execution summary, which, depending on how the plugin used for the task is defined, will be displayed with different information. {{ :wiki:discovery_task_list_summary_success_2.png }} In the cases in which the task ends with a **failed** status, we can also see the execution summary to check the errors produced. {{ :wiki:discovery_task_list_summary_failed_2.png }} The result of a task execution will always depend on the plugin used by it, so it is possible that even having finished with a **failed** status, the task is capable of generating monitoring for a set of agents. ==== Applications ==== {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise Version }}The **applications** available to officially monitor with Pandora FMS are: * [[https://pandorafms.com/guides/public/books/vmware/page/discovery|VMware®]]. * [[https://pandorafms.com/guides/public/books/xenserver/page/discovery|XenServer®]]. * [[https://pandorafms.com/guides/public/books/mysql/page/discovery|MySQL®]]. * [[https://pandorafms.com/guides/public/books/sqlserver/page/discovery|Microsoft SQL Server®]]. * [[https://pandorafms.com/guides/public/books/oracle/page/discovery|Oracle®]]. * [[https://pandorafms.com/guides/public/books/db2-f74/page/discovery|DB2®]]. * [[https://pandorafms.com/guides/public/books/sap/page/discovery|SAP R3®]]. ==== Cloud ==== {{:wiki:icono-modulo-enterprise.png?23x23|Enterprise Version}}The **cloud** environments available to officially monitor with Pandora FMS are: * [[https://pandorafms.com/guides/public/books/aws-ec2/page/discovery|Amazon Web Services EC2®]]. * [[https://pandorafms.com/guides/public/books/aws-rds/page/discovery|Amazon Web Services RDS®]]. * [[https://pandorafms.com/guides/public/books/aws-s3/page/discovery|Amazon Web Services S3®]]. * [[https://pandorafms.com/guides/public/books/azure/page/discovery|Azure Microsoft Compute®]]. * [[https://pandorafms.com/guides/public/books/google-cloud-platform-compute-engine/page/discovery|Google Cloud Compute Engine®]]. === Custom === Pandora FMS currently does not have official **custom** plugins. ===== Manage disk packages ===== This section allows plugins to be loaded from ''.disco'' packages that can be used to monitor environments or applications. Version NG 773 or later. From the console you can see the list of plugins available for **Discovery PFMS** and you can load new ones, whether they are official Pandora FMS or customized. {{ :wiki:discovery_manage_extensions_list_2.png }} For each listed plugin: * **Name**: Name of the plugin accompanied by an icon that allows distinguishing it. This name and icon are what the plugin will be displayed with when creating new tasks. * **Short name**: Identifier name of the plugin. This name is a unique identifier that allows distinguishing the plugin from others, so there cannot be more than one plugin with the same short name loaded in the system. Short names that start with ''pandorafms.'' are used by Pandora FMS to distinguish official plugins, so short names that start like that should never be used for custom plugins. In addition, these short names are used to name the directory that will contain all the files needed by both the console and the Pandora FMS server. * **Section**: Section of the **Discovery** interface in which the plugin will be displayed to create and list tasks. It can be **app**, **cloud** or **custom** so that the plugin tasks are inside **Applications**, **Cloud** or **Custom** respectively. * **Description**: Additional information about the plugin. * **Version**: Version of the plugin loaded. * **Actions**: You can delete a plugin from the list (along with all the tasks that use it) or manually synchronize the plugin files found in the console with the Pandora FMS servers in the environment. {{ :wiki:discovery_manage_extensions_list_actions_2.png }} ==== File Synchronization ==== For the tasks of a plugin to work, it is necessary that both the console and the Pandora FMS server have the content of the ''.disco'' package in an accessible directory. That is why the list of plugins includes the action button to synchronize the files with the server in each plugin. Since the console is in charge of uploading new ''.disco'' files, it is the same console that is in charge of synchronizing the necessary files with the server. The moment a ''.disco'' file is loaded, the console automatically synchronizes the files with the server. However, if necessary, the button to synchronize the plugin files will force the synchronization to be carried out at that moment when it is pressed. ==== Files in the console ==== As an entry point, the console stores the files for each plugin in a directory with the short name of the plugin inside: ''pandora_console/attachment/discovery'' For example, the directory for the ''pandorafms.vmware'' application would be: ''/var/www/html/pandora_console/attachment/discovery/pandorafms.vmware'' If the minimum necessary files are not found for a plugin within its directory, the following icon will be displayed, preventing file synchronization with the server, and it will be necessary to upload its ''.disco'' package again to solve the mistake. {{ :wiki:discovery_manage_extensions_list_deleted_folder_2.png }} ==== Files on the server ==== In order to execute the tasks defined for a plugin, the Pandora FMS server must have the plugin files. To achieve this, the console synchronizes the files of each loaded plugin with a directory accessible by both the console and the server. Said directory, called ''discovery'', is found within the one configured in the **general configuration** of the Pandora FMS console, in the **Remote configuration directory** field. {{ :wiki:general_setup_2.png }} By default, the route in which the console would synchronize the files with the server would be: ''/var/spool/pandora/data_in/discovery'' Within this directory, one will be created for each plugin, using their short names, and inside the plugin files that the server may need. For example, the directory for the **pandorafms.vmware** application would be: ''/var/spool/pandora/data_in/discovery/pandorafms.vmware'' See also [[:en:documentation:pandorafms:technical_reference:12_disco_development|.Disco development]] [[:en:documentation:start| Back to Pandora FMS documentation index]]