Archived community.zenoss.org | full text search
Skip navigation
1017 Views 4 Replies Latest reply: Jul 12, 2013 6:03 AM by James Smith RSS
James Smith Rank: White Belt 84 posts since
Jan 28, 2013
Currently Being Moderated

Jul 12, 2013 2:30 AM

Some questions about adding device

Hi everyone, now I am making a zenpack. I have a question that how can I add some simple devices with some codes in my zenpack. I want to make that like the interface like the "Add a simple device " in the page. But I want to only use the method to add simple devices. What's the method or way should I make? I know the code "dmd.DeviceLoader.loadDevice(deviceName='', discoverProto=None, devicePath='')" that can add a device.

But it will run as following:

 

2013-07-12 14:25:46,571 INFO zen.ZenDisc: Connecting to localhost:8789

2013-07-12 14:25:46,581 INFO zen.ZenDisc: Connected to ZenHub

2013-07-12 14:25:46,791 INFO zen.ZenDisc: Looking for 192.168.186.130

2013-07-12 14:25:47,425 INFO zen.ZenDisc: Result: Discovered device 192.168.186.130.

2013-07-12 14:25:47,658 INFO zen.ZenDisc: No WMI plugins found for 192.168.186.130

2013-07-12 14:25:47,664 INFO zen.ZenDisc: No Python plugins found for 192.168.186.130

2013-07-12 14:25:47,671 INFO zen.ZenDisc: No command plugins found for 192.168.186.130

2013-07-12 14:25:47,682 INFO zen.ZenDisc: SNMP collection device 192.168.186.130

2013-07-12 14:25:47,682 INFO zen.ZenDisc: plugins: zenoss.snmp.NewDeviceMap, zenoss.snmp.DeviceMap, zenoss.snmp.InterfaceMap, zenoss.snmp.RouteMap, zenoss.snmp.IpServiceMap, zenoss.snmp.HRFileSystemMap, zenoss.snmp.HRSWInstalledMap, zenoss.snmp.HRSWRunMap, zenoss.snmp.CpuMap

2013-07-12 14:25:47,692 INFO zen.ZenDisc: No portscan plugins found for 192.168.186.130

2013-07-12 14:26:01,348 INFO zen.SnmpClient: snmp client finished collection for 192.168.186.130

2013-07-12 14:26:01,349 INFO zen.ZenDisc: Processing zenoss.snmp.NewDeviceMap for device 192.168.186.130

2013-07-12 14:26:01,351 INFO zen.ZenDisc: processing zenoss.snmp.DeviceMap for device 192.168.186.130

2013-07-12 14:26:01,356 INFO zen.ZenDisc: Modeler zenoss.snmp.InterfaceMap processing data for device 192.168.186.130

2013-07-12 14:26:01,360 INFO zen.ZenDisc: processing zenoss.snmp.RouteMap for device 192.168.186.130

2013-07-12 14:26:01,364 INFO zen.ZenDisc: processing zenoss.snmp.IpServiceMap for device 192.168.186.130

2013-07-12 14:26:01,366 INFO zen.ZenDisc: Modeler zenoss.snmp.HRFileSystemMap processing data for device 192.168.186.130

2013-07-12 14:26:01,367 INFO zen.ZenDisc: Skipping Swap space (virtualMemory) as it matches zFileSystemMapIgnoreTypes.

2013-07-12 14:26:01,368 INFO zen.ZenDisc: Skipping /sys/fs/fuse/connections. 0 total blocks.

2013-07-12 14:26:01,368 INFO zen.ZenDisc: Skipping /home/zenoss/.gvfs. 0 total blocks.

2013-07-12 14:26:01,369 INFO zen.ZenDisc: Skipping /var/run/vmblock-fuse. 0 total blocks.

2013-07-12 14:26:01,369 INFO zen.ZenDisc: Skipping Physical memory (ram) as it matches zFileSystemMapIgnoreTypes.

2013-07-12 14:26:01,369 INFO zen.ZenDisc: Skipping Cached memory (other) as it matches zFileSystemMapIgnoreTypes.

2013-07-12 14:26:01,369 INFO zen.ZenDisc: Skipping Memory buffers (other) as it matches zFileSystemMapIgnoreTypes.

2013-07-12 14:26:01,370 INFO zen.ZenDisc: Skipping Shared memory. 0 total blocks.

2013-07-12 14:26:01,370 INFO zen.ZenDisc: processing zenoss.snmp.CpuMap for device 192.168.186.130

2013-07-12 14:26:05,976 INFO zen.ZenDisc: Changes in configuration applied

2013-07-12 14:26:05,977 INFO zen.ZenDisc: Scan time: 18.55 seconds

2013-07-12 14:26:06,021 INFO zen.ZenDisc: Daemon ZenDisc shutting down

 

But I want to submit a task, then it runs commands in the background. How was it?

 

 

Thanks!

 

 

-----

James

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    1. Jul 12, 2013 3:53 AM (in response to James Smith)
    Re: Some questions about adding device

    Have a look at my MenuExamples ZenPack - it creates a device.  docs/DOC-12937

     

    Cheers,

    Jane

  • jcurry ZenossMaster 1,021 posts since
    Apr 15, 2008
    Currently Being Moderated
    3. Jul 12, 2013 5:00 AM (in response to James Smith)
    Re: Some questions about adding device

    Go and look again at the __init__.py in the main directory.  An instance of a device called Example1 is created.

    Cheers,

    Jane

More Like This

  • Retrieving data ...

Legend

  • Correct Answers - 4 points
  • Helpful Answers - 2 points