Package Products :: Package ZenRRD :: Module zencommand :: Class zencommand |
[hide private]
[frames] | no frames]

# Class zencommand

source code

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

Daemon code to schedule commands and run them.

Instance Methods | [hide private]
__init__(self) Initializer | source code
remote_deleteDevice(self, doomed) | source code
remote_updateConfig(self, config) | source code
remote_updateDeviceList(self, devices) Callable from zenhub. | source code
updateConfig(self, configs, expected) | source code
heartbeatCycle(self, *ignored) There is no master 'cycle' to send the hearbeat | source code
processSchedule(self, *unused) Run through the schedule and start anything that needs to be done. | source code
sendCmdEvent(self, cmd, severity, summary) Send an event using the info in the Cmd object. | source code
finished(self, cmdOrErr) The command has finished. | source code
_handleExitCode(self, cmd) zencommand handles sending clears for exit code 0, all other exit codes should be handled by the parser associated with the command | source code
error(self, err) The finished method indicated that there was a failure. | source code
parseResults(self, cmd) Process the results of our command-line, send events and check datapoints. | source code
fetchConfig(self) | source code
start(self, driver) Fetch the configuration and return a deferred for its completion. | source code
buildOptions(self) Command-line options to add | source code
connected(self) | source code
Inherited from `RRDDaemon.RRDDaemon`: `errorStop`, `getDevicePingIssues`, `logError`, `model`, `remote_setPropertyItems`, `sendThresholdEvent`, `setPropertyItems` Inherited from `ZenHub.PBDaemon.PBDaemon`: `connect`, `connectTimeout`, `eventService`, `getInitialServices`, `getService`, `getServiceNow`, `gotPerspective`, `heartbeat`, `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]
| initialServices = `RRDDaemon.initialServices+ ['CommandConfig']`
Inherited from `RRDDaemon.RRDDaemon`: `configCycleInterval`, `properties`, `rrd`, `shutdown`, `thresholds` Inherited from `ZenHub.PBDaemon.PBDaemon`: `heartbeatEvent`, `heartbeatTimeout`, `name` Inherited from `ZenHub.PBDaemon.PBDaemon` (private): `_customexitcode`, `_sendingEvents` 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 Overrides: RRDDaemon.RRDDaemon.__init__ (inherited documentation)

### remote_updateDeviceList(self, devices) | source code
Callable from zenhub. Overrides: RRDDaemon.RRDDaemon.remote_updateDeviceList (inherited documentation)

### processSchedule(self, *unused) | source code
Run through the schedule and start anything that needs to be done. Set a timer if we have nothing to do.

### finished(self, cmdOrErr) | source code
The command has finished. cmdOrErr is either a Cmd instance or a twisted failure.

### error(self, err) | source code
The finished method indicated that there was a failure. This method is also called by RRDDaemon.errorStop. Overrides: RRDDaemon.RRDDaemon.error

### parseResults(self, cmd) | source code
Process the results of our command-line, send events and check datapoints. Parameters: `cmd` - command

### start(self, driver) | source code
Fetch the configuration and return a deferred for its completion. Also starts the config cycle

### buildOptions(self) | source code
Command-line options to add Overrides: RRDDaemon.RRDDaemon.buildOptions (inherited documentation)

### connected(self) | source code
Overrides: ZenHub.PBDaemon.PBDaemon.connected