-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 1/27/2014 2:33 PM, Michael Friedrich wrote:
> On 27.01.2014 20:29, Mark Haney wrote: This might be a stupid
> question, but I'm looking for the proper method of checking more
> than one service for a host. In this case I want to check the load
> (using NRPE) as well as check the PostgresQL DB on a particular
> server. Because the check_pgsql plugin requires different
> information do I need to specify those via macros in a separate
> command or service definition?
>
> Also, how do I add that service check to the existing host config
> file I already have? Just add it in:
>
> object Host "PostgresQL" inherits "linux-server" { display_name =
> "PostgresQL Server",
>
> services["checkload"] = { templates = [ "generic-service" ],
> notifications[ "mail" ] = { templates = [ "mail-notification" ],
> notification_command = "mail-service-notification", users = [
> "mhaney" ], }, check_command = "check_nrpe", macros = { command =
> "check_load", }
>
> /** ADD NEW services["checkpgsql"] HERE? */
>
> },
>
>> try it. it's an array of inline services. the best example is
>> provided in localhost.conf
>
Well, I'm halfway there I think. When I setup the additional service
like this:
services["checkpgsql"] = {
templates = [ "generic-service" ],
check_command = "check_nrpe",
macros = {
command = "check_pgsql",
logname = "admin",
password = "******",
}
},
Icinga tells me 'NRPE: Command 'check_pgsql' not defined. Am I
missing something? I know I need to pass along a username and
password, but I can't seem to figure out /where/ that goes. I tried
to add the params to the check_nrpe CheckCommand object, but it didn't
work. Do I need to do something like this:
object CheckCommand "check_nrpe" inherits "plugin-check-command" {
command = [ "$plugindir$/check_nrpe",
"-H", "$address$",
"-c", "$command$",
],
command = [ "$plugindir$/check_pgsql",
"-H", "$address$",
"-l", "$logname$",
"-p", "$password$",
],
}
Or, if not, how do I make those options macros instead of passing them
in the Host configuration file?
(On a side note, does it make sense to even make those options macros?)
- --
Mark Haney
Network Administrator/IT Support
Practichem
W:919-714-8428
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQEcBAEBAgAGBQJS5rn9AAoJEDgEuzPE0JQv/4IH/19qVHmZX+EF+rFZq3Gsl8XF
2NYF2e+JubgL/5UDB1MUPBs7fj3RSpN0wTmcj8xu3KB8yD+KIIXFqyA1VIJ9N8Cm
9lO/RZXpX/mwM0AGJGariAdSHAxYsnMTV/O96hIYkb63DL/hXjXCZW0koRDxXhz0
wyTc244sytnF5ydIgCl9/tD4soYZzVonreVmMG27WANVU+VUTGy0388ZbyFLHRtm
PeVSitgnm6jGSvoLWZEVMXvD4nWJrGHIpeO6uTcf/AkeFpa+QC0ALNsdN5f5bhOX
MrvfatWgSy4s23gl5avaRR+7OH5iOzXqqSZ6z7R9qRF7HBRal/+hFq8kcDC8tZo=
=uKXx
-----END PGP SIGNATURE-----
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users