Templates and Components
Introduction
Pandora FMS performs all the checks through Modules, allowing to process different types of data depending on the element to monitor. The complete list of default Modules contained in Pandora FMS can be checked in the following section Management → Resources → Module types.
In Pandora FMS there are different types of Modules, some of them are:
- async: Asynchronous data.
- generic: Generic data.
- keep_alive: Special module “keep on line” is used to control the status of the last contact with an Agent.
- icmp: ICMP check (ping).
- snmp: SNMP check.
- tcp: TCP check.
- web: Web check.
These types of Modules can store different types of data, for example:
- data: Numerical data.
- proc: Boolean value, 1 is true and 0 is false.
- string: Text string.
- inc: Incremental data per time unit.
- inc_abs: Absolute incremental data showing only the incremental value since the last reading.
Components
A component is a Generic Module that can be applied repeatedly on an Agent, as if it were a “master copy” of a Module, generating a Module associated to an Agent. With this tool you may create and maintain a list of the most used components to apply them to new agents.
- Network components: Group all remote modules (WMI, TCP, SNMP, ICMP, plugin, etc).
- Local components: Include the definition of the EndPoints modules, as “chunks” of text to be incorporated into the configuration file of the Agent that has the remote configuration enabled.
Component template
Network components can be grouped in templates, so that multiple network components can be applied directly on an Agent. Several modules can thus be created simultaneously through the network components associated with a template.
The Recon server applies the network components associated with a template on the detected hosts, adding the specified modules automatically and thus enabling automatic monitoring deployment.
Network Components
Menu Management → Configuration → Templates → Remote components.
In this list, you can search for existing components (filtering by groups or free search text), view their detailed configuration, modify, or create new components. To edit the properties of any module, click on its name.
If the template is modified, its values will apply to modules created from that point forward, not to those already created.
Create New Network Components
To create a network component, use the menu Management → Configuration → Templates → Remote components, and at the bottom of the page, in the dropdown menu, select a network component and then click the Create button.
Network components share groups of common fields, some of which are important:
- Information: Description and instructions according to status (warning, critical, unknown).
- Thresholds: Thresholds and all their possible combinations.
- Data: Retry values, timeout, expected maximum and minimum values, save historical values (disabled by default), some units of measurement.
- Categorization: Allows you to choose the module group to which future modules will belong, choose a custom category (Management → Resources → Module categories), and assign module tags.
- Macros: As many as needed, specifying name and value, one by one.
Network ICMP Module
Menu Management → Configuration → Templates → Remote components, option Network ICMP module → Create.
It allows two basic checks of remote monitoring in the dropdown field Module type:
Remote ICMP network agent, boolean data: Yes or no, true or false check to see if a device is online.Remote ICMP network agent (latency): Time used to perform the previous query.
Network TCP Module
Menu Management → Configuration → Templates → Remote components, option Network TCP module → Create.
The next step in remote monitoring is the use of TCP to essentially send a series of instructions (field TCP send, module type Remote TCP network agent) to a specific port number, with the IP address or URL configured in the respective agent.
The expected response can be:
- True or false value, use
boolean datain Module type. - Any numeric value (use
numeric data) or a numeric value that increases relative to the penultimate response (useincremental data). - A string value, numbers and letters (use
alphanumeric data) which can be compared with what is configured in the TCP receive field to determine its status (normal, warning, critical).
SNMP Module
Menu Management → Configuration → Templates → Remote components, option SNMP module → Create.
In SNMP monitoring, it is extremely important to know the OID (Object IDentifier) or Object Identifiers. For this, there is an SNMP browser (button SNMP Walk) where the credentials (SNMP version 3), IP address, and port are entered to obtain the available OIDs according to the SNMP community of the device being monitored.
Once the SNMP OID is configured, the module type should be selected based on the response (numeric, incremental numeric, true/false, or alphanumeric) and thresholds should be set to determine its status (normal, warning, critical).
When configuring each agent that will contain an SNMP module, the query credentials can be configured quickly using the “Credential Store” functionality. Currently, all this information must be entered manually in the SNMP Walk button.
WMI Module
Menu Management → Configuration → Templates → Remote components, option WMI module → Create.
Pandora FMS has predefined WMI queries (WMI query) classified in the Using network component list. Once the desired option is selected, a second list with its available options will appear, and by selecting one of them, the future module will be named and the WMI query will be assigned. The module type will also change accordingly.
When creating this type of remote component, either manually or with the described assistant, it is recommended to select in the Basic → Group tab the group or subgroup according to the nature of the component. This will allow for future searches of remote components.
Before creating new components for MS Windows®, it is recommended to search for predefined components by filtering (use recursion to search in groups and subgroups).
Remote Execution Module
Menu Management → Configuration → Templates → Remote components, option Remote execution module → Create.
In the Basic → Command tab, the instruction to be executed remotely should be inserted. Single quotes should be used when necessary. If double quotes are needed, escape with a backslash (\").
Based on the command entered and its response when executed, the appropriate module type should be selected (numeric, boolean, alphanumeric, incremental data).
Plugin Module
Menu Management → Configuration → Templates → Remote components, option Plugin module → Create.
According to the registered plugins, in the Basic → Plugin tab, one of them should be selected and filled out according to the custom instructions for each case.
Wizard Module
Menu Management → Configuration → Templates → Remote components, option Wizard module → Create.
It allows two types, depending on the module protocol: SNMP and WMI.
SNMP:
First, you must have registered the manufacturer (Manufacturer ID) and with Execution type → Network selected, you can add the Value OID. These are the most important fields, though there are more fields to fill out (module type, unit to be used, thresholds, etc.).
Local Components
Menu Management → Configuration → Templates → Local components.
Local components refer to components that can be applied to EndPoints. These components can be applied automatically to all agents through policies or manually (one by one) in the Agent's remote configuration editor. Pandora FMS offers dozens of local modules to apply to policies and agents automatically, sorted by categories.
See the policy section for how to apply local components to EndPoints remotely.
The list of existing local modules can be filtered by various parameters (group, operating system, free text query), and you can also view, modify, and create new components. To edit any module, click on its respective name.
Create new local components
To create a new local component, go to the main local component management page, menu Management → Configuration → Templates → Local components and click Create at the bottom right of the page.
The page with the new local component creation form will appear. The form is filled in with the above information and click Create again to save.
Local execution macros
It is possible to define macros in the local components. These macros will be used in the parameter module_exec and will have the following structure _field1_ , _field2_ … _fieldN_.
The macros will appear in the Modules edit form as normal fields, transparent to the user.
If a Module component has macros, the configuration data will be hidden by default to simplify the view, but it is possible to display and modify them. If a string is defined in the Help field, a hint will appear next to the field with this string.
Module templates
Module templates are templates that contain network checking modules. These templates, once created, can be applied directly to agents, avoiding having to add the modules one by one, or apply the templates when performing a network recon task.
Menu Management → Configuration → Templates → Module templates.
From the list shown, clicking on the name of any of the templates will allow you to edit them, and clicking on the trash can icon in the right column will allow you to delete them.
The Create button is used to add a new template. The Name and PEN fields are filled in and saved by clicking Create again. The Add components button appears where you may filter by group, select the required components and click OK. To finish the creation process, click Update.
Apply a module template to an Agent
To apply one of the existing monitoring module templates, or one created, go to the configuration of an agent through the Management → Resources → Manage agents menu. From the list of agents, one is selected through the corresponding Modules link. Once this screen is accessed, click on the templates tab, Module templates, at the top of the page.
The modules that the Agent already has and the existing Modules templates will be shown. Select a template and click Assign. The modules contained in that template will be automatically added. Once the template is applied, you may delete some of the modules by clicking on the trash can icon, or you may edit them by clicking on the corresponding tool icon. The modules added will have an automatic description based on the template name.
The templates applied on the agent are not shown, only the modules they contain.
Private Enterprise Number
All SNMP devices have an identifying string (OID), which is unique for each make and model of device. Within these strings there is a number in the seventh position that determines which manufacturer the device belongs to.
This number is the Private Enterprise Number (PEN) of a manufacturer and it is registered in the IANA. You may configure these PENs in Pandora FMS to use them together with the module templates and thus add monitoring dynamically.
In the Management → Configuration → Templates → Private Enterprise Numbers menu you have access to the list of registered PENs. You may edit and/or delete each registered PEN by clicking on the corresponding icons in the Options column.
To register a new manufacturer, click Register manufacturer. It will only be necessary to insert the corresponding PEN of the manufacturer, indicate its name and a description. It will then be added to the existing list.
In module templates, one or several PENs will be indicated so that when a discovery task is carried out, Pandora FMS will be able to obtain the device manufacturer and add the appropriate monitoring to it.
Wizard Components
Within the SNMP wizard and WMI wizard capabilities, there is a type of remote components called Wizard components .
These components allow establishing a base configuration for the modules that will be generated in the agents when executing any of the wizard (SNMP or WMI). It also offers the possibility of dynamically generating several modules with only one component. For example, a component to explore the different storage units of a device or the running processes.
These components can be created from the menu Management → Configuration → Templates → Remote components.
Component groups
To help sort and classify components, there are component groups. Components are associated into component groups when they are created.
To view the existing component groups use the menu Management → Resources → Component groups. The existing groups and their description will be displayed on the screen. You may view the details of the groups by clicking on their name, delete them by clicking on the trash can icon on the right, in the Action column, and create new ones by clicking on the bottom Create button. You may also select several of them by means of their corresponding checkbox and delete them in bulk by means of the Delete button.
With the Create button you may create a new component group. Fill in the fields in the form, provide a name for the group and select whether it has a parent within the existing groups. Then click Create again. Now new components can be added to the newly created component group.
