On 07.07.2014 15:58, [email protected] wrote:
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?
Wherever they fit for your understanding. Just make sure they are
included (I'd put them into conf.d/commands.conf being a lazy ass).
I'm struggling with understanding how commands are defined, sorry.
That's why there's documentation.
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#commands
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?
By default in the Plugin Command Templates described in
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#plugin-check-command-disk
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.
Probably you should read this chapter as well.
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/configuring-icinga2#plugin-check-commands
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?
Better explained here
http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/monitoring-basics#command-plugin-integration
-----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
--
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