# if no agent is running, set it up.
ssh-agent > ${MONITOR_SCRIPT_ROOT}/agent.sh
source ${MONITOR_SCRIPT_ROOT}/agent.sh
+ ssh-add /etc/planetlab/myops_ssh_key.rsa
ssh-add /etc/planetlab/debug_ssh_key.rsa
ssh-add /etc/planetlab/root_ssh_key.rsa
fi
# INTERNAL
kernel_version = Field(String,default=None)
bootcd_version = Field(String,default=None)
+ boot_server = Field(String,default=None)
nm_status = Field(String,default=None)
fs_status = Field(String,default=None)
iptables_status = Field(String,default=None)
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 ' "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;}}'`'",'
break
else:
values.update({'kernel_version': "", 'bmlog' : "", 'bootcd_version' : '',
+ 'boot_server' : '',
'nm_status' : '',
'fs_status' : '',
'uptime' : '',
fbnode['bootcd_version'] = fbnode['bootcd_version'].split()[-1]
else:
fbnode['bootcd_version'] = "unknown"
+ if not fbnode['boot_server']:
+ fbnode['boot_server'] = "unknown"
fbnode['pcu'] = color_pcu_state(fbnode)
if not fields:
#print "ERROR!!!!!!!!!!!!!!!!!!!!!"
pass
- print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(kernel_version)s" % fbnode
+ print "%(hostname)-45s | %(date_checked)11.11s | %(boot_state)5.5s| %(observed_status)8.8s | %(ssh_status)5.5s | %(pcu)6.6s | %(bootcd_version)6.6s | %(boot_server)s | %(kernel_version)s" % fbnode
else:
format = ""
for f in fields:
--- /dev/null
+-- If there's an existing database, these commands will upgrade it to the\r
+-- current version\r
+\r
+ALTER TABLE findbadnoderecord ADD COLUMN boot_server varchar DEFAULT NULL;\r
+ALTER TABLE findbadnoderecord_history ADD COLUMN boot_server varchar DEFAULT NULL;\r
autoreload.package="monitorweb"
-server.socket_host="monitor.planet-lab.org"
+server.socket_host="www.planet-lab.eu"
server.socket_port=8082
#server.webpath="/monitor/"
#base_url_filter.on = False
external_dns_status = widgets.CheckBox(label="Hostname Resolves?")
kernel_version = widgets.CheckBox(label="Kernel")
bootcd_version = widgets.CheckBox(label="BootCD")
+ boot_server = widgets.CheckBox(label="Boot Server")
observed_status = widgets.CheckBox(label="Observed Status")
uptime = widgets.CheckBox(label="Uptime")
traceroute = widgets.CheckBox(label="Traceroute")
<th>pcu</th>
<th>kernel</th>
<th>BootCD</th>
+ <th>Boot Server</th>
<th>last_contact</th>
</span>
<span py:if="node is not None">
</td>
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
+ <td nowrap="true" py:content="node.node.boot_server"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</span>
</script>
<center>
- <b py:content="'BOOT: %d' % len([agg for agg in query if agg.node.status == 'good'])"></b> |
- <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status == 'down'])"></b><br/>
+ <b py:content="'UP: %d' % len([agg for agg in query if agg.node.status in ('online', 'good')])"></b> |
+ <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status not in ('online', 'good')])"></b><br/>
</center>
-<table id="nodelist" cellpadding="0" border="0" class="plekit_table sortable-onload-2 colstyle-alt no-arrow paginationcallback-nodelist_paginator max-pages-10 paginate-25">
+<table id="nodelist" cellpadding="0" border="0" class="plekit_table sortable-onload-2 colstyle-alt no-arrow paginationcallback-nodelist_paginator max-pages-10 paginate-999">
<thead>
<tr class='pagesize_area'><td class='pagesize_area' colspan='10'>
<form class='pagesize' action='satisfy_xhtml_validator'><fieldset>
- <input class='pagesize_input' type='text' id="nodelist_pagesize" value='25'
+ <input class='pagesize_input' type='text' id="nodelist_pagesize" value='999'
onkeyup='plekit_pagesize_set("nodelist","nodelist_pagesize", 25);'
size='3' maxlength='3' />
<label class='pagesize_label'> items/page </label>
</script>
<center>
- <b py:content="'BOOT: %d' % len([agg for agg in query if agg.node.observed_status == 'BOOT'])"></b> |
- <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.observed_status == 'DOWN'])"></b><br/>
+ <b py:content="'UP: %d' % len([agg for agg in query if agg.node.status in ('online', 'good')])"></b> |
+ <b py:content="'DOWN: %d' % len([agg for agg in query if agg.node.status not in ('online', 'good')])"></b><br/>
</center>
<table id="nodelist" cellpadding="0" border="0" class="plekit_table sortable-onload-2 colstyle-alt no-arrow paginationcallback-nodelist_paginator max-pages-10 paginate-25">
<th class="sortable plekit_table">pcu</th>
<th class="sortable plekit_table">kernel</th>
<th class="sortable plekit_table">BootCD</th>
+ <th class="sortable plekit_table">Boot Server</th>
<th class="sortable-sortLastContact plekit_table">Last_contact</th>
</tr>
</thead>
<th class="sortable plekit_table">Stat</th>
<th class="sortable plekit_table">kernel</th>
<th class="sortable plekit_table">BootCD</th>
+ <th class="sortable plekit_table">Boot Server</th>
<th class="sortable plekit_table">Last_contact</th>
</tr>
</thead>
<td py:content="node.node.plc_node_stats['boot_state']">boot</td>
<td nowrap="true" py:content="node.kernel"></td>
<td nowrap="true" py:content="node.node.bootcd_version"></td>
+ <td nowrap="true" py:content="node.node.boot_server"></td>
<td id="node-${node.node.observed_status}" py:content="diff_time(node.node.plc_node_stats['last_contact'])"></td>
</span>
</tr>