Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev.icinga.com #10622] Add by_ssh_options argument for the check_by_ssh plugin #3657

Closed
icinga-migration opened this issue Nov 13, 2015 · 9 comments

Comments

Projects
None yet
1 participant
@icinga-migration
Copy link
Member

commented Nov 13, 2015

This issue has been migrated from Redmine: https://dev.icinga.com/issues/10622

Created by netphantm on 2015-11-13 12:28:49 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-11-18 19:31:42 +00:00)
Target Version: 2.4.1
Last Update: 2015-11-18 19:31:42 +00:00 (in Redmine)

Backport?: Already backported
Include in Changelog: 1

diff --git a/doc/7-icinga-template-library.md b/doc/7-icinga-template-library.md
index a79c2b8..3df234c 100644
--- a/doc/7-icinga-template-library.md

**+ b/doc/7-icinga-template-library.md
@ -128,6 +128,7 @ by_ssh_quiet | Optional. Whether to suppress SSH warnings. Defaults to fa
by_ssh_warn | Optional. The warning threshold.
by_ssh_crit | Optional. The critical threshold.
by_ssh_timeout | Optional. The timeout in seconds.
+by_ssh_options | Optional. Call ssh with '-o OPTION' (may be used multiple times).

### clamd

diff --git a/itl/command-plugins.conf b/itl/command-plugins.conf
index 949fe41..97e582d 100644
--- a/itl/command-plugins.conf

**+ b/itl/command-plugins.conf
@ -1369,6 +1369,12 @ object CheckCommand "by_ssh" {
"-w" = "$by_ssh_warn$"
"-c" = "$by_ssh_crit$"
"-t" = "$by_ssh_timeout$"

  • "-o" = {
  • set_if = "$by_ssh_options$"
  • description = "Provide ssh options (may be repeated)"
  • repeat_key = true
  • order = 1
  • }
    }

vars.by_ssh_address = "$check_address$"

Attachments

Changesets

2015-11-18 19:29:30 +00:00 by netphantm e02d2e1

Add by_ssh_options argument for the check_by_ssh plugin

fixes #10622

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>

2015-11-18 19:30:42 +00:00 by (unknown) 7a3edc4

Update AUTHORS

refs #10622

2015-11-18 19:31:14 +00:00 by netphantm b43d225

Add by_ssh_options argument for the check_by_ssh plugin

fixes #10622

Signed-off-by: Gunnar Beutner <gunnar@beutner.name>

2015-11-18 19:31:16 +00:00 by (unknown) 9f348c6

Update AUTHORS

refs #10622
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 13, 2015

Updated by gbeutner on 2015-11-13 18:57:58 +00:00

  • Status changed from New to Feedback
  • Assigned to set to netphantm

I'm pretty sure you want to use 'value' instead of 'set_if'. Did you test this command?

Also, please update your patch so that it has the same format like for 'git format-patch' and attach it as a file to the ticket.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 14, 2015

Updated by netphantm on 2015-11-14 12:13:19 +00:00

  • File added 0001-provide-ssh-options.patch

I changed it to value and tested it, here is a debug.log entry:
[2015-11-14 12:27:39 +0100] notice/Process: PID 13081 ('/usr/lib/nagios/plugins/check_by_ssh' '-H' '10.33.5.38' '-l' 'root' '-p' '22' '-t' '' '-o' 'StrictHostKeyChecking=no' '-o' 'PasswordAuthentication=no' 'o' 'ControlPath=/var/lib/icinga2/ssh-cmaster-sockets/ssh%r@%h' '-o' 'ControlMaster=no' '-o' 'IdentitiesOnly=yes' '-C' ' /usr/lib64/nagios/plugins/check_swap -w 50 -c 25') terminated with exit code 0
I attached the patch as you wanted.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 17, 2015

Updated by gbeutner on 2015-11-17 21:11:35 +00:00

Please update the patch to include your real name.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by netphantm on 2015-11-18 06:56:04 +00:00

  • File added 0001-provide-ssh-options.patch
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by gbeutner on 2015-11-18 19:25:18 +00:00

  • Status changed from Feedback to Assigned
  • Assigned to changed from netphantm to gbeutner

Argument order doesn't seem to matter for o I'm going to remove the 'order = 1' attribute. Also, repeat_key is true by default, so there's no need to specify that.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by gbeutner on 2015-11-18 19:27:37 +00:00

Also, apparently you indented your changes with spaces - fixing that too. :)

@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by gbeutner on 2015-11-18 19:30:06 +00:00

  • Subject changed from provide ssh options to by_ssh command to Add by_ssh_options argument for the check_by_ssh plugin
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by gbeutner on 2015-11-18 19:31:37 +00:00

  • Target Version set to 2.4.1
  • Backport? changed from TBD to Yes
@icinga-migration

This comment has been minimized.

Copy link
Member Author

commented Nov 18, 2015

Updated by netphantm on 2015-11-18 19:31:42 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset e02d2e1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.