By define it locally do you mean in /etc/icinga2/commands.conf for example? Or 
would I define the command in the host conf file?

I'm struggling with understanding how commands are defined, sorry.

I look at the default localhost.conf and the localhost directory full of 
various check services *.conf and I am having trouble understanding how the 
various commands are defined.

If I look at 'disk' for example:

object Service "disk" {
  import "generic-service"

  host_name = "localhost"
  check_command = "disk"
  vars.sla = "24x7"
}

The check_command = "disk".... where is the actual command for "disk" defined? 
It looks like the only place it is defined is in 
/usr/share/icinga2/include/command-plugins.conf which is why I thought I needed 
to define commands in that file.

So if I create a conf file to use check_wmi_plus and define the check command 
like the mentioned below

object CheckCommand "wmi_plus" {
   import ...

How does it know where/what "wmi_plus" is? Or does it just look at 
/usr/lib/nagios/plugins for "wmi_plus" and then I define vars.whatever for all 
the arguments?

-----Original Message-----
From: icinga-users [mailto:[email protected]] On Behalf Of 
Michael Friedrich
Sent: Monday, July 7, 2014 9:08 AM
To: [email protected]
Subject: Re: [icinga-users] Help with Icinga2 and check_wmi_plus

On 07.07.2014 14:41, [email protected] wrote:
> I’d like to use check_wmi_plus with Icinga2. I have check_wmi_plus 
> ready to go and all the configs are edited properly etc…
>
> I do have a couple of questions though.
>
> Do I need to define the commands in
> /usr/share/icinga2/include/command-plugins.conf?

No that file will be overridden on upgrade. Rather define it locally and submit 
a patch to upstream once capable for everyone.


>
> How do I define a username and password for the plugin to use? In 
> Nagios, I would add the username and password to the resources.conf 
> file and then reference them in the command as $ARG$ or something to 
> that effect. What is the equivalent of this in Icinga2?

One might define a global constant and use that in the check command 
definition. Something like

const GlobalWmiPlusPassword = "foo"

...
object CheckCommand "wmi_plus" {
   import ...
---
   vars.wmi_plus_username = GlobalWmiPlusPassword }



--
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461 http://www.netways.de | 
[email protected]

** Open Source Backup Conference 2014 - September - osbconf.org **
** Puppet Camp Duesseldorf 2014 - Oktober - netways.de/puppetcamp **
** OSMC 2014 - November - netways.de/osmc **
** OpenNebula Conf 2014 - Dezember - opennebulaconf.com ** 
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to