On Monday 24 October 2016 at 08:22:39, Stephan Tesch wrote: > Am 24.10.2016 um 01:05 schrieb Antony Stone: > > > >> 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-b > >> ase d- checks-addon and I've learned a bit more from > >> https://wiki.icinga.org/display/howtos/Using+SSH+as+remote+client+for+Ic > >> ing 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/late > st/doc/module/icinga2/chapter/plugin-check-commands#plugin-check-command-by > -ssh
Excellent! Thanks :) I wish that had been referenced in section 7.2... Antony. -- These clients are often infected by viruses or other malware and need to be fixed. If not, the user at that client needs to be fixed... - Henrik Nordstrom, on Squid users' mailing list Please reply to the list; please *don't* CC me. _______________________________________________ icinga-users mailing list icinga-users@lists.icinga.org https://lists.icinga.org/mailman/listinfo/icinga-users