Am 24.10.2016 um 01:05 schrieb Antony Stone:

Hi Anthony,
>> I say "almost" because it's SSH, but it's not on port 22.
>>
>> I've found section 7.2 of
>> http://docs.icinga.org/icinga2/latest/doc/module/icinga2/chapter/agent-base
>> d- checks-addon and I've learned a bit more from
>> https://wiki.icinga.org/display/howtos/Using+SSH+as+remote+client+for+Icing
>> a2 and I've also found from "check_by_ssh --help" that this plugin accepts
>> a -p parameter to specify the port number to connect to.
>>
>> However, I can't work out how to pass this parameter to check_by_ssh based
>> on the above examples.
> Oh, I forgot to add - I can't even work out what "import by_ssh" is importing 
> - just in case that might give me a clue as to how to pass the -p parameter.  
> Where is "by_ssh" imported from?

you don't supply the parameters directly (as it has been with Nagios).
Instead, at least for the predefined check commands, you simply defines
variables within your host or service definition. An example:

object Service "my service" {
  import "by_ssh"
  vars.by_ssh_port = "2022"
  vars.by_ssh_command = "cat /etc/passwd"
}

You should have a look at the fantastic documentation for all supported
options (variables):

http://docs.icinga.org/icinga2/latest/doc/module/icinga2/toc#!/icinga2/latest/doc/module/icinga2/chapter/plugin-check-commands#plugin-check-command-by-ssh

Best regards,
Stephan

_______________________________________________
icinga-users mailing list
icinga-users@lists.icinga.org
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to