fixed errors with includes in scanapi
Stephen Soltesz [Mon, 22 Dec 2008 22:10:40 +0000 (22:10 +0000)]
fixed arguments in automate-default.sh
allow additional comments for acknowledged issues.

automate-default.sh
monitor/scanapi.py
web/MonitorWeb/monitorweb/controllers.py
web/MonitorWeb/monitorweb/templates/actionlist.kid

index d01650e..046c1ac 100755 (executable)
@@ -77,9 +77,9 @@ ps ax | grep locfg | grep -v grep | awk '{print $1}' | xargs -r kill || :
 echo "Performing uptime changes for sites, nodes, and pcus"
 ########################
 # 3. record last-changed for sites, nodes and pcus.
-${MONITOR_SCRIPT_ROOT}/sitebad.py --increment || :
-${MONITOR_SCRIPT_ROOT}/nodebad.py --increment || :
-${MONITOR_SCRIPT_ROOT}/pcubad.py --increment || :
+${MONITOR_SCRIPT_ROOT}/sitebad.py || :
+${MONITOR_SCRIPT_ROOT}/nodebad.py || :
+${MONITOR_SCRIPT_ROOT}/pcubad.py || :
 
 echo "Archiving pkl files"
 #########################
index 4a00eef..bbc99d7 100644 (file)
@@ -20,7 +20,6 @@ from monitor.database.info.model import *
 from monitor.sources import comon
 from monitor.wrapper import plc, plccache
 
-from nodequery import verify,query_to_dict,node_select
 import traceback
 from nodecommon import nmap_port_status
 
index 0cb05d4..f4832ba 100644 (file)
@@ -135,8 +135,8 @@ def prep_node_for_display(node):
 
        node.history = HistoryNodeRecord.by_hostname(node.hostname)
 
-       if node.port_status:
-               node.ports = format_ports(node.port_status)
+       node.ports = format_ports(node.port_status)
+
        try:
                exists = node.plc_node_stats['last_contact']
        except:
@@ -408,7 +408,7 @@ class Root(controllers.RootController):
                session.bind = metadata.bind
                filtercount = {'active' : 0, 'acknowledged': 0, 'all' : 0}
                # With Acknowledgement
-               sql_ack = 'SELECT DISTINCT h.host,t.description,t.priority,t.lastchange,a.message '+ \
+               sql_ack = 'SELECT DISTINCT h.host,t.description,t.priority,t.lastchange,a.message,e.eventid '+ \
               ' FROM triggers t,hosts h,items i,functions f, hosts_groups hg,escalations e,acknowledges a ' + \
               ' WHERE f.itemid=i.itemid ' + \
                   ' AND h.hostid=i.hostid ' + \
index eb79269..d9cc923 100644 (file)
@@ -36,6 +36,7 @@ def zabbix_event_ack_link(eventid):
                                        <th>Issue (severity)</th>
                                        <th>Last change</th>
                                        <th>Notes (acknowledged)</th>
+                                       <th></th>
                                </tr>
                        </thead>
                        <tbody>
@@ -55,6 +56,7 @@ def zabbix_event_ack_link(eventid):
                                        <!-- NOTE: only one of the next two columns will be displayed. -->
                                        <td py:if="val"><a href="${zabbix_event_ack_link(node[5])}">Provide Ack</a></td>
                                        <td py:if="not val" py:content="node[5]">Message from user</td>
+                                       <td py:if="not val"><a href="${zabbix_event_ack_link(node[6])}">Add</a></td>
                                </tr>
                        </tbody>
                </table>