Nevermind.. being unfamiliar with patch I dug through the man page and it 
appears that those two lines are only references to the files used to generate 
the patch.

I tried to use it though and got the following failure output - I'm using 2.0.6 
and would guess this is because of the older version. I will attempt an old 
fashioned eyeball version of 'patch' to see if i can get it to pick up.


Code:

patching file IpServiceMap.py
Hunk #1 FAILED at 32.
Hunk #4 FAILED at 120.
2 out of 4 hunks FAILED -- saving rejects to file IpServiceMap.py.rej
[EMAIL PROTECTED]:/usr/local/zenoss/Products/DataCollector/plugins/zenoss/snmp# 
cat IpServiceMap.py.rej 
***************
*** 32,37 ****
      snmpGetTableMaps = (
          GetTableMap('tcptable', '.1.3.6.1.2.1.6.13.1', {'.1':'state'}),
          GetTableMap('udptable', '.1.3.6.1.2.1.7.5.1', {'.1':'addr'}),
      )
      
      def process(self, device, results, log):
--- 32,39 ----
      snmpGetTableMaps = (
          GetTableMap('tcptable', '.1.3.6.1.2.1.6.13.1', {'.1':'state'}),
          GetTableMap('udptable', '.1.3.6.1.2.1.7.5.1', {'.1':'addr'}),
+         GetTableMap('tcplisten', '.1.3.6.1.2.1.6.20.1.4', {'.1':'v4', 
'.2':'v6'}),
+         GetTableMap('udpendpoint', '.1.3.6.1.2.1.7.7.1.8', {'.1':'v4', 
'.2':'v6'}),
      )
      
      def process(self, device, results, log):
***************
*** 84,89 ****
                  om.discoveryAgent = self.name()
                  udpports[port]=om
                  rm.append(om)
          return rm 
  
  
--- 120,155 ----
                  om.discoveryAgent = self.name()
                  udpports[port]=om
                  rm.append(om)
+         for oid, value in udpendpoint.items():
+             print "udp new %s %s" % (oid,value)
+             oidar = oid.split('.')
+             port = 0
+             addr = ''
+             if value.has_key('v4'): #ipv4 binding
+                 port = int(oidar[16])
+                 addr = '.'.join(oidar[12:16])
+             elif value.has_key('v6'): #ipv4 binding
+                 port = int(oidar[28])
+                 addr = '.'.join(oidar[12:28])
+                 if addr == '0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0':
+                     addr = '::'
+                 else: continue #can't handle v6 properly yet
+             else: continue
+             if port > maxport or port < 1: continue
+             om = udpports.get(port, None)
+             if om:
+                 if not addr in om.ipaddresses:
+                     om.ipaddresses.append(addr)
+             else:
+                 om = self.objectMap()
+                 om.id = 'udp_%05d' % port
+                 om.ipaddresses = [addr,]
+                 om.protocol = 'udp'
+                 om.port = port
+                 om.setServiceClass = {'protocol': 'udp', 'port':port}
+                 om.discoveryAgent = self.name()
+                 tcpports[port] = om
+                 rm.append(om)
          return rm 







-------------------- m2f --------------------

Read this topic online here:
http://community.zenoss.com/forums/viewtopic.php?p=14747#14747

-------------------- m2f --------------------



_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to