Package Products :: Package ZenStatus :: Module zenping :: Class ZenPing
[hide private]
[frames] | no frames]

Class ZenPing

source code

                 object --+            
                          |            
   ZenUtils.CmdBase.CmdBase --+        
                              |        
   ZenUtils.ZenDaemon.ZenDaemon --+    
                                  |    
twisted.spread.pb.Referenceable --+    
                                  |    
           ZenHub.PBDaemon.PBDaemon --+
                                      |
                                     ZenPing

Instance Methods [hide private]
 
__init__(self)
Initializer that takes care of basic daemon options.
source code
 
getPinger(self) source code
 
config(self) source code
 
stopOnError(self, error) source code
 
connected(self) source code
 
sendPingEvent(self, pj)
Send an event based on a ping job to the event backend.
source code
 
loadConfig(self, driver)
Get the configuration for zenping
source code
 
buildOptions(self)
Standard set of command-line options.
source code
 
pingCycle(self, unused=None)
Start a new run against the ping job tree
source code
 
startOne(self)
Initiate the next ping job
source code
 
ping(self, pj)
Perform a ping
source code
 
next(self)
Pull up the next ping job, which may throw StopIteration
source code
 
endCycle(self, *unused)
Note the end of the ping list with a successful status message
source code
 
heartbeat(self)
Send a heartbeat event for this monitor.
source code
 
pingSuccess(self, pj)
Callback for a good ping response
source code
 
pingFailed(self, err) source code
 
doPingFailed(self, err)
Callback for a bad (no) ping response
source code
 
remote_setPropertyItems(self, items)
The config has changed, maybe the device list is different
source code
 
remote_updateConfig(self) source code
 
copyItems(self, items) source code
 
clearDevice(self, device) source code
 
clearDeletedDevices(self, oldtree)
Send clears for any device we stop pinging
source code
 
remote_deleteDevice(self, device) source code

Inherited from ZenHub.PBDaemon.PBDaemon: connect, connectTimeout, eventService, getInitialServices, getService, getServiceNow, gotPerspective, pushEvents, pushEventsLoop, remote_getName, remote_shutdown, remote_updateThresholdClasses, run, sendEvent, sendEvents, setExitCode, sigTerm, stop

Inherited from ZenUtils.ZenDaemon.ZenDaemon: becomeDaemon, becomeWatchdog, changeUser, niceDoggie, openPrivilegedPort, setupLogging, sighandler_USR1, watchdogCycleTime, watchdogMaxRestartTime, watchdogStartTimeout, writePidFile

Inherited from ZenUtils.CmdBase.CmdBase: buildParser, checkLogpath, generate_configs, generate_xml_configs, generate_xml_table, getConfigFileDefaults, parseOptions, pretty_print_config_comment

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Class Variables [hide private]
  agent = "zenping"
  name = "zenping"
  eventGroup = "Ping"
  initialServices = PBDaemon.initialServices+ ['PingConfig']
  pingTimeOut = 1.5
  pingTries = 2
  pingChunk = 75
  pingCycleInterval = 60
  configCycleInterval = 20* 60
  maxPingFailures = 2
  pinger = None
  pingTreeIter = None
  startTime = None
  jobs = 0
  reconfigured = True
  loadingConfig = None
  lastConfig = None

Inherited from ZenHub.PBDaemon.PBDaemon: heartbeatEvent, heartbeatTimeout

Inherited from ZenUtils.ZenDaemon.ZenDaemon: pidfile

Inherited from ZenUtils.CmdBase.CmdBase: doesLogging

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initializer that takes care of basic daemon options. Creates a PID file.
Overrides: ZenHub.PBDaemon.PBDaemon.__init__

connected(self)

source code 
Overrides: ZenHub.PBDaemon.PBDaemon.connected

buildOptions(self)

source code 
Standard set of command-line options.
Overrides: ZenHub.PBDaemon.PBDaemon.buildOptions

heartbeat(self)

source code 
Send a heartbeat event for this monitor.
Overrides: ZenHub.PBDaemon.PBDaemon.heartbeat

remote_setPropertyItems(self, items)

source code 
The config has changed, maybe the device list is different
Overrides: ZenHub.PBDaemon.PBDaemon.remote_setPropertyItems