r106937 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106936‎ | r106937 | r106938 >
Date:10:57, 21 December 2011
Author:petrb
Status:deferred
Tags:tools 
Comment:
Little update for it to send less output than now
Modified paths:
  • /trunk/tools/nparser/fetch.sh (modified) (history)

Diff [purge]

Index: trunk/tools/nparser/fetch.sh
@@ -11,9 +11,8 @@
1212 exit 1
1313 fi
1414 mkdir "$temp"
15 - wget https://labsconsole.wikimedia.org/wiki/Special:Ask/-5B-5BResource-20Type::instance-5D-5D/-3FInstance-20Name/-3FInstance-20Type/-3FProject/-3FImage-20Id/-3FFQDN/-3FLaunch-20Time/-3FPuppet-20Class/-3FModification-20date/-3FInstance-20Host/-3FNumber-20of-20CPUs/-3FRAM-20Size/-3FAmount-20of-20Storage/limit%3D500/format%3Djson -O $temp/novalist
16 - if [ "`diff old/* $temp/*`" = "" ];then
17 - echo OK
 15+ wget https://labsconsole.wikimedia.org/wiki/Special:Ask/-5B-5BResource-20Type::instance-5D-5D/-3FInstance-20Name/-3FInstance-20Type/-3FProject/-3FImage-20Id/-3FFQDN/-3FLaunch-20Time/-3FPuppet-20Class/-3FModification-20date/-3FInstance-20Host/-3FNumber-20of-20CPUs/-3FRAM-20Size/-3FAmount-20of-20Storage/limit%3D500/format%3Djson -O $temp/novalist -o logs
 16+ if [ "`diff old/* $temp/*`" != "" ];then
1817 out=`./parser "$temp"`
1918 if [ `echo $out | grep -c Error` -gt 0 ];then
2019 echo Unable to parse the file
@@ -24,7 +23,9 @@
2524 list2=`echo "$out" | awk '{ if (p==1) print $0; p=2 } { if ($0 ~ /SSH:/) p=1 }'`
2625 for instance in `echo "$instances"`
2726 do
 27+ if [ "$instance" != "nagios" ];then
2828 cat default.cfg | sed "s/NAME/$instance/" > conf/$instance".cfg"
 29+ fi
2930 done
3031 cp generic/* conf
3132 cat hostgroup | sed "s/#web/$list1/" | sed "s/#SSH/$list2/" > conf/hostgroups_nagios2.cfg

Status & tagging log