Package Products :: Package ZenEvents :: Module zensyslog :: Class ZenSyslog |
[hide private]
[frames] | no frames]

# Class ZenSyslog

source code

    twisted.internet.protocol.AbstractDatagramProtocol --+
                                                         |
                twisted.internet.protocol.DatagramProtocol --+
                                                             |
                                    object --+               |
                                             |               |
                      ZenUtils.CmdBase.CmdBase --+           |
                                                 |           |
                      ZenUtils.ZenDaemon.ZenDaemon --+       |
                                                     |       |
                   twisted.spread.pb.Referenceable --+       |
                                                     |       |
                              ZenHub.PBDaemon.PBDaemon --+   |
                                                         |   |
                                   EventServer.EventServer --+
                                                             |
                                                            ZenSyslog

ZenSyslog

Instance Methods | [hide private]
__init__(self) | source code
Twisted deferred object |
configure(self) Initialize the daemon | source code
string |
expand(self, msg, client_address) Expands a syslog message into a string format suitable for writing to the filesystem such that it appears the same as it would had the message been logged by the syslog daemon. | source code
datagramReceived(self, msg, client_address) Consume the network packet | source code
gotHostname(self, response, data) Send the resolved address, if possible, and the event via the thread | source code
buildOptions(self) Command-line options | source code
Inherited from `twisted.internet.protocol.DatagramProtocol`: `connectionRefused` Inherited from `twisted.internet.protocol.AbstractDatagramProtocol`: `__getstate__`, `doStart`, `doStop`, `makeConnection`, `startProtocol`, `stopProtocol` Inherited from `EventServer.EventServer`: `connected`, `heartbeat`, `model`, `report`, `reportCycle`, `sendEvent`, `useTcpFileDescriptor`, `useUdpFileDescriptor` Inherited from `ZenHub.PBDaemon.PBDaemon`: `connect`, `connectTimeout`, `eventService`, `getInitialServices`, `getService`, `getServiceNow`, `gotPerspective`, `pushEvents`, `pushEventsLoop`, `remote_getName`, `remote_setPropertyItems`, `remote_shutdown`, `remote_updateThresholdClasses`, `run`, `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]
| name = `'zensyslog'`
| SYSLOG_DATE_FORMAT = `'%b %d %H:%M:%S'`
| SAMPLE_DATE = `'Apr 10 15:19:22'`
Inherited from `twisted.internet.protocol.AbstractDatagramProtocol`: `noisy`, `numPorts` Inherited from `ZenHub.PBDaemon.PBDaemon`: `heartbeatEvent`, `heartbeatTimeout`, `initialServices` Inherited from `ZenHub.PBDaemon.PBDaemon` (private): `_customexitcode`, `_sendingEvents` Inherited from `ZenUtils.ZenDaemon.ZenDaemon`: `pidfile` Inherited from `ZenUtils.CmdBase.CmdBase`: `doesLogging`

Instance Variables | [hide private]
Inherited from `twisted.internet.protocol.DatagramProtocol`: `transport`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self) (Constructor) | source code
Overrides: EventServer.EventServer.__init__

### configure(self) | source code
Initialize the daemon Returns: Twisted deferred object Twisted deferred object Overrides: EventServer.EventServer.configure

### expand(self, msg, client_address) | source code
Expands a syslog message into a string format suitable for writing to the filesystem such that it appears the same as it would had the message been logged by the syslog daemon. Parameters: `msg` (string) - syslog message `client_address` (tuple of (string, number)) - IP info of the remote device (ipaddr, port) Returns: string message

### datagramReceived(self, msg, client_address) | source code
Consume the network packet Parameters: `msg` (string) - syslog message `client_address` (tuple of (string, number)) - IP info of the remote device (ipaddr, port) Overrides: twisted.internet.protocol.AbstractDatagramProtocol.datagramReceived

### gotHostname(self, response, data) | source code
Send the resolved address, if possible, and the event via the thread Parameters: `response` (Twisted response) - Twisted response `data` (tuple of (string, string, datetime object)) - (msg, ipaddr, rtime)

### buildOptions(self) | source code
Command-line options Overrides: EventServer.EventServer.buildOptions