def getDaemonProcessesDown(self):
     user = self.context.dmd.ZenUsers.getUserSettings()
     if user.hasNoGlobalRoles():
         return
     return getHeartbeatObjects(
         deviceRoot=self._dmd.Devices,
         keys=['host', 'process', 'secondsDown', 'monitor'])
示例#2
0
    def getHeartbeatIssuesJSON(self):
        """
        Get heartbeat issues in a form suitable for a portlet on the dashboard.

        @return: A JSON representation of a dictionary describing heartbeats
        @rtype: "{
            'columns':['Host', 'Daemon Process', 'Seconds Down'],
            'data':[
                {'Device':'<a href=/>', 'Daemon':'zenhub', 'Seconds':10}
            ]}"
        """
        data = getHeartbeatObjects(deviceRoot=self.context.dmd.Devices,
                                   keys=heartbeat_columns)
        return {'columns': heartbeat_columns, 'data': data}
示例#3
0
    def getHeartbeatIssuesJSON(self):
        """
        Get heartbeat issues in a form suitable for a portlet on the dashboard.

        @return: A JSON representation of a dictionary describing heartbeats
        @rtype: "{
            'columns':['Host', 'Daemon Process', 'Seconds Down'],
            'data':[
                {'Device':'<a href=/>', 'Daemon':'zenhub', 'Seconds':10}
            ]}"
        """
        data = getHeartbeatObjects(deviceRoot=self.context.dmd.Devices,
                keys=heartbeat_columns)
        return {'columns': heartbeat_columns, 'data': data}
 def getDaemonProcessesDown(self):
     return getHeartbeatObjects(deviceRoot=self._dmd.Devices,
                                keys=['host', 'process', 'secondsDown', 'monitor'])