Pandora: Documentation en: Templates and components
- 1 Templates and Plug Ins
- 1.1 Introduction
- 1.2 Network Components
- 1.3 Local Components
- 1.4 Module Templates
- 1.5 Component Groups
1 Templates and Plug Ins
Pandora FMS performs all checks through modules allowing you to process different data types Pandora FMS is designed to process. The complete default module list for Pandora FMS can be viewed by clicking on Resources > Module Types.
By clicking on this menu, the available modules will be shown at the right side of Pandora FMS web console.
There are different module types in Pandora FMS:
- async: Asynchrounous data.
- generic: Generic data.
- keep_alive: Special keepalive module, useful to control the status of the last contact with an agent.
- icmp: ICMP check (ping).
- snmp: SNMP check.
- tcp: TCP check.
- web: Network check.
These module types can stock different types of data:
- data: Numerical data.
- proc: Boolean values. ! means true and 0 means false. For example, for web modules it means that if the value exists, it returns 1 and if it does not exist, it returns 0.
- string: Text string.
- inc: Incremental data, e.g. the amount of packets sent by an interface will always grow. They show growth by time unit.
- inc_abs: Absolute incremental data, showing the value increase since the last reading.
1.1.1 What is a component?
A component is a "generic module" which can be repeatedly applied onto an agent, as if it were a module's "master copy", generating a module associated with an agent. That way having a database of your organization's most used components turns out to come in handy when it comes to monitoring, since you have your own components adapted to the technologies you usually use and we simply have to apply these components to the new agents.
There are two types of components. Network components, which group all remote modules (wmi, tcp, snmp, icmp, plugin, web, etc.) and local components, which include the software agent module's definition as "text snippets", ready to be incorporated to the configuration file of the agent (with remote configuration enabled), or they can be cut out and pasted into the agent's configuration manually (without remote configuration).
1.1.2 What is a component template?
Pandora FMS offers the possibility of grouping network components in "templates" so that you may apply multiple network components directly on an agent. This makes it easy to deploy monitoring, as you create several modules simultaneously through the network components associated with a template.
The Recon server applies the network components associated to a template to detected hosts, adding the specified modules automatically and allowing a fast and automatic monitoring deployment.
1.2 Network Components
Network components are elements that enable remote network checks. Pandora FMS has about 40 preconfigured network checks, while the Enterprise Version comes with more than 400.
Pandora FMS network components can be created and viewed on their management page by clicking on Configuration > Network Components.
There you may look for the already existing components (by filtering 'by groups' or by 'free-text search'), see their configurations detail, modify them and create new ones.
To see any module's properties, click on its name, it will take you to its detail page:
As you can see in the picture above, all details of the "Host Alive" network component are shown.
If applied onto a module, it will retrieve the network component details except for the IP address field, where the main IP address of the agent the component is applied to will be automatically adjusted. All parameters may be edited later (e.g. changing the user or password of the WMI modules).
If any template is modified, its new values will only be applied to the modules created from that moment on, not to the the ones already created.
To modify component values, click on the name of one them and modify the desired values, e.g. the interval. Once updated, click on the 'Update' button at the bottom of the page. From that moment on, its the new component configuration will be applied to the agents added by this module.
1.2.1 Creating new Network Components
You may create three types of network components:
- Network components.
- Plug-in components (server addons).
- WMI components.
To create a new network component, go to Administration >Manage Modules and Network Components. Go to the bottom of the page, select a network component within the drop-down menu and click on the "Create" button.
Later, configure all component fields and click on "Create". This is the WMI component creation screen.
As you fill in the required fields, keep in mind that you are filling out the description of a 'generic' module which is going to be applied to different agents. Some parameters such as "snmp community", "user" or "password" may be different according to the agents the module applies later on, so you may leave them empty. If you have a common user policy for your systems, you may leave the modules completely configured by entering users, passwords and other data common to all agents here.
The same process applies to the components of the plugin type.
In this case, similarly to creating a module of the plugin type, when selecting a plugin in the interface, the fields defined in the plugin macros will appear.
1.3 Local Components
Local components are the ones that can be applied to software agents. If you have the Pandora FMS Enterprise Version, these components are applied automatically on agents through policies or manually (one by one) within the agent remote configuration editor. Check the policy section in order to know how to remotely apply a local component to a software agent under Pandora FMS Enterprise.
Local components may also be used within Pandora FMS OpenSource version. However, they will not be applied automatically through Pandora FMS. You must access the agent directly and enter the changes in the configuration file manually. The Pandora FMS Enterprise version has dozens of local modules to apply to the policies and to the agents automatically, sorted out by categories.
Once you go to their management page by clicking on Configuration > Local Components to view them, they work similar to network components.
This screen displays the already existing local modules, which can be filtered by different parameters (group, operating system, free text query). You may also also see, modify and create new components here.
To see any module's properties, click on its name. The link will lead you to its detail page, which is shown below.
As you can see, local component configuration is quite simple. The configuration's elements are described below.
- Name: Component name. This name will be visible when selecting the component to create an agent's module.
- OS: Operating system the component is intended for.
- Group: The group the module belongs to. It is quite useful to filter and assort by monitoring technologies.
- Description: Module description. A default description, which can be modified, is already in there.
- Configuration: The component's configuration like the module's configuration for software agents. For more examples or to get complementary information, check the section named Configuration.
- Warning Status: The interval in which the status changes to "warning". If the box "inverse interval" is checked, the status will change to "warning" if it is not within range of the defined interval.
- Critical Status: Interval in which the status changes to "critical" state. If the box "inverse interval" is checked, the status will change to "critical" if it is not within range of the defined interval.
- Warning Instructions: Instructions to follow if the status changed to "warning".
- Critical Instructions: Instructions to follow if the state changed to "critical".
- Unknown Instructions: Instructions to follow if the state changed to "unknown".
- Category: If you need to group or categorize differently, you may define categories here.
- Tags: You may assign tags here.
- Macros: You may define macros within the execution module (module_exec) or plugin parameters.
1.3.1 Creating new local components
To create a new local component, click on Configuration > Local components and click on the "Create" button which is located at the right bottom of the page.
A page containing the form for creating new local components will be displayed:
Fill out the form with the information given above and click on the "Create" button.
1.3.2 Local execution macros
For Pandora FMS versions 5 and later, it is possible to define macros within local components. These macros are used in the 'module_exec' parameter. They follow the structure of '_field1_, _field2_ ... _fieldN_'.
In the module edition form, macros will appear as normal fields, completely visible for the user.
Each macro has three fields: "Description", "Default Value" and "Help".
- Description: It is the label next to the field in the module form.
- Default Value: An optional value to be loaded by default in the module form field.
- Help: Optional string to add additional information to the field. If defined, a tip will appear next to the field with that string.
If a module component contains macros, the configuration data will be hidden by default to simplify the view:
But it is possible to view and modify them.
1.4 Module Templates
Module templates are templates that contain network check modules. Once created, these templates can be directly applied to agents, avoiding the need to add modules one by one, or apply the templates when carrying out a network recon task.
Click on Configuration > Module Templates to manage the module templates.
The template management window, which contains many default templates, will be displayed:
Click on any of the templates to see their details, or on the trash can icon in the right column to delete it, or on the "create" button to create a new template.
By clicking on the name of a template you will see its details, for example, the screenshot below shows the details for the basic monitoring module template.
Here you can see the name and description of the template in the first two fields of the form.
Below is the list of modules included in this template.
Finally, there is the form for adding modules, being able to filter by module group, and then select the module and add it.
In order to delete a module, select it from the right column (by clicking on the top-right box you will select all) and click on the 'Delete' button.
1.4.1 Creating new module templates
In order to create a new module template, go to the main management page, Configuration > Module templates and click on "Create" at the bottom-right side of the page.
A page containing the creation form for new local components will appear:
Enter the name and description for the new template and click on the "Create" button.
Then you may add modules to the template.
Select the modules at the bottom, filtering them by group if necessary and click on the "Add" button.
Keep in mind that you may delete the unwanted modules by selecting them and clicking on the "Delete" button.
1.4.2 Applying a module template to an agent
In order to apply one of the existing monitoring module templates or a recently created one, click on Monitoring > Views > Agent Detail as shown below.
Select one of the agent's modules:
Once you see this window, click on the "Templates" tab at the top of the page.
On the following picture, modules that already contain an agent and existing module templates are displayed. Select one and apply it to the agent.
Select a template and click on the "Assign" button. The modules contained in this template will be added automatically. Once applied the template, you may delete some of the modules by clicking on the "X" at the right-side column, or you may edit them clicking on the tool icon.
1.5 Component Groups
In order to help sorting and classifying components, component groups have been created. Components are associated to groups when created.
In order to see the existing component groups, go to Resources > Component groups:
The already existing groups and their description is shown on the picture below.
You may view the details on the groups by clicking on their name, delete them by clicking on the "X" at the right side or create new ones by clicking on the "Create" button on the bottom.
If you intend to create a new components group, click on the "Create" button and fill out the form fields.
Just provide a name for the group and determine whether it has a parent among the existing groups or not. Then click on the "Create" button once you are done.
Add as many new components to your newly created component group as you like.