Add custom command using icingaweb2 director

This forum was archived to /woltlab and is now in read-only mode.
  • I am trying to add custom command using Icingaweb2 director module but no luck here.i am getting "execvpe(/usr/lib64/nagios/plugins/check_updates) failed: No such file or directory".Also i can not use the imported all command that comes with director initially.I can only use those plugin which are present nagios plugins folder.so how can i import plugin there?If any one can lead me to perfect solution that would be great for me as beginner here.


    TIA

    monitoring-portal.org/woltlab/cms/index.php?attachment/9408/
  • where do you use the plugin? the master, the sattelite an agent?

    is it present on the machine you are trying to execute it on?

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • if you inspect the service, there should be an indication, where he wants execute your said script. Can you verify that the script is deployed there?


    You can also look into the icinga2 log to see what happenes when the check is executed manually.

    Linux is dead, long live Linux


    Remember to NEVER EVER use git repositories in a productive environment if you CAN NOT control them

  • actually when I am going to execute any check_command from the imported command comes with director installation those are not working.The only command that working those exist in nagios plugins folder.so can you tell me how can i add custom check command or custom nagios pluginns in icingaweb2?thanks for your help again

  • Do you have the scripts that these commands need in the respective folder?

    Default for "PluginDir" is "/usr/lib/nagios/plugins"

    So you will need your "check_updates" script in this folder, as well as any other script you want to execute.


    Concerning your command:

    Why the skip_key for your "-c" argument?


    to get more scripts in you PluginDir you can install these packages (example for Ubuntu):

    Code
    1. monitoring-plugins - Erweiterungen für zu Nagios kompatible Überwachungssysteme
    2. monitoring-plugins-basic - Plugins for nagios compatible monitoring systems (basic)
    3. monitoring-plugins-common - Common files for plugins for nagios compatible monitoring
    4. monitoring-plugins-standard - Plugins for nagios compatible monitoring systems (standard)
    5. nagios-snmp-plugins - SNMP Plugins for nagios
  • thanks for the reply dear.actually i want to get some built in scripts or command like the default nagios have.the above plugins already installed in my nagios/plugins folder.is there any way to find some built in check command like the nagios plugins.

  • Can you be more precise as to what you mean by

    Quote

    .is there any way to find some built in check command like the nagios plugins.

    In the command list inside Icinga Director all commands displayed with a "pin" in the front are pre-defined.

    The are ready to use, you only need to configure:

    1. the needed fields for the arguments

    2. the corresponding plugin script in /usr/lib/nagios/plugins

    3. a service template that uses the check command

  • your check script check_apache_status.pl is not in the folder /usr/lib64/nagios/plugins or it is not readable/executable for Icinga2.

    icinga2 run under user "nagios" (if ubuntu) or icinga (if centos).