Skip to main content

Using custom plugins with CMA

Centreon Monitoring Agent can execute custom plugins. Use this feature if your monitoring needs are specific and not covered by native Centreon controls and plugins. Supported languages are: PowerShell, Perl, Python, Bash.

To get started, create your plugin: for example, you can use our developer guide.

Actions on the host​

Copy the plugin on the host, to the directory of your choice.

Actions in Centreon​

  1. On your central server, create a command that runs the plugin (or, if you were using NSClient++, adapt the existing command), depending on the language. Here is an example for each supported language:

    • PowerShell (Windows)

      "C:\\Program Files\\PowerShell\\7\\pwsh.exe" -File Z:\\tmp\\custom_script.ps1

      Adjust the interpreter's path according to the case and version.

    • Perl (Windows)

      C:/Strawberry/perl/bin/perl.exe Z:/tmp/custom_script.pl
    • Perl (Linux)

      /<path>/<to>/custom_script.pl
    • Python (Windows)

      "C:\\Program Files\\Python313\\python.exe" "Z:\\tmp\\custom_script.py"

      Adjust the interpreter's path according to the case and version.

    • Python (Linux)

      /<path>/<to>/custom_script.py
    • Bash (Windows, .bat)

      "Z:\\tmp\\custom_script.bat"
    • Bash (Linux, .sh)

      /<path>/<to>/custom_script.sh
  2. If you haven't already done so, create a host for the resource to be monitored.

  3. For each service model you want, select the command you just created.

  4. Deploy the configuration.