Service monitoring
Introduction
A Service in Pandora FMS is a grouping of Information Technology (Information Technology, abbreviated IT) resources based on their functionalities.
PFMS Services are logical groupings that include hosts, routers, switches, firewalls, webs and even other Services: The official company website, the Customer Relationship Management (CRM), some support application, or even all the printers in a company or home.
Services in Pandora FMS
The basic monitoring in Pandora FMS consists of collecting metrics from different sources, representing them as monitors (called Modules). Service-based Monitoring allows grouping the previous elements in such a way that, by establishing certain margins based on the accumulation of failures, you can monitor groups of elements of a different nature and their relationship in a larger and general service.
Service monitorings are represented under three concepts: in a simple way, by their importance weights, and chained by cascaded events.
How the simple mode works
Menu Operation → Topology maps → Services → Service tree view → Create service.
In this mode it is only necessary to indicate which elements are critical.
Only the elements marked as critical will be taken into account to perform the calculations, and only the critical state of these elements will have value.
- When between
0and50% of the critical elements are in thecriticalstate, the service will enter the warning statewarning. - When more than
50% of the critical elements enter thecriticalstate, the service will enter thecriticalstate.
How services work according to their weight
A Service Tree must be defined in which both the elements that affect the application or applications, and the degree to which they affect them, are indicated.
All elements added to the service trees will correspond to information that is already being monitored, whether in the form of modules, specific agents, or other services.
To indicate the degree to which the states of each element affect the global state, a weight sum system will be used, so that the most important ones (with more weight) will be more relevant to adjust the global state of the complete service to an incorrect state rather than less important elements (with less weight).
Root services
A root Service is one that is not part of another Service. This provides a more efficient distributed logic and allows applying a cascade protection system based on services.
Services in Command Center allow adding other Services, as well as Modules and/or Agents, as elements of a Service.
Synchronous mode
The Network Server follows a calculation chain hierarchically, from top to bottom, to obtain the state of each and every one of the components of the root service. For services with up to a thousand elements, it is a satisfactory solution.
Asynchronous mode
When checking Asynchronous mode the service will be evaluated independently, at its own interval, even if it is part of another service, being an exception to the default behavior, synchronous, where the evaluation is done in cascade from the root service. You can force the execution of an asynchronous service independently, even if it is part of a higher service (root service).
This allows a service to be executed asynchronously with respect to its main service and the secondary services can run independently and do not wait for the main service to finish.
If a service that is part of another service (subservice) is marked as asynchronous at the time of the root service evaluation, it will not execute the calculation of the asynchronous service status, but will take as valid the last value stored by it since the last time it was executed.
This configuration can be a great help when evaluating elements in large services to improve their performance, in addition to allowing giving execution priority to services that are elements of a root service.
Creating a new Service
Pandora FMS Server
It is required that the Network Server is running on the Pandora FMS Server.
Introduction
Menu Operation → Topology maps → Services → Service tree view → Create service.
Once all devices are monitored, within each Service to be created, you must add all the modules, agents, or subservices necessary to monitor the Service.
Initial configuration
Required fields (General data tab):
- Name: You can specify a service name or use the function to generate a random name.
- Descriptio: It is used as an identifier in Service tree view and Service table view.
- Agent to store data: The Service stores the data in Modules, therefore it is necessary to introduce an agent to be the container for these modules (and at the same time it will also contain the alarms).
Optional fields (General data tab):
- Mode Smart: The weights and elements that are part of the Service will be automatically calculated based on established rules.
- Mode Manual: The weights and elements that are part of the Service will be manually indicated with fixed values.
- Critical: Weight threshold to declare the service in critical status. In Mode Smart mode this value is a percentage, by default
50. - Warning: Weight threshold to declare the service in warning status. In Mode Smart mode this value is a percentage, by default
30. - Unknown elements as critical: Allows indicating that elements in unknown status contribute their weight as if they were a critical element.
- Asynchronous mode: By default, the calculation of the statuses for each component is performed synchronously. By activating this option, the calculation of the subordinate components will be performed asynchronously.
- Cascade protection enabled: To prevent a cascade of alerts. When active, elements belonging to the service will not trigger their own alert, but only the service alert will be triggered. For it to work, the Cascade protection services tokens must be active in the agents and modules.
Optional fields (S.L.A. tab):
- Calculate continuous SLA: Activates the creation of Service Level Agreement (SLA) modules for the current Service. It is used for cases in which the number of necessary Services is so high that it can affect performance. If after creating the Service this option is deactivated, the data history of these Modules will be deleted, so information will be lost.
The interval at which all calculations of the service modules will be performed will depend on the interval of the agent configured as container.
Element configuration
Once a Service has been created, access the Service editing form and select the Add items tab. The form will be slightly different if the service is in smart mode or in manual mode. In Item type to be added you must select module, agent or service.
If Services is chosen in Item type to be added, you must always take into account that the services that will appear in the drop-down list are those that are not ancestors of the service, this is necessary to show a correct tree-like dependence structure between services.
In Service items summary, the selected elements will be shown in separate boxes. Finally, save the changes by pressing the Add elements + button.
Manual Mode
To calculate the status of a service, the weight of each of its elements will be added based on their status, and if it exceeds the thresholds established in the service for warning or critical, the service status will change to warning or critical accordingly.
The following fields will only be available for services in manual mode:
critical.warning.unknown.normal.
Smart Mode
In Smart mode services, their status is calculated as follows:
- Critical elements contribute the entirety of their percentage to the service weight. This means that if there are 4 elements in the service and 1 of them is critical, that element will add 25 % to the service weight. If instead of 4 elements there were 5, the critical element would add 20 % to the service weight.
- Elements in warning contribute half of their percentage to the service weight. This means that if there are 4 elements in the service and 1 of them is in warning, that element will add 12.5 % to the service weight. If instead of 4 elements there were 5, the element in warning would add 10 % to the service weight.
Modo Dynamic
- Matching object types: Drop-down list to choose whether the elements for which the dynamic rules will be evaluated, and which will be part of the service, will be Agents or Modules.
- Filter by group: Rule to indicate the group to which the element must belong to be part of the service.
- Having agent name: Rule to indicate the Agent name that the element must have to be part of the Service. A text that must be part of the desired Agent name will be indicated.
- Having module name: Rule to indicate the Module name that the element must have to be part of the Service. A text that must be part of the desired Module name will be indicated.
- Use regular expressions selector: If this option is activated, the search mechanism using MySQL regex will be used.
- Having custom field name: Rule to indicate the custom field name that the element must have to be part of the service. A text that must be part of the desired custom field name will be indicated.
- Having custom field value: Rule to indicate the custom field value that the element must have to be part of the service. A text that must be part of the desired custom field value will be indicated. It is also possible to add searches in more custom fields with the Add custom field match button.
For custom fields, texts must be placed in both fields for the search to be considered.
Services Wizard
In the top right tab, when creating or editing a service, the wizard to add elements appears with the following options:
- Add items: To add elements (agents, modules or services).
- Edit items: To edit elements.
- Delete items: To delete elements.
To add elements, the wizard presents a drop-down list in Item type to be added and by default presents the option to add agents to the service. To do this, click on Agents and immediately, right next to it, the available agents will be displayed by name. You can also type in this element (free search) and it will automatically show the agent matches by name. If the agent list is extensive, you can filter by groups in the drop-down list named Group.
For modules and services the selection process is similar, except that in the case of modules there is no free search for elements.
In all cases, one or more elements must be chosen and then press the Add selected button. Below, in Service items summary there will be a summary with the agents, modules and services added to the service.
Once the desired elements are selected in Service items summary, press Add elements to add and save the new components to the service being edited.
Modules created when configuring a service
- SLA Value Service: It is the percentage value of the SLA compliance (
async_data). - Service_SLA_Service: Shows whether the SLA is being met or not (
async_proc). - Service_Service: Shows the sum of the service weights (
async_data).
Viewing Services
Simple list of all services
Menu Operation → Topology maps → Services → Service tree view.
This is the operation list that shows all the created services to which the user has access rights in the Pandora FMS Console.
The ACL permission restriction is applied to the first level. Then the ACL restriction will work when clicking on a subservice and, if applicable, an unauthorized access attempt will be generated in the Audit log.
Table of all services
Operations with elements
To add elements, a dialog box is available that allows you to select agents, modules or other services, and by clicking on each of them at the bottom it will show the available elements to select and be added with Add selected. Once you have finished adding elements, click on the Add elements button to save the changes. Editing and deleting works similarly.
- In the cases of addition and edition, the service must be in Manual mode.
- See also “Massive operations: Services” to perform similar operations applied to services.
How to interpret service data
Planned downtimes recalculate the value of the SLA reports taking into account that the “back in time” recalculation with planned downtimes added a posteriori is allowed (this is an option that must be globally activated in the general setup). When it comes to a service SLA report, if there is a planned downtime that affects one or more elements of the service, it is considered that the planned downtime affects the entire service, since the impact that the downtime has on the overall service cannot be defined.
It is important to note that this is at the report level, the service trees and the information they present in the Visual Console are not altered with respect to planned downtimes created after their supposed execution. These compliance values, in service percentage, are calculated in real time based on historical data of the same service.
Weights are handled somewhat differently in simple mode, as only the critical weight exists, with the possibility of falling into two states apart from the normal one. Each element is given a weight of 1 in critical and 0 in the rest, and every time a change is made in the service elements, the service weights are recalculated. The service warning weight is negligible, it always has a value of 0.5 because if it is left at 0 the service is always going to be at a minimum in warning (but the warning weight is not used in simple mode).
The critical weight is calculated in such a way that it is half of the sum of the critical weights of the elements, which is 1. If there are three elements, the service's critical weight is 1.5, then the server is in charge of deciding whether the critical weight has been exceeded or equaled in order to change the service to critical or warning status.
Cascade Protection Services (CPS)
The Cascade Protection Services (CPS) aims to avoid alert saturation (noise) in the system. Its main function is to inhibit the triggering of alerts in “child” elements (agents, modules or subservices) if one of their “parent” elements already has an active alert.
Protection for services
It applies to the services themselves. When a service is created, a linked module is automatically generated that manages its alert status.
- Identification: This module is identified because its
prediction_modulefield has the value2and its name ends in_service. - Behavior: When it is said that the service alert is triggered, technically the alert of that module is triggered. For example, in a tree with a service branch in Command Center and two nodes, if an agent belongs to different services and goes into critical status, the service (its module) will also go into critical status, triggering the service alert.
Protection in agents and modules
It applies when the agents and modules have the cascade protection option active.
- Operation: If a module has a configured alert and the CPS activated, this alert will be inhibited provided that the alert of the service to which it belongs has already been triggered previously.
Root cause analysis
A macro called _rca_ is available which will indicate the root cause of the service status. To use it, it will be added to the template that has been associated with the service. This macro will return an output similar to:
[Aplicación Web → HW → Apache server 3]
[Web application → HW → Apache server 4]
[Web application → HW → Apache server 10]
[Web application → DB Instances → MySQL_base_1]
[Web application → DB Instances → MySQL_base_5]
[Web application → Load balancer → 192.168.10.139]
This example indicates that:
- Apache servers
3,4and10are in critical status. - MySQL databases
1and5are stopped. - Load balancer
192.168.10.139is not responding.
This added information allows debugging the reason for the service status, reducing research tasks.
Service groupings
Services are logical groupings that form part of the business structure of an organization. That is why grouping services can make a certain sense, since in many cases there can be dependencies between them, making up, for example, a general service (the company) several more particular services (corporate website, communications, etc.).
To group services, it is necessary that both the general or higher service are created, as well as the lower services that will be added to it to create the logical tree-shaped structure.




