Package Products :: Package ZenStatus :: Package nmap :: Module NmapPingTask :: Class NmapPingTask
[hide private]
[frames] | no frames]

Class NmapPingTask

source code

ZenCollector.tasks.BaseTask --+
                              |
                             NmapPingTask

Instance Methods [hide private]
 
__init__(self, taskName, configId, scheduleIntervalSeconds=60, taskConfig=None) source code
 
_detectNmap(self)
Detect that nmap is present.
source code
 
_sendNmapMissing(self)
Send/Clear event to show that nmap is present/missing.
source code
 
_detectNmapIsSuid(self)
Detect that nmap is set SUID
source code
 
_sendNmapNotSuid(self)
Send/Clear event to show that nmap is set SUID.
source code
 
_nmapExecution(self, ex=None)
Send/Clear event to show that nmap is executed properly.
source code
 
_executeNmapCmd(self, inputFileFilename, traceroute=False, outputType='xml')
Execute nmap and return it's output.
source code
 
doTask(self)
BatchPingDevices !
source code
 
_getPingTasks(self)
Iterate the daemons task list and find PingTask tasks that are IPV4.
source code
 
_batchPing(self)
Find the IPs, ping/traceroute, parse, correlate, and send events.
source code
 
_correlate(self, downTasks)
Correlate ping down events.
source code
 
displayStatistics(self)
Called by the collector framework scheduler, and allows us to see how each task is doing.
source code
Method Details [hide private]

__init__(self, taskName, configId, scheduleIntervalSeconds=60, taskConfig=None)
(Constructor)

source code 
Parameters:
  • deviceId (string) - the Zenoss deviceId to watch
  • taskName (string) - the unique identifier for this task
  • scheduleIntervalSeconds (int) - the interval at which this task will be collected
  • taskConfig - the configuration for this task

_executeNmapCmd(self, inputFileFilename, traceroute=False, outputType='xml')

source code 

Execute nmap and return it's output.

Decorators:
  • @defer.inlineCallbacks

doTask(self)

source code 

BatchPingDevices !

Decorators:
  • @defer.inlineCallbacks

_batchPing(self)

source code 

Find the IPs, ping/traceroute, parse, correlate, and send events.

Decorators:
  • @defer.inlineCallbacks

_correlate(self, downTasks)

source code 

Correlate ping down events.

This simple correlator will take a list of PingTasks that are in the down state. It loops through the list and the last known trace route for each of the ip's. For every hop in the traceroute (starting from the collector to the ip in question), the hop's ip is searched for in downTasks. If it's found, then this collector was also monitoring the source of the problem.

Note: this does not take in to account multiple routes to the ip in question. It uses only the last known traceroute as given by nmap which will not have routing loops and hosts that block icmp.

Decorators:
  • @defer.inlineCallbacks