monitoringplugin.py 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  1. __version__ = '0.0.100802'
  2. __all__ = ['MonitoringPlugin', 'SNMPMonitoringPlugin']
  3. import optparse, os, re, sys
  4. try:
  5. import netsnmp
  6. except ImportError:
  7. pass
  8. class MonitoringPlugin(object):
  9. RETURNSTRINGS = { 0: "OK", 1: "WARNING", 2: "CRITICAL", 3: "UNKNOWN", 127: "UNKNOWN" }
  10. RETURNCODE = { 'OK': 0, 'WARNING': 1, 'CRITICAL': 2, 'UNKNOWN': 3 }
  11. returncode_priority = [2, 1, 3, 0]
  12. powers_binary = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']
  13. powers_binary_lower = [ p.lower() for p in powers_binary]
  14. powers_si = ['', 'k', 'M', 'G', 'T', 'P', 'E', 'Z']
  15. powers_si_lower = [ p.lower() for p in powers_si]
  16. def __init__(self, *args, **kwargs):
  17. self.__pluginname = kwargs.get('pluginname') or ''
  18. self.__version = kwargs.get('version') or None
  19. self.__tagforstatusline = kwargs.get('tagforstatusline') or ''
  20. self.__tagforstatusline = self.__tagforstatusline.replace('|', ' ')
  21. self.__description = kwargs.get('description') or None
  22. self.__output = []
  23. self.__multilineoutput = []
  24. self.__performancedata = []
  25. self.__returncode = []
  26. self.__brain_checks = []
  27. self.__brain_perfdata = []
  28. self.__brain_perfdatalabels = []
  29. self.__optparser = optparse.OptionParser(version=self.__version, description=self.__description)
  30. self._cmdlineoptions_parsed = False
  31. def add_cmdlineoption(self, shortoption, longoption, dest, help, **kwargs):
  32. self.__optparser.add_option(shortoption, longoption, dest=dest, help=help, **kwargs)
  33. def parse_cmdlineoptions(self):
  34. if self._cmdlineoptions_parsed:
  35. return
  36. # self.__optparser.add_option('-V', '--version', action='version', help='show version number and exit')
  37. self.__optparser.add_option('-v', '--verbose', dest='verbose', help='Verbosity, more for more ;-)', action='count')
  38. (self.options, self.args) = self.__optparser.parse_args()
  39. self._cmdlineoptions_parsed = True
  40. def range_to_limits(self, range):
  41. # Check if we must negate result
  42. if len(range) > 0 and range[0] == '@':
  43. negate = True
  44. range = range[1:]
  45. else:
  46. negate = False
  47. # Look for a ':'...
  48. if range.find(':') >= 0:
  49. # ... this is a range
  50. (low, high) = range.split(':')
  51. if not low:
  52. low = float(0.0)
  53. elif low[0] == '~':
  54. low = float('-infinity')
  55. else:
  56. low = float(low)
  57. if high:
  58. high = float(high)
  59. else:
  60. high = float('infinity')
  61. elif len(range) == 0:
  62. low = float('-infinity')
  63. high = float('infinity')
  64. else:
  65. # ... this is just a number
  66. low = float(0.0)
  67. high = float(range)
  68. return (low, high, negate)
  69. def value_in_range(self, value, range):
  70. if range not in ['', None]:
  71. (low, high, negate) = self.range_to_limits(range)
  72. else:
  73. return True
  74. if value < low or value > high:
  75. result = False
  76. else:
  77. result = True
  78. if negate:
  79. result = not result
  80. return result
  81. def value_wc_to_returncode(self, value, range_warn, range_crit):
  82. if not self.value_in_range(value, range_crit):
  83. return 2
  84. elif not self.value_in_range(value, range_warn):
  85. return 1
  86. return 0
  87. def is_float(self, string):
  88. try:
  89. float(string)
  90. return True
  91. except ValueError:
  92. return False
  93. def special_value_wc_to_returncode(self, value, warn, crit):
  94. # Special add on: WARN > CRIT
  95. if self.is_float(warn) and self.is_float(crit) and float(warn) > float(crit):
  96. # Test if value is *smaller* than thresholds
  97. warn = '@0:' + warn
  98. crit = '@0:' + crit
  99. return self.value_wc_to_returncode(value, warn, crit)
  100. def add_output(self, value):
  101. self.__output.append(value)
  102. def add_multilineoutput(self, value):
  103. self.__multilineoutput.append(value)
  104. def format_performancedata(self, label, value, unit, *args, **kwargs):
  105. label = label.lstrip().rstrip()
  106. if re.search('[=\' ]', label):
  107. label = '\'' + label + '\''
  108. perfdata = label + '=' + str(value)
  109. if unit:
  110. perfdata += str(unit).lstrip().rstrip()
  111. for key in ['warn', 'crit', 'min', 'max']:
  112. perfdata += ';'
  113. if key in kwargs and kwargs[key]!=None:
  114. perfdata += str(kwargs[key])
  115. return perfdata
  116. def add_performancedata(self, perfdata):
  117. self.__performancedata.append(perfdata)
  118. def format_add_performancedata(self, label, value, unit, *args, **kwargs):
  119. self.add_performancedata(self.format_performancedata(label, value, unit, *args, **kwargs))
  120. def add_returncode(self, value):
  121. self.__returncode.append(value)
  122. def tagtarget(self, tag, target):
  123. if target:
  124. return str(tag) + ':' + str(target)
  125. else:
  126. return str(tag)
  127. def remember_check(self, tag, returncode, output, multilineoutput=None, perfdata=None, target=None):
  128. check = {}
  129. check['tag'] = tag
  130. check['returncode'] = returncode
  131. check['output'] = output
  132. check['multilineoutout'] = multilineoutput
  133. check['perfdata'] = perfdata
  134. check['target'] = target
  135. self.remember_perfdata(perfdata)
  136. self.__brain_checks.append(check)
  137. return check
  138. def remember_perfdata(self, perfdata=None):
  139. if perfdata:
  140. for pd in perfdata:
  141. if pd['label'] in self.__brain_perfdatalabels:
  142. pdidx = self.__brain_perfdatalabels.index(pd['label'])
  143. self.__brain_perfdata[pdidx] = pd
  144. else:
  145. self.__brain_perfdata.append(pd)
  146. self.__brain_perfdatalabels.append(pd['label'])
  147. def dump_brain(self):
  148. return (self.__brain_checks, self.__brain_perfdata)
  149. def brain2output(self):
  150. out = [[], [], [], []]
  151. for check in self.__brain_checks:
  152. tagtarget = self.tagtarget(check['tag'], check.get('target'))
  153. returncode = check.get('returncode') or 0
  154. self.add_returncode(returncode)
  155. out[returncode].append(tagtarget)
  156. #if returncode == 0:
  157. # self.add_output(tagtarget)
  158. #else:
  159. # self.add_output(tagtarget + '(' + check.get('output') + ') ')
  160. self.add_multilineoutput(self.RETURNSTRINGS[returncode] + ' ' + tagtarget + ' - ' + check.get('output'))
  161. if check.get('multilineoutput'):
  162. self.add_multilineoutput(check.get('multilineoutput'))
  163. statusline = []
  164. for retcode in [2, 1, 3, 0]:
  165. if len(out[retcode]):
  166. statusline.append(str(len(out[retcode])) + ' ' + self.RETURNSTRINGS[retcode] + ': ' + '/'.join(out[retcode]))
  167. statusline = ', '.join(statusline)
  168. self.add_output(statusline)
  169. for pd in self.__brain_perfdata:
  170. self.format_add_performancedata(**pd)
  171. def value_to_human_binary(self, value, unit=''):
  172. for power in self.powers_binary:
  173. if value < 1024.0:
  174. return "%3.1f%s%s" % (value, power, unit)
  175. value /= 1024.0
  176. if float(value) not in [float('inf'), float('-inf')]:
  177. return "%3.1fYi%s" % (value, unit)
  178. else:
  179. return value
  180. def value_to_human_si(self, value, unit=''):
  181. for power in self.powers_si:
  182. if value < 1000.0:
  183. return "%3.1f%s%s" % (value, power, unit)
  184. value /= 1000.0
  185. if float(value) not in [float('inf'), float('-inf')]:
  186. return "%3.1fY%s" % (value, unit)
  187. else:
  188. return value
  189. def human_to_number(self, value, total=None):
  190. if total:
  191. if not self.is_float(total):
  192. total = self.human_to_number(total)
  193. if self.is_float(value):
  194. return float(value)
  195. elif value[-1] == '%':
  196. if total:
  197. return float(value[:-1])/100.0 * float(total)
  198. else:
  199. return float(value[:-1])
  200. elif value[-1].lower() in self.powers_si_lower:
  201. return 1000.0 ** self.powers_si_lower.index(value[-1].lower()) * float(value[:-1])
  202. elif value[-2:].lower() in self.powers_binary_lower:
  203. return 1024.0 ** self.powers_binary_lower.index(value[-2:].lower()) * float(value[:-2])
  204. else:
  205. return value
  206. def range_dehumanize(self, range, total=None):
  207. newrange = ''
  208. if len(range):
  209. if range[0] == '@':
  210. newrange += '@'
  211. range = range[1:]
  212. parts = range.split(':')
  213. newrange += str(self.human_to_number(parts[0], total))
  214. if len(parts) > 1:
  215. newrange += ':' + str(self.human_to_number(parts[1], total))
  216. if range != newrange:
  217. self.verbose(3, 'Changed range/thresold from "' + range + '" to "' + newrange + '"')
  218. return newrange
  219. else:
  220. return ''
  221. def verbose(self, level, output):
  222. if level <= self.options.verbose:
  223. print 'V' + str(level) + ': ' + output
  224. def exit(self):
  225. for returncode in self.returncode_priority:
  226. if returncode in self.__returncode:
  227. break
  228. self.back2nagios(returncode, statusline=self.__output, multiline=self.__multilineoutput, performancedata=self.__performancedata)
  229. def back2nagios(self, returncode, statusline=None, multiline=None, performancedata=None, subtag=None, exit=True):
  230. # FIXME: Make 'returncode' also accept strings
  231. # Build status line
  232. out = self.__tagforstatusline
  233. if subtag:
  234. out += '(' + subtag.replace('|', ' ') + ')'
  235. out += ' ' + self.RETURNSTRINGS[returncode]
  236. # Check if there's a status line text and build it
  237. if statusline:
  238. out += ' - '
  239. if type(statusline) == str:
  240. out += statusline
  241. elif type(statusline) in [list, tuple]:
  242. out += ', '.join(statusline).replace('|', ' ')
  243. # Check if we have multi line output and build it
  244. if multiline:
  245. if type(multiline) == str:
  246. out += '\n' + multiline.replace('|', ' ')
  247. elif type(multiline) in [list, tuple]:
  248. out += '\n' + '\n'.join(multiline).replace('|', ' ')
  249. # Check if there's perfdata
  250. if performancedata:
  251. out += '|'
  252. if type(performancedata) == str:
  253. out += performancedata
  254. elif type(performancedata) in [list, tuple]:
  255. out += ' '.join(performancedata).replace('|', ' ')
  256. # Exit program or return output line(s)
  257. if exit:
  258. print out
  259. sys.exit(returncode)
  260. else:
  261. return (returncode, out)
  262. ##############################################################################
  263. class SNMPMonitoringPlugin(MonitoringPlugin):
  264. def __init__(self, *args, **kwargs):
  265. # Same as "MonitoringPlugin.__init__(*args, **kwargs)" but a little bit more flexible
  266. #super(MonitoringPlugin, self).__init__(*args, **kwargs)
  267. MonitoringPlugin.__init__(self, *args, **kwargs)
  268. self.add_cmdlineoption('-H', '', 'host', 'Host to check', default='127.0.0.1')
  269. self.add_cmdlineoption('-P', '', 'snmpversion', 'SNMP protocol version', default='1')
  270. self.add_cmdlineoption('-C', '', 'snmpauth', 'SNMP v1/v2c community OR SNMP v3 quadruple', default='public')
  271. self.add_cmdlineoption('', '--snmpcmdlinepath', 'snmpcmdlinepath', 'Path to "snmpget" and "snmpwalk"', default='/usr/bin')
  272. # FIXME
  273. self.add_cmdlineoption('', '--nonetsnmp', 'nonetsnmp', 'Do not use NET-SNMP python bindings', action='store_true')
  274. # self.__optparser.add_option('', '--nonetsnmp', dest='nonetsnmp', help='Do not use NET-SNMP python bindings', action='store_true')
  275. self.__SNMP_Cache = {}
  276. self.__use_netsnmp = False
  277. self.__prepared_snmp = False
  278. def prepare_snmp(self):
  279. if not self._cmdlineoptions_parsed:
  280. self.parse_cmdlineoptions()
  281. if not self.options.nonetsnmp:
  282. try:
  283. import netsnmp
  284. self.__use_netsnmp = True
  285. except ImportError:
  286. pass
  287. if self.__use_netsnmp:
  288. self.verbose(1, 'Using NET-SNMP Python bindings')
  289. self.SNMPGET_wrapper = self.__SNMPGET_netsnmp
  290. self.SNMPWALK_wrapper = self.__SNMPWALK_netsnmp
  291. if self.options.snmpversion == '2c':
  292. self.options.snmpversion = '2'
  293. else:
  294. self.verbose(1, 'Using NET-SNMP command line tools')
  295. self.SNMPGET_wrapper = self.__SNMPGET_cmdline
  296. self.SNMPWALK_wrapper = self.__SNMPWALK_cmdline
  297. # Building command lines
  298. self.__CMDLINE_get = os.path.join(self.options.snmpcmdlinepath, 'snmpget') + ' -OqevtU '
  299. self.__CMDLINE_walk = os.path.join(self.options.snmpcmdlinepath, 'snmpwalk') + ' -OqevtU '
  300. if self.options.snmpversion in [1, 2, '1', '2', '2c']:
  301. if self.options.snmpversion in [2, '2']:
  302. self.options.snmpversion = '2c'
  303. self.__CMDLINE_get += ' -v' + str(self.options.snmpversion) + ' -c' + self.options.snmpauth + ' '
  304. self.__CMDLINE_walk += ' -v' + str(self.options.snmpversion) + ' -c' + self.options.snmpauth + ' '
  305. elif options.snmpversion == [3, '3']:
  306. # FIXME: Better error handling
  307. try:
  308. snmpauth = self.options.snmpauth.split(':')
  309. self.__CMDLINE_get += ' -v3 -l' + snmpauth[0] + ' -u' + snmpauth[1] + ' -a' + snmpauth[2] + ' -A' + snmpauth[3] + ' '
  310. self.__CMDLINE_walk += ' -v3 -l' + snmpauth[0] + ' -u' + snmpauth[1] + ' -a' + snmpauth[2] + ' -A' + snmpauth[3] + ' '
  311. except:
  312. self.back2nagios(3, 'Could not build SNMPv3 command line, need "SecLevel:SecName:AuthProtocol:AuthKey"')
  313. else:
  314. self.back2nagios(3, 'Unknown SNMP version "' + str(self.options.snmpversion) + '"')
  315. self.__CMDLINE_get += ' ' + self.options.host + ' %s 2>/dev/null'
  316. self.__CMDLINE_walk += ' ' + self.options.host + ' %s 2>/dev/null'
  317. self.verbose(3, 'Using commandline: ' + self.__CMDLINE_get)
  318. self.verbose(3, 'Using commandline: ' + self.__CMDLINE_walk)
  319. self.__prepared_snmp = True
  320. def find_index_for_value(self, list_indexes, list_values, wanted):
  321. self.verbose(2, 'Look for "' + str(wanted) + '"')
  322. index = None
  323. if len(list_indexes) != len(list_values):
  324. self.verbose(1, 'Length of index and value lists do not match!')
  325. return None
  326. try:
  327. index = list_values.index(wanted)
  328. index = list_indexes[index]
  329. except ValueError:
  330. pass
  331. if index:
  332. self.verbose(2, 'Found "' + str(wanted) +'" with index "' + str(index) + '"')
  333. else:
  334. self.verbose(2, 'Nothing found!')
  335. return str(index)
  336. def find_in_table(self, oid_index, oid_values, wanted):
  337. self.verbose(2, 'Look for "' + str(wanted) + '" in "' + str(oid_values) +'"')
  338. index = None
  339. indexes = list(self.SNMPWALK(oid_index))
  340. values = list(self.SNMPWALK(oid_values))
  341. if len(indexes) != len(values):
  342. self.back2nagios(3, 'Different data from 2 SNMP Walks!')
  343. return str(self.find_index_for_value(indexes, values, wanted))
  344. def SNMPGET(self, baseoid, idx=None, exitonerror=True):
  345. if type(baseoid) in (list, tuple) and idx != None:
  346. idx = str(idx)
  347. if self.options.snmpversion in [1, '1']:
  348. value_low = long(self.SNMPGET_wrapper(baseoid[1] + '.' + idx, exitonerror=exitonerror))
  349. if value_low < 0L:
  350. value_low += 2 ** 32
  351. value_hi = long(self.SNMPGET_wrapper(baseoid[2] + '.' + idx, exitonerror=exitonerror))
  352. if value_hi < 0L:
  353. value_hi += 2 ** 32
  354. return value_hi * 2L ** 32L + value_low
  355. elif self.options.snmpversion in [2, 3, '2', '2c', '3']:
  356. return long(self.SNMPGET_wrapper(baseoid[0] + '.' + idx, exitonerror=exitonerror))
  357. elif type(baseoid) in (str, ) and idx != None:
  358. return self.SNMPGET_wrapper(baseoid + str(idx), exitonerror=exitonerror)
  359. else:
  360. return self.SNMPGET_wrapper(baseoid, exitonerror=exitonerror)
  361. def SNMPWALK(self, baseoid, exitonerror=True):
  362. return self.SNMPWALK_wrapper(baseoid, exitonerror=exitonerror)
  363. def __SNMPGET_netsnmp(self, oid, exitonerror=True):
  364. if not self.__prepared_snmp:
  365. self.prepare_snmp()
  366. if oid in self.__SNMP_Cache:
  367. self.verbose(2, "%40s -> (CACHED) %s" % (oid, self.__SNMP_Cache[oid]))
  368. return self.__SNMP_Cache[oid]
  369. result = netsnmp.snmpget(oid, Version=int(self.options.snmpversion), DestHost=self.options.host, Community=self.options.snmpauth)[0]
  370. if not result:
  371. if exitonerror:
  372. self.back2nagios(3, 'Timeout or no answer from "%s" looking for "%s"' % (self.options.host, oid))
  373. else:
  374. return None
  375. self.__SNMP_Cache[oid] = result
  376. self.verbose(2, "%40s -> %s" % (oid, result))
  377. return result
  378. def __SNMPWALK_netsnmp(self, oid, exitonerror=True):
  379. if not self.__prepared_snmp:
  380. self.prepare_snmp()
  381. if oid in self.__SNMP_Cache:
  382. self.verbose(2, "%40s -> (CACHED) %s" % (oid, self.__SNMP_Cache[oid]))
  383. return self.__SNMP_Cache[oid]
  384. result = netsnmp.snmpwalk(oid, Version=int(self.options.snmpversion), DestHost=self.options.host, Community=self.options.snmpauth)
  385. if not result:
  386. if exitonerror:
  387. self.back2nagios(3, 'Timeout or no answer from "%s" looking for "%s"' % (self.options.host, oid))
  388. else:
  389. return None
  390. self.__SNMP_Cache[oid] = result
  391. self.verbose(2, "%40s -> %s" % (oid, result))
  392. return result
  393. def __SNMPGET_cmdline(self, oid, exitonerror=True):
  394. if not self.__prepared_snmp:
  395. self.prepare_snmp()
  396. cmdline = self.__CMDLINE_get % oid
  397. self.verbose(2, cmdline)
  398. cmd = os.popen(cmdline)
  399. out = cmd.readline().rstrip().replace('"','')
  400. retcode = cmd.close()
  401. if retcode:
  402. if not exitonerror:
  403. return None
  404. if retcode == 256:
  405. self.back2nagios(3, 'Timeout - no SNMP answer from "' + self.options.host + '"')
  406. elif retcode ==512:
  407. self.back2nagios(3, 'OID "' + oid + '" not found')
  408. else:
  409. self.back2nagios(3, 'Unknown error code "' + str(retcode) + '" from command line utils')
  410. self.verbose(1, out)
  411. return out
  412. def __SNMPWALK_cmdline(self, oid, exitonerror=True):
  413. if not self.__prepared_snmp:
  414. self.prepare_snmp()
  415. cmdline = self.__CMDLINE_walk % oid
  416. self.verbose(2, cmdline)
  417. cmd = os.popen(cmdline)
  418. out = cmd.readlines()
  419. retcode = cmd.close()
  420. if retcode:
  421. if not exitonerror:
  422. return None
  423. if retcode == 256:
  424. self.back2nagios(3, 'Timeout - no SNMP answer from "' + self.options.host + '"')
  425. elif retcode ==512:
  426. self.back2nagios(3, 'OID "' + oid + '" not found')
  427. else:
  428. self.back2nagios(3, 'Unknown error code "' + str(retcode) + '" from command line utils')
  429. for line in range(0,len(out)):
  430. out[line] = out[line].rstrip().replace('"','')
  431. self.verbose(1, out)
  432. return out
  433. ##############################################################################
  434. def main():
  435. myplugin = MonitoringPlugin(pluginname='check_testplugin', tagforstatusline='TEST')
  436. from pprint import pprint
  437. pprint(myplugin.back2nagios(0, 'Nr. 01: Simple plugin', exit=False) )
  438. pprint(myplugin.back2nagios(0, 'Nr. 02: Simple plugin with sub tag', subtag='MySubTag', exit=False) )
  439. pprint(myplugin.back2nagios(0, 'Nr. 10: Exit Code OK', exit=False) )
  440. pprint(myplugin.back2nagios(1, 'Nr. 11: Exit Code WARNING', exit=False) )
  441. pprint(myplugin.back2nagios(2, 'Nr. 12: Exit Code CRITICAL', exit=False) )
  442. pprint(myplugin.back2nagios(3, 'Nr. 13: Exit Code UNKNOWN', exit=False) )
  443. ret = myplugin.back2nagios(0, 'Nr. 20: Plugin with string-based multiline output', 'Line 2\nLine 3\nLine4', exit=False)
  444. print ret[1]
  445. print 'Returncode: ' + str(ret[0])
  446. ret = myplugin.back2nagios(0, 'Nr. 21: Plugin with list-based multiline output', ['Line 2', 'Line 3', 'Line4'], exit=False)
  447. print ret[1]
  448. print 'Returncode: ' + str(ret[0])
  449. ret = myplugin.back2nagios(0, 'Nr. 22: Plugin with tuple-based multiline output', ('Line 2', 'Line 3', 'Line4'), exit=False)
  450. print ret[1]
  451. print 'Returncode: ' + str(ret[0])
  452. myplugin.add_performancedata('Val1', 42, '')
  453. myplugin.add_performancedata('Val2', 23, 'c', warn=10, crit=20, min=0, max=100)
  454. myplugin.add_performancedata('Val 3', '2342', 'c', warn=10, crit=20, min=0, max=100)
  455. pprint(myplugin.back2nagios(0, 'Nr. 30: With perfdatas', exit=False) )
  456. myplugin.back2nagios(0, 'Nr. 99: Exit test suite with OK')
  457. if __name__ == '__main__':
  458. main()
  459. #vim: ts=4 sw=4