Plugin loaded but not visible in Icinga Director extern command section

Icinga2 version: r2.13.7-1
Icinga Web 2 Version 2.11.4

Plugin: https://github.com/Tylan/check_snmp_printer/tree/master

Hey there,

I installed the plugin check_snmp_printer using the README from git.
The check_snmp_printer file is under /usr/lib/nagios/plugins
The printer.conf is under /usr/share/icinga2/include/plugins-contrib.d
This directory is included in icinga2.conf:
/**

  • Icinga 2 configuration file
    • this is where you define settings for the Icinga application including
  • which hosts/services to check.
  • For an overview of all available configuration options please refer
  • to the documentation that is distributed as part of Icinga 2.
    */

/**

  • The constants.conf defines global constants.
    */
    include “constants.conf”

/**

  • The zones.conf defines zones for a cluster setup.
  • Not required for single instance setups.
    */
    include “zones.conf”

/**

  • The Icinga Template Library (ITL) provides a number of useful templates
  • and command definitions.
  • Common monitoring plugin command definitions are included separately.
    */
    include itl
    include plugins
    include plugins-contrib
    include manubulon

plugins-contrib
/* Icinga 2 | (c) 2012 Icinga GmbH | GPLv2+ */

/**

  • This is a directory for various contributed command definitions.
  • Plugins should be organized by a category, e.g. database plugins are in
  • plugins-contrib.d/databases.conf
    */

include_recursive “plugins-contrib.d”

I can use the command with ./check_snmp_printer and get an output. But I do not see the command in the Icinga Director. If I create a new one named snmp_printer I get this error:
[2024-03-18 08:40:41 +0100] information/cli: Icinga application loader (version: r2.13.7-1)
[2024-03-18 08:40:41 +0100] information/cli: Loading configuration file(s).
[2024-03-18 08:40:41 +0100] critical/config: Error: Object ‘snmp_printer’ of type ‘CheckCommand’ re-defined: in [stage]/zones.d/director-global/commands.conf: 1042:1-1042:34; previous definition: in /usr/share/icinga2/include/plugins-contrib.d/printers.conf: 2:1-2:34
Location: in [stage]/zones.d/director-global/commands.conf: 1042:1-1042:34
[stage]/zones.d/director-global/commands.conf(1040): }
[stage]/zones.d/director-global/commands.conf(1041):
[stage]/zones.d/director-global/commands.conf(1042): object CheckCommand “snmp_printer” {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[stage]/zones.d/director-global/commands.conf(1043): import “plugin-check-command”
[stage]/zones.d/director-global/commands.conf(1044): command = [ “/usr/lib/nagios/plugins/check_snmp_printer” ]
[2024-03-18 08:40:41 +0100] critical/cli: Config validation failed. Re-run with ‘icinga2 daemon -C’ after fixing the config.

So the plugin is loaded but why it is not visible in Icinga Director extern commands section?

Hi @vmandel,
Firstly I would like to say, that using the formatting options here would be really helpful. If you mark the configuration sections as code snippets, they are easier to read :slight_smile:

Regarding your problem, you probably want to run a director kickstart to import the text based configuration into the director. The URL ends on /icingaweb2/director/dashboard?name=infrastructure#!/icingaweb2/director/kickstart

Hello Lorenz,
oh sorry for using the wrong format. This was my first post ever.

Thank you very much! Using the kickstart was the solution!