示例#1
0
 def options(self):
     parser = Options(description='Acknowledge events by eventid',
                      prog='ack')
     parser.add_option(
         '-a',
         '--acked',
         dest='acked',
         action='store_true',
         help=
         'Show acknowledged events only.  The default is to show "new" events'
     )
     parser.add_option(
         '-d',
         '--device',
         dest='device',
         help=
         'Optional device to show events for.  Default is to show events for all devices.'
     )
     parser.add_option(
         '-s',
         '--severity',
         dest='severity',
         help='Minimum severity to display.  NOT IMPLEMENTED.')
     parser.add_option('-v',
                       '--verbose',
                       dest='severity',
                       action='store_true',
                       help='Show more details about the events.  NOISY.')
     return parser
示例#2
0
 def options(self):
     parser = Options(
         description=
         'Retrieve latest value read from the device for datapoint.  Simple example:\n data -d 10.1.1.1 -p laLoadInt1',
         prog='data')
     parser.add_option('-d',
                       '--device',
                       dest='deviceName',
                       help='Device name, IP or MAC.')
     parser.add_option(
         '-p',
         '--point',
         dest='dataPointName',
         help=
         'Acknowledge all events.  If -e is also specified, it will still acknowledge every event.'
     )
     parser.add_option(
         '-l',
         '--list',
         dest='list',
         action='store_true',
         help='Only list datapoints for the device and/or component.')
     parser.add_option(
         '-s',
         '--subcomponent',
         dest='subComponent',
         help=
         'Optional subcomponent name, if the datapoint does not reside directly on the device.  You will probably have to specify this.  Here are two usage example:\n  data -d buffalo.example.com -p usedBlocks -s filesystems\n data -10.1.1.1 -p ifInErrors -s interfaces'
     )
     return parser
示例#3
0
 def options(self):
     parser = Options(description = 'Acknowledge events by eventid', prog = 'ack')
     parser.add_option('-a', '--acked', dest='acked', action='store_true', help='Show acknowledged events only.  The default is to show "new" events')
     parser.add_option('-d', '--device', dest='device', help='Optional device to show events for.  Default is to show events for all devices.')
     parser.add_option('-s', '--severity', dest='severity', help='Minimum severity to display.  NOT IMPLEMENTED.')
     parser.add_option('-v', '--verbose', dest='severity', action='store_true', help='Show more details about the events.  NOISY.')
     return parser
示例#4
0
 def options(self):
   parser = Options(description = 'Retrieve latest value read from the device for datapoint.  Simple example:\n data -d 10.1.1.1 -p laLoadInt1', prog = 'data')
   parser.add_option('-d', '--device', dest='deviceName', help='Device name, IP or MAC.')
   parser.add_option('-p', '--point', dest='dataPointName', help='Acknowledge all events.  If -e is also specified, it will still acknowledge every event.')
   parser.add_option('-l', '--list', dest='list', action='store_true', help='Only list datapoints for the device and/or component.')
   parser.add_option('-s', '--subcomponent', dest='subComponent', help='Optional subcomponent name, if the datapoint does not reside directly on the device.  You will probably have to specify this.  Here are two usage example:\n  data -d buffalo.example.com -p usedBlocks -s filesystems\n data -10.1.1.1 -p ifInErrors -s interfaces')
   return parser
示例#5
0
文件: graph.py 项目: Psicrone/xmppBot
 def options(self):
     parser = Options(description = 'Retrieve graph.  Simple example:\n graph -d 10.1.1.1 -g IO', prog = 'graph')
     parser.add_option('-d', '--device', dest='deviceName', help='Device name, IP or MAC.')
     parser.add_option('-g', '--graph', dest='graphName', help='Name of graph.')
     parser.add_option('-l', '--list', dest='list', action='store_true', help='Only list graphs for the device and/or component.')
     parser.add_option('-s', '--subcomponent', dest='subComponent', help='Optional subcomponent name, if the graph does not reside directly on the device.  You will probably have to specify this.')
     return parser
示例#6
0
 def options(self):
   parser = Options(description = 'Create a new device to monitor', prog = 'model')
   parser.add_option('-H', '--host', dest='deviceName', help='Name of the host to model.')
   parser.add_option('-p', '--path', dest='devicePath', default='/Discovered', help='Place in Zenoss tree')
   parser.add_option('-t', '--tag', dest='tag', help='Tag Number')
   parser.add_option('-s', '--serial', dest='serialNumber', help='Serial number')
   parser.add_option('-c', '--snmp-secret', dest='zSnmpCommunity', default='public', help='SNMP Community string.  Configured in Zenoss')
   parser.add_option('-P', '--snmp-port', dest='zSnmpPort', default=161, help='SNMP Port to probe')
   parser.add_option('-v', '--snmp-version', dest='zSnmpVer', default='1', help='SNMP Version to use.  Configured in Zenoss')
   parser.add_option('-r', '--rack', dest='rackSlot', default=0, help='Rack slot.  Defaults to 0')
   parser.add_option('-n', '--state', dest='productionState', type='int', default=1000, help='Numerical production state.  Defaults to 1000 (production)')
   parser.add_option('-m', '--comment', dest='comments', help='Device comment.  No default')
   parser.add_option('-l', '--location', dest='locationPath', help='Zenoss tree location, NOT physical location.')
   parser.add_option('-d', '--protocol', dest='discoverProto', default='snmp', help='Discovery protocol.  Defaults to snmp.')
   return parser
示例#7
0
 def options(self):
     parser = Options(description='Acknowledge events by eventid',
                      prog='ack')
     parser.add_option(
         '-e',
         '--eventids',
         dest='eventIds',
         help=
         'Complete or partial eventids to ack.  Ids can be sepratated by commas.  Partial ids can match either the beginning or end of the eventid.'
     )
     parser.add_option(
         '-a',
         '--all',
         dest='all',
         action='store_true',
         default=False,
         help=
         'Acknowledge all events.  If -e is also specified, it will still acknowledge every event.'
     )
     parser.add_option(
         '-d',
         '--device',
         dest='device',
         help='Only ack events that exist on this device.  NOT IMPLEMENTED.'
     )
     parser.add_option(
         '-v',
         '--verbose',
         dest='verbose',
         action='store_true',
         default=False,
         help=
         'Send list of all acknowledged events.  Can be noisy.  USE WITH CAUTION.'
     )
     parser.add_option(
         '-t',
         '--test',
         dest='test',
         action='store_true',
         default=False,
         help=
         'Do not acknowledge events, but show what would be done.  Works with -v.'
     )
     return parser
示例#8
0
 def options(self):
   parser = Options(description = 'Acknowledge events by eventid', prog = 'ack')
   parser.add_option('-u', '--user', dest='zenUser', help='Zenoss username (must already exist in zenoss).')
   parser.add_option('-j', '--jid', dest='jabberId', help='JabberID to map to the zenoss user.')
   parser.add_option('-f', '--force', dest='force', action='store_true', help='Force association even if it could disallow your own user.  USE WITH CAUTION.')
   return parser
示例#9
0
 def options(self):
     parser = Options(description='Create a new device to monitor',
                      prog='model')
     parser.add_option('-H',
                       '--host',
                       dest='deviceName',
                       help='Name of the host to model.')
     parser.add_option('-p',
                       '--path',
                       dest='devicePath',
                       default='/Discovered',
                       help='Place in Zenoss tree')
     parser.add_option('-t', '--tag', dest='tag', help='Tag Number')
     parser.add_option('-s',
                       '--serial',
                       dest='serialNumber',
                       help='Serial number')
     parser.add_option('-c',
                       '--snmp-secret',
                       dest='zSnmpCommunity',
                       default='public',
                       help='SNMP Community string.  Configured in Zenoss')
     parser.add_option('-P',
                       '--snmp-port',
                       dest='zSnmpPort',
                       default=161,
                       help='SNMP Port to probe')
     parser.add_option('-v',
                       '--snmp-version',
                       dest='zSnmpVer',
                       default='1',
                       help='SNMP Version to use.  Configured in Zenoss')
     parser.add_option('-r',
                       '--rack',
                       dest='rackSlot',
                       default=0,
                       help='Rack slot.  Defaults to 0')
     parser.add_option(
         '-n',
         '--state',
         dest='productionState',
         type='int',
         default=1000,
         help='Numerical production state.  Defaults to 1000 (production)')
     parser.add_option('-m',
                       '--comment',
                       dest='comments',
                       help='Device comment.  No default')
     parser.add_option('-l',
                       '--location',
                       dest='locationPath',
                       help='Zenoss tree location, NOT physical location.')
     parser.add_option('-d',
                       '--protocol',
                       dest='discoverProto',
                       default='snmp',
                       help='Discovery protocol.  Defaults to snmp.')
     return parser
示例#10
0
文件: ack.py 项目: Psicrone/xmppBot
 def options(self):
     parser = Options(description = 'Acknowledge events by eventid', prog = 'ack')
     parser.add_option('-e', '--eventids', dest='eventIds', help='Complete or partial eventids to ack.  Ids can be sepratated by commas.  Partial ids can match either the beginning or end of the eventid.')
     parser.add_option('-a', '--all', dest='all', action='store_true', default=False, help='Acknowledge all events.  If -e is also specified, it will still acknowledge every event.')
     parser.add_option('-d', '--device', dest='device', help='Only ack events that exist on this device.  NOT IMPLEMENTED.')
     parser.add_option('-v', '--verbose', dest='verbose', action='store_true', default=False, help='Send list of all acknowledged events.  Can be noisy.  USE WITH CAUTION.')
     parser.add_option('-t', '--test', dest='test', action='store_true', default=False, help='Do not acknowledge events, but show what would be done.  Works with -v.')
     return parser
示例#11
0
 def options(self):
     parser = Options(description="Acknowledge events by eventid", prog="ack")
     parser.add_option(
         "-e",
         "--eventids",
         dest="eventIds",
         help="Complete or partial eventids to ack.  Ids can be sepratated by commas.  Partial ids can match either the beginning or end of the eventid.",
     )
     parser.add_option(
         "-a",
         "--all",
         dest="all",
         action="store_true",
         default=False,
         help="Acknowledge all events.  If -e is also specified, it will still acknowledge every event.",
     )
     parser.add_option(
         "-d", "--device", dest="device", help="Only ack events that exist on this device.  NOT IMPLEMENTED."
     )
     parser.add_option(
         "-v",
         "--verbose",
         dest="verbose",
         action="store_true",
         default=False,
         help="Send list of all acknowledged events.  Can be noisy.  USE WITH CAUTION.",
     )
     parser.add_option(
         "-t",
         "--test",
         dest="test",
         action="store_true",
         default=False,
         help="Do not acknowledge events, but show what would be done.  Works with -v.",
     )
     return parser