diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b25c15b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*~ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8216bb3..11be77c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to rattail-shinken will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). +## [0.6] - 2019-10-14 +### Changed +- Add the `check_systemd_service` command. + ## [0.5] - 2018-12-12 ### Changed - Add `check_supervisor_process` command. diff --git a/libexec/check_rattail_daemon_by_ssh.py b/libexec/check_rattail_daemon_by_ssh.py index 1ce64c2..5aa0391 100755 --- a/libexec/check_rattail_daemon_by_ssh.py +++ b/libexec/check_rattail_daemon_by_ssh.py @@ -108,7 +108,11 @@ if __name__ == '__main__': # Ok now connect, and try to get values for memory client = schecks.connect(hostname, port, ssh_key_file, passphrase, user) - result, exitcode = execute_check(client, check_path) - - print result - sys.exit(exitcode) + result = execute_check(client, check_path) + if result is False: + print("failed to execute remote check!") + sys.exit(3) + else: + output, exitcode = result + print(output) + sys.exit(exitcode) diff --git a/pack/commands.cfg b/pack/commands.cfg index 96260fa..29be142 100644 --- a/pack/commands.cfg +++ b/pack/commands.cfg @@ -9,3 +9,8 @@ define command { command_name check_supervisor_process command_line $PLUGINSDIR$/check_rattail_daemon_by_ssh.py -H $HOSTADDRESS$ -p $_HOSTSSH_PORT$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -r "check-supervisor-process $ARG1$" } + +define command { + command_name check_systemd_service + command_line $PLUGINSDIR$/check_rattail_daemon_by_ssh.py -H $HOSTADDRESS$ -p $_HOSTSSH_PORT$ -u $_HOSTSSH_USER$ -i $_HOSTSSH_KEY$ -P "$_HOSTSSH_KEY_PASSPHRASE$" -r "check-systemd-service $ARG1$" +} diff --git a/package.json b/package.json index 7c865eb..4f01fd1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "rattail", "types": ["pack"], - "version": "0.5", + "version": "0.6", "homepage": "https://rattailproject.org/", "author": "Lance Edgar", "contributors": [