Add scripts to create myops-getqueryview:
[myops.git] / web / collect / automate / run.sh
diff --git a/web/collect/automate/run.sh b/web/collect/automate/run.sh
new file mode 100755 (executable)
index 0000000..521fb24
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+export PATH=$PATH:/usr/bin:/bin:/usr/sbin
+cd /usr/share/monitor-trunk/multiops/
+/usr/bin/curl -s --insecure 'https://128.112.139.113/monitor/query?tg_format=plain&object=nodes&nodehistory_hostname=&observed_status=on&uptime=on&hostname=on&rpmvalue=' | grep BOOT | tr ' ' ','  | awk -F, '{print $1}' > out.nodes
+
+T=`date --rfc-3339='seconds'| tr ' ' 'T'`
+/usr/share/monitor-trunk/tools/automate/fetch.py --nodelist out.nodes --timeout 180 --cmd install_on_node.sh --outdir install_on_node.sh-$T
+
+