summaryrefslogtreecommitdiffstats
path: root/nagios/check_by_ssh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-04 22:06:01 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-04 22:06:01 +0200
commit6db35a5230578e296d9f493b28e6330e22569c8f (patch)
tree86ccb8725d2ae1a779459e2d8c01087c07a37e58 /nagios/check_by_ssh
parent78f3f37d3d8b213887fa6d47e32c5f9f05c0e299 (diff)
downloadconky-6db35a5230578e296d9f493b28e6330e22569c8f.tar.gz
conky-6db35a5230578e296d9f493b28e6330e22569c8f.tar.bz2
conky-6db35a5230578e296d9f493b28e6330e22569c8f.tar.xz
conky-6db35a5230578e296d9f493b28e6330e22569c8f.zip
Integrate also nagios-based monitoring here
Diffstat (limited to 'nagios/check_by_ssh')
-rwxr-xr-xnagios/check_by_ssh12
1 files changed, 12 insertions, 0 deletions
diff --git a/nagios/check_by_ssh b/nagios/check_by_ssh
new file mode 100755
index 0000000..1a488b2
--- /dev/null
+++ b/nagios/check_by_ssh
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+. $(dirname $0)/lib/nagios/nagios.sh
+
+
+port=$(nagios_find_host_param "ssh_ports" 22 "$@")
+user=$(nagios_find_host_param "ssh_users" root "$@")
+
+local port=$(cat setup/ssh_ports.txt | grep -P "^$host" | awk '{ print $2 }')
+
+#echo "$@" -o " -p $port -l $user UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" >> /tmp/xxx
+nagios_run "$@" -p $port -l $user -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no"