git://git.onelab.eu
/
monitor.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- check if the site is in 'pending' state on all site actions
[monitor.git]
/
monitor
/
scanapi.py
diff --git
a/monitor/scanapi.py
b/monitor/scanapi.py
index
22e3e74
..
16e1fd2
100644
(file)
--- a/
monitor/scanapi.py
+++ b/
monitor/scanapi.py
@@
-237,8
+237,11
@@
class ScanNodeInternal(ScanInterface):
echo ' "kernel_version":"'`uname -a`'",'
echo ' "bmlog":"'`ls /tmp/bm.log`'",'
echo ' "bootcd_version":"'`cat /mnt/cdrom/bootme/ID`'",'
echo ' "kernel_version":"'`uname -a`'",'
echo ' "bmlog":"'`ls /tmp/bm.log`'",'
echo ' "bootcd_version":"'`cat /mnt/cdrom/bootme/ID`'",'
+ echo ' "boot_server":"'`cat /mnt/cdrom/bootme/BOOTSERVER`'",'
+ echo ' "install_date":"'`python -c "import os,time,stat; print time.ctime(os.stat('/usr/boot/plnode.txt')[stat.ST_CTIME])"`'",'
echo ' "nm_status":"'`ps ax | grep nm.py | grep -v grep`'",'
echo ' "dns_status":"'`host boot.planet-lab.org 2>&1`'",'
echo ' "nm_status":"'`ps ax | grep nm.py | grep -v grep`'",'
echo ' "dns_status":"'`host boot.planet-lab.org 2>&1`'",'
+ echo ' "iptables_status":"'`iptables -t mangle -nL | awk '$1~/^[A-Z]+$/ {modules[$1]=1;}END{for (k in modules) {if (k) printf "%s ",k;}}'`'",'
echo ' "princeton_comon_dir":"'`ls -d /vservers/princeton_comon`'",'
echo ' "uptime":"'`cat /proc/uptime`'",'
echo ' "princeton_comon_dir":"'`ls -d /vservers/princeton_comon`'",'
echo ' "uptime":"'`cat /proc/uptime`'",'
@@
-259,6
+262,8
@@
EOF """)
break
else:
values.update({'kernel_version': "", 'bmlog' : "", 'bootcd_version' : '',
break
else:
values.update({'kernel_version': "", 'bmlog' : "", 'bootcd_version' : '',
+ 'boot_server' : '',
+ 'install_date' : '',
'nm_status' : '',
'fs_status' : '',
'uptime' : '',
'nm_status' : '',
'fs_status' : '',
'uptime' : '',
@@
-277,7
+282,7
@@
EOF """)
continue_slice_check = True
oval = values['princeton_comon_dir']
continue_slice_check = True
oval = values['princeton_comon_dir']
- if "princeton_comon
_dir
" in oval:
+ if "princeton_comon" in oval:
values['princeton_comon_dir'] = True
else:
values['princeton_comon_dir'] = False
values['princeton_comon_dir'] = True
else:
values['princeton_comon_dir'] = False
@@
-384,6
+389,11
@@
EOF """)
values['observed_status'] = 'DOWN'
values['firewall'] = True
values['observed_status'] = 'DOWN'
values['firewall'] = True
+ #if values['port_status']['22'] == "open" and \
+ # values['port_status']['80'] == "closed" and \
+ # values['port_status']['806'] == "open" :
+ # email_exception("%s port 80 blocked" % nodename, "possible VSERVER ref blocked")
+
#if not values['external_dns_status']:
# email_exception("%s DNS down" % nodename)
#if not values['external_dns_status']:
# email_exception("%s DNS down" % nodename)