Currently Being Moderated
Jun 2, 2009 4:52 PM
from Products.ZenRRD.ComponentCommandParser import ComponentCommandParser
class ifconfig(ComponentCommandParser):
componentSplit = '^$' # Empty Line
componentScanner = '(?P<component>/[a-z0-9:]+)'
# ifconfig -a
#eth0 Link encap:Ethernet HWaddr 00:04:4b:01:50:60
# inet6 addr: fe80::204:4bff:fe01:5060/64 Scope:Link
# UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
# RX packets:71247222 errors:0 dropped:0 overruns:0 frame:0
# TX packets:24688953 errors:0 dropped:0 overruns:0 carrier:0
# collisions:0 txqueuelen:1000
# RX bytes:14906801835 (13.8 GiB) TX bytes:159278427422 (148.3 GiB)
# Interrupt:25 Base address:0x4000
scanners = [
r'RX bytes:(?P<ifInOctets>\d+) +'
r'TX bytes:(?P<ifOutOctets>\d+) +'
r'RX packets:(?P<ifInUcastPackets>\d+) +errors:(?P<ifInErrors>\d+) +'
r'TX packets:(?P<ifOutUcastPackets>\d+) +errors:(?P<ifOutErrors>\d+) +'
]
componentScanValue = 'interfaceName'
ImportError: No module named ZenPacks.zenoss.LinuxMonitor-1.0.0-py2.4.egg.ZenPacks.zenoss.LinuxMonitor.parsers.linux.ifconfig
I have restarted zenoss
The above is my parser I am trying to create for the output of ifconfig -a
I am not sure if this is correct. I am also not sure exactly how to determine what I should be using for componentScanValue. If someone could give me some pointers that would be great.