1. Home
  2. Knowledge Base
  3. Articles (EN/ES/FR)
  4. Create a server plugin for Pandora FMS

Create a server plugin for Pandora FMS

A remote plugin is a script or executable that supports parameters and returns a value.

To register a plugin in Pandora FMS we will go to the console administration section, and in it we will click on Servers; then press on Plugins, then click on the Add button. A new page will be opened with a form, where we will have to fill in the fields for the execution of our plugin:

  • Name: Name of the plugin.
  • Plugin type: There are two types of plugins: standard and Nagios type. Standard plugins are scripts that execute actions and support parameters. Nagios plugins are, as their name indicates, Nagios plugins that can be used in Pandora FMS. The difference is mainly that Nagios plugins return an error level to indicate if the test has been successful or not, and an additional descriptive string. This description is not a numerical value that can be used as a module value, so in this case we will use it to update the module description.
  • Max. timeout: It is the time of expiration of the complement. If no response is received in that time, the execution will be stopped. This is a very relevant element when implementing monitoring with plugins, because if the time it takes to run the plugin is greater than this number, we can never get values with it (it will not even be initialized). This value should always be higher than the time that normally takes to return a value the script/executable used as a plugin.
  • Description: Description of the complement.
  • Plug-in command: Path to the plugin’s executable. By default, if the installation has been standard, they will be in the directory /usr/share/pandora_server/util/plugin/ . Although it can be any route in the system. For this case, write:
/usr/share/pandora_server/util/plugin/udp_nmap_plugin.sh
  • Plug-in parameters: A string with the plugin parameters, which will go after the command and a blank space. This field accepts macros such as _field1_ , _field2_ , _fieldN_ . This is where the most complex part of a plugin’s operation lies. Don’t panic, we’ll see it with an example.
  • Parameters macros: It is possible to add unlimited macros for use in the plugin parameter field. These macros will appear as text fields in the module configuration for the user to abstract the complexity of using a plugin type module. The idea is that the user uses a plugin as if it were a “library” module in which he fills in fields, without having to know how it works underneath. The macro definition allows the user to fill in the script call parameters without knowing how it works, neither the script nor the way to call it.
    • Description: A short string describing the macro. This will be the label that will appear next to the field on the form.
    • Default value: Value assigned to the default field.
    • Help: An explanatory text of the macro, to show some example of use or to better explain what the field is for.

For more information here is the link to our wiki:

https://pandorafms.com/manual/en/documentation/03_monitoring/03_remote_monitoring#monitoring_with_server_remote_plugins

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support