REM Package Example


/ Published in: Python
Save to your folder(s)

With comments, and not stripped, version in development. Not Python, YAML.


Copy this code and paste it in your HTML
  1. # Red Eye Monitor (REM) by Geoff Howland
  2. #
  3. # Suite Package: For use with REM Package system, which is a generic system
  4. # for creating runnable code, services, web pages and RPC handlers.
  5. #
  6.  
  7. # Package information
  8. package:
  9. name: "Red Eye Monitor"
  10. version: "2010.11.22.00"
  11. # Stability: unstable (development is occurring) -> testing (development has stopped) -> accepted (>N [10 medium?] sites confirm running) -> stable (>10 days w/o new bug reports)-> proven (>90(?) days w/o new bug reports)
  12. #TODO(g): "accepted" will be judged by me initially, because there is no
  13. # user base, and also no integrated bug tracking issue tests, so all of
  14. # this is manual until automation for it arrives
  15. stability: unstable
  16.  
  17. short: rem
  18. author: Geoff Howland
  19. maintainer: Geoff Howland
  20. contributors: []
  21. info: "Comprehensive cloud automation for lazy control freaks"
  22. website: http://redeyemon.wordpress.com/
  23.  
  24. # This is a Suite package, which means it is meant to be a collection of
  25. # packages and web stuff. It is a high-level master-application type package.
  26. type: suite
  27.  
  28.  
  29. # This is the script that launches the State scripts, and runs the State
  30. # Evaluator if necessary
  31. #NOTE(g): This is a standard launcher, which can be used on any package. If
  32. # you want to customize it, rename it to something like "name_launcher.py"
  33. # is it's obvious you have modified it and it is not the default launcher.
  34. launcher: launcher.py
  35.  
  36.  
  37. # This is the State Evaluator script for this package. If the state is
  38. # left blank ("") it will be run on mounting the package. If a state script
  39. # finished running, and did not set a new state, it is run to determine
  40. # the next state.
  41. #TODO(g): Is this generic or specific? It's just going to process the states?
  42. # If so, then it is generic, and isn't needed here. The Package module
  43. # can do it all, and just RUN the script thats in the current system...
  44. # This changes things though, but making a handler custom would be a pain,
  45. # no one will want to do it...
  46. #TODO(g): Generic State Evaluator will simply set the state to "active"
  47. #DEFAULT:#state evaluator: scripts/state_evaluator.py
  48. state evaluator: rem_state_evaluator.py
  49.  
  50.  
  51. # Paths to use when working with this package
  52. paths:
  53. # Where our scripts like, this is a sandbox for some security
  54. #NOTE(g): I only do this for scripts, as they have an execution component,
  55. # so this will aid in sandboxing their runs
  56. #TODE(g):SECURITY: There is a lot to do here later, for now do it simply
  57. script: package/rem/package/scripts/
  58.  
  59. # data, static and other paths work off the base package path prefix
  60. #NOTE(g): This is because I think the paths to the data files look clearest
  61. # this way. Scripts are usually prefixed by something that says "script"
  62. # in the key, but data files may have lots of interesting names. The
  63. # "data/" prefix in the path adds information, that this is data request,
  64. # and not a block. Basically, I think it's hard to read.
  65. base: package/rem/package/
  66.  
  67.  
  68.  
  69. # Modules are not run, but they exist as named plug-ins to the package.
  70. # Using modules allows a flexible and universal method of making resource
  71. # groups for the package state handler. Use them for including groups of
  72. # scripts, or groups of data sources, or whatever your package might need.
  73. # Because they are just a data container for your scripts to use, they are
  74. # completely free for any purpose. The advantage of this is that accessing
  75. # resources is the same from any package script, and any package script can
  76. # access the resources of any other package module by:
  77. # GetPackageModule(group, name)
  78. #TODO(g): Implement: GetPackageModule(group, name)
  79. #TODO(g):SECURITY:HIGH: Add filters to allow/deny modules to outside sources,
  80. # and name specific sources for allow/deny. ACLs. Make general library,
  81. # so sharedstate/locks/counters and message queues can also use ACLs.
  82. # This is of primary concern for RPC calls, and an ACL should be able to
  83. # specify not allowing a DynamicRPC or other calls to access data. (LATER)
  84. modules:
  85. # Module Groups are used to give name spaces to the elements in the module
  86. #TODO(g):REMOVE: These are monitoring modules, but it's an example
  87. monitors:
  88. ping:
  89. remote: true
  90. script:
  91. - monitors/ping.py
  92. snmp:
  93. remote: true
  94. script:
  95. - monitors/snmp.py
  96. tcp:
  97. remote: true
  98. script:
  99. - monitors/tcp.py
  100. http:
  101. remote: true
  102. script:
  103. - monitors/http.py
  104. local:
  105. remote: false
  106. script:
  107. - monitors/local.py
  108. collector:
  109. remote: true
  110. script:
  111. - monitors/collector.py
  112.  
  113.  
  114. # Scripts to process the results of module scripts
  115. #NOTE(g): This will be passed along with to the Job Scheduler Suite.
  116. # This allows us to have custom processing for results from modules that
  117. # we register with the Job Scheduler to run
  118. module result processors:
  119. monitors: scripts/process/monitor_processor.py
  120.  
  121.  
  122. # Alternative method:
  123. # A module result specification, which defines how to deal with the results,
  124. # in the standard way that I deal with results. This is good for the
  125. # monitoring type situations.
  126. module result specifications:
  127. monitors: data/monitor/monitor_result_processor.yaml
  128.  
  129.  
  130. # HTTP, RPC stuff
  131. #TODO(g): Come up with a better fucking name than "communications", it sucks
  132. #NOTE(g): Is "web" much better? I liked more generic better...
  133. communication:
  134. # Will look in the static path for files referenced by relative path if they
  135. # are not caught by HTTP path matches.
  136. static:
  137. path: static/html/
  138.  
  139. # Non-User defined HTTP page entries.
  140. #NOTE(g): User defined is in: ./data/web/user_pages.yaml
  141. http:
  142. # Show internals page
  143. #TODO(g): This could be better, all the way around...
  144. show:
  145. run:
  146. - script: scripts/web_demo/show.py
  147.  
  148. # Show internals page
  149. #TODO(g): Move this to the dropStar Suite Package
  150. admin:
  151. run:
  152. - script: scripts/web_demo/admin.py
  153.  
  154. template:
  155. path: static/html/simple.html
  156.  
  157. # Show internals page
  158. #TODO(g): Move this to the dropStar Suite Package
  159. widgets:
  160. run:
  161. - script: scripts/web_demo/widgets.py
  162.  
  163. template:
  164. path: static/html/simple.html
  165.  
  166. # Import all content in this YAML file as pages for this package
  167. #TODO(g): Move this to the dropStar Suite Package
  168. __load: data/web/user_pages.yaml
  169.  
  170.  
  171. # RPC calls: JSON data over XmlHttpRequest JS call (via web)
  172. rpc:
  173. #TODO(g): Clean up the cruft in this file, half of these arent used any more
  174. "":
  175. run:
  176. - script: scripts/web_demo/search.py
  177.  
  178.  
  179. Search:
  180. run:
  181. - script: scripts/web_demo/search.py
  182.  
  183.  
  184. # Reload specified 'widgets'. List or space delimited: widgets have no spaces
  185. #TODO(g): This one is universal? Could using specific ones to keep
  186. # context/position be a good practice?
  187. ReloadWidgets:
  188. run:
  189. - script: scripts/admin/reload_widgets.py
  190.  
  191.  
  192. #TODO(g): This one is universal? Could using specific ones to keep
  193. # context/position be a good practice?
  194. DynamicRPC:
  195. run:
  196. #TODO(g): This will need to use the PACKAGE name (mounted name) to
  197. # access the proper script now, since they can be dynamically
  198. # mounted anywhere...
  199. - script: scripts/dynamic/dynamic_rpc.py
  200.  
  201.  
  202. # Monitoring
  203. #TODO(g): Use DynamicRPC and get rid of these...
  204. MonitorHostList:
  205. run:
  206. - script: scripts/monitor_admin/host_list.py
  207.  
  208. MonitorHostView:
  209. run:
  210. - script: scripts/monitor_admin/host_view.py
  211.  
  212. MonitorGraphList:
  213. run:
  214. - script: scripts/monitor_admin/graph_list.py
  215.  
  216. MonitorGraphView:
  217. run:
  218. - script: scripts/monitor_admin/graph_view.py
  219.  
  220. MonitorGraphViewDialog:
  221. run:
  222. - script: scripts/monitor_admin/graph_view_dialog.py
  223.  
  224. #TODO(g): Later this will do more things, for now it's a single purpose menu
  225. #TODO(g): Use DynamicRPC and get rid of these...
  226. MonitorManageMonitors:
  227. run:
  228. - script: scripts/monitor_admin/create_monitor_dialog.py
  229.  
  230. CreateMonitor:
  231. run:
  232. - script: scripts/monitor_admin/create_monitor.py
  233.  
  234. DeleteMonitorDialog:
  235. run:
  236. - script: scripts/monitor_admin/delete_monitor_dialog.py
  237.  
  238. DeleteMonitorConfirmed:
  239. run:
  240. - script: scripts/monitor_admin/delete_monitor.py
  241.  
  242. #TODO(g): Later this will do more things, for now it's a single purpose menu
  243. #TODO(g): Use DynamicRPC and get rid of these...
  244. MonitorManageHosts:
  245. run:
  246. - script: scripts/monitor_admin/create_host_dialog.py
  247.  
  248. CreateMonitorHost:
  249. run:
  250. - script: scripts/monitor_admin/create_host.py
  251.  
  252. DeleteMonitorHostDialog:
  253. run:
  254. - script: scripts/monitor_admin/delete_host_dialog.py
  255.  
  256. DeleteMonitorHostConfirmed:
  257. run:
  258. - script: scripts/monitor_admin/delete_host.py
  259.  
  260. CreateDashboardDialog:
  261. run:
  262. - script: scripts/monitor_admin/create_dashboard_dialog.py
  263.  
  264. CreateDashboardConfirmed:
  265. run:
  266. - script: scripts/monitor_admin/create_dashboard.py
  267.  
  268. AlertVisualizerView:
  269. run:
  270. - script: scripts/monitor_admin/alert_visualizer.py
  271.  
  272. AlertVisualizerDialog:
  273. run:
  274. - script: scripts/monitor_admin/alert_visualizer_dialog.py
  275.  
  276.  
  277. # Work on many selected hosts
  278. #TODO(g): Use DynamicRPC and get rid of these...
  279. MonitorAddDefaultMonitorsToHosts:
  280. run:
  281. - script: scripts/monitor_admin/selected_hosts_add_default_monitors.py
  282.  
  283. MonitorAddDefaultMonitorsToHostsDialog:
  284. run:
  285. - script: scripts/monitor_admin/selected_hosts_add_default_monitors_dialog.py
  286.  
  287. MonitorDeleteSelectedHosts:
  288. run:
  289. - script: scripts/monitor_admin/selected_hosts_delete.py
  290.  
  291. MonitorDeleteSelectedHostsDialog:
  292. run:
  293. - script: scripts/monitor_admin/selected_hosts_delete_dialog.py
  294.  
  295.  
  296. # Mother's RPC
  297. GetHost:
  298. run:
  299. - script: scripts/mother/get_host.py
  300.  
  301. GetAllHosts:
  302. run:
  303. - script: scripts/mother/get_all_hosts.py
  304.  
  305.  
  306. #TODO(g): Move to dropStar Suite Package
  307. #TODO(g): Use DynamicRPC and get rid of these...
  308. UpdateAdmin:
  309. run:
  310. - script: scripts/web_demo/admin.py
  311.  
  312. UpdateWidgets:
  313. run:
  314. - script: scripts/web_demo/widgets.py
  315.  
  316. CreatePageDialog:
  317. run:
  318. - script: scripts/admin/create_page_dialog.py
  319.  
  320. CreatePage:
  321. run:
  322. - script: scripts/admin/create_page.py
  323.  
  324. CreateWidgetDialog:
  325. run:
  326. - script: scripts/admin/create_widget_dialog.py
  327.  
  328. CreateWidget:
  329. run:
  330. - script: scripts/admin/create_widget.py
  331.  
  332. CollectFieldSet:
  333. run:
  334. - script: scripts/web_demo/collect_fieldset.py
  335. ViewPageWidgets:
  336. run:
  337. - script: scripts/admin/view_page_widgets.py
  338.  
  339. EditPageDialog:
  340. run:
  341. - script: scripts/admin/edit_page_dialog.py
  342.  
  343. EditPageSave:
  344. run:
  345. - script: scripts/admin/create_page.py
  346.  
  347. DeletePageDialog:
  348. run:
  349. - script: scripts/admin/delete_page_dialog.py
  350.  
  351. DeletePageConfirmed:
  352. run:
  353. - script: scripts/admin/delete_page.py
  354.  
  355. ClonePageDialog:
  356. run:
  357. - script: scripts/admin/clone_page_dialog.py
  358.  
  359. ClonePage:
  360. run:
  361. - script: scripts/admin/clone_page.py
  362.  
  363. EditWidgetDialog:
  364. run:
  365. - script: scripts/admin/create_widget_dialog.py
  366.  
  367. EditWidgetSave:
  368. run:
  369. - script: scripts/admin/edit_widget_save.py
  370.  
  371. DeleteWidgetDialog:
  372. run:
  373. - script: scripts/admin/delete_widget_dialog.py
  374.  
  375. DeleteWidgetConfirmed:
  376. run:
  377. - script: scripts/admin/delete_widget.py
  378.  
  379. #TODO(g): Later this may do more, for now it just creates pages...
  380. #TODO(g): Use DynamicRPC and get rid of these...
  381. ManagePages:
  382. run:
  383. - script: scripts/admin/create_page_dialog.py
  384.  
  385. #TODO(g): Later this may do more, for now it just creates widgets...
  386. #TODO(g): Use DynamicRPC and get rid of these...
  387. ManageWidgets:
  388. run:
  389. - script: scripts/admin/create_widget_dialog.py
  390.  
  391.  
  392.  
  393.  
  394.  
  395. # State machine for this package
  396. state machine:
  397. # Starting state for this package
  398. state: initial
  399.  
  400. # These contexts will be available as the active state data, when they are set
  401. context:
  402. # Startup context
  403. initial:
  404. # Number of times this script has run or completed
  405. script run times: 0
  406. script completed times: 0
  407.  
  408. # Script data for this context
  409. script:
  410. platform:
  411. # Cross platform run block
  412. xplat:
  413. - script: script/rem/initial.py
  414.  
  415. # Active context
  416. active:
  417. # Number of times this script has run or completed
  418. script run times: 0
  419. script completed times: 0
  420.  
  421. # Script data for this context
  422. script:
  423. platform:
  424. # Cross platform run block
  425. xplat:
  426. - script: script/rem/active.py
  427.  
  428. # Shutdown context
  429. shutdown:
  430. # Number of times this script has run or completed
  431. script run times: 0
  432. script completed times: 0
  433.  
  434. # Script data for this context
  435. script:
  436. platform:
  437. # Cross platform run block
  438. xplat:
  439. #TODO(g): Could send regional collectors information about the shutdown,
  440. # including the NEW mother to use (if this is mother), and why this
  441. # is being shut down, so they can log it, and know WTF is up...
  442. - script: script/rem/shutdown.py
  443.  
  444.  
  445. ## Public key of author, verify that this package was produced by the author
  446. ##TODO(g): ...
  447. #pubkey: null
  448. #
  449. ## Signed application data, SHA1 sum of things that matter...
  450. ##TODO(g): ...
  451. #signed: null
  452.  
  453.  
  454. #TODO(g): What to do about this thing? GLOBAL! Move it to global shared state!
  455. ## Sites that are served by this dropSTAR instance
  456. #data:
  457. # time series path: /timeseries/
  458.  
  459.  
  460. # These packages should be ON this machine, but arent MOUNTED by this package
  461. #TODO(g): Can pass args into the required packages, for use in interfacing
  462. # with this package? Could automate connectors or something, ways to
  463. # intreface or modify/filter data...
  464. requires packages: {}
  465.  
  466. # Mount these packages
  467. #TODO(g): Mount options, "mount as" for different package name, things
  468. # access packages by their names, so the default name is important, but a
  469. # "mount as" could provide an alternative way to use that package.
  470. # Also can provide a over-ride package handler, than the script it specifies
  471. # in the package...
  472. # Could attach additional monitors, or specify the logging target, and
  473. # shit like that...
  474. #TODO(g): LOGGING TARGETS! This is the right place to assign them, then
  475. # use them automatically in the ProcessBlock code, passed down with the
  476. # request_state information, or something.
  477. mount packages:
  478. # The Package Mounter... Really, in the package? How does THIS package
  479. # get mounted? Seems like it needs to be a ProcessBlock type featuer...
  480. # Or better yet, just IN a procbloc.
  481. MonitorPackage: {}
  482. WebStuff: {}
  483.  
  484.  
  485. # Jobs are different than the state machine. They can be run as cron, or
  486. # against the boolean result of a test-script (with cron), or can be
  487. # invoked over RPC, and their status/results/duration are associated with
  488. # the state machine, since they are made to operate on the state machine.
  489. jobs:
  490. # Store monitor results in the "monitor.results.store" queue
  491. #NOTE(g): This allows us to separate processing I/O from other tasks, win!
  492. monitor_storage:
  493. platform:
  494. freebsd:
  495. - script: scripts/monitor/queue_storage.py
  496. interval: 5
  497. xplat:
  498. - script: scripts/monitor/queue_storage.py
  499. interval: 5
  500.  
  501.  
  502. #TODO(g): Change this to pulling data out of the "monitor.results.analyze" queue...
  503. alert_sla_monitoring:
  504. platform:
  505. xplat:
  506. - script: scripts/monitor/alert_sla.py
  507. interval: 5
  508.  
  509. #TODO(g): Conditionally start SLA monitoring! (Test with global lock)
  510. alert_sla_outage_handler:
  511. platform:
  512. xplat:
  513. - script: scripts/monitor/alert_sla_outage.py
  514. interval: 30
  515.  
  516.  
  517. #TODO(g): Move all this stuff into jobs or the state machine
  518. #
  519. ##TODO(g): Conditionally start node monitors! (Test with global lock)
  520. #run workers:
  521. # central_monitoring:
  522. # - script: scripts/monitor/node/node_monitor.py
  523. #
  524. # #TODO(g): Run workers needs to be reformatted...
  525. # #minimum: 5
  526. # #maximum: 20
  527. # #work:
  528. # # - script: scripts/monitor/node/node_monitor.py
  529. #
  530. #
  531. #run_simultaneous:
  532. # #TODO(g): Conditionally start web server? (Test with global lock)
  533. # #
  534. # # Should CONDITIONALLY start this, if any package mounted has http/rpc stuff
  535. # httpd:
  536. # - script: scripts/httpd/__init__.py
  537. #
  538. #
  539. # #TODO(g): Run shared_state_sync automatically if any packages have
  540. # # "load state" data...
  541. #
  542. # # Synchronize our shared state system, saving any defered writes
  543. # shared_state_sync:
  544. # - script: scripts/admin/shared_state_sync.py
  545. #
  546. #
  547. # #TODO(g): Conditionally start SLA monitoring! Uses the Job Scheduler...
  548. #
  549.  
  550.  
  551. # --- Only load these for the REM central server: Mother ---
  552.  
  553.  
  554. # Load sharedstate buckets, so that running state can have persistence
  555. #NOTE(g):Specifies the path to load the state. If a "%s" is present, then
  556. # parse the %s string for the key name, and store the contents of each
  557. # YAML file into a key in the bucket "__timeseries.ts".
  558. # If the "%s" were not present, it would simply load the contents of this
  559. # YAML file into the keys of YAML data. If the YAML data was not in
  560. # dict format, then it would store the data wholey in the key "default".
  561. #NOTE(g): When any of this data is changed, it will be automatically saved
  562. # back into the specified files, as the save files are registered against
  563. # the bucket names in "__sharedstate.save.registered" private bucket.
  564. load state:
  565.  
  566. # --- SPLIT: The below stuff is for the GUI/web system, and should be in a dropStar Suite of it's own! --- #
  567.  
  568. # Load up each of the page widgets, into it's page.ui.widgets key (on page)
  569. ui.page.widgets: data/web/user_page_widgets/%s.yaml
  570.  
  571. # User created pages
  572. ui.pages: data/web/user_pages.yaml
  573.  
  574. # HTML Templates
  575. ui.templates: data/web/html_templates.yaml
  576.  
  577. # Dynamic Widgets: Used to dynamically generate page content from complex
  578. # comprehensive data descriptions
  579. ui.dynamic_widgets: data/web/dynamic_widgets/%s.yaml
  580.  
  581.  
  582. # --- SPLIT: GUI from REM stuff. Above is GUI and should go into a DropStar Suite of it's own! --- #
  583.  
  584. # Load up each of the monitors of each host (key is host's FQDN)
  585. monitors.hosts: data/monitor/hosts.yaml
  586.  
  587. # Host Groups
  588. monitors.host_groups: data/monitor/host_groups.yaml
  589.  
  590. # Monitoring: Alerts: key=alert name
  591. #NOTE(g): SLAs are stored in alert['sla'] = {}. They are alert specific,
  592. # so cannot be keyed on their own name in their own file, without effort.
  593. monitors.alerts: data/monitor/alerts.yaml
  594.  
  595. # Monitoring: Roles: key=role name
  596. monitors.roles: data/monitor/roles.yaml
  597.  
  598. # Monitoring: Contacts: key=contact user name
  599. monitors.contacts: data/monitor/contacts.yaml
  600.  
  601. # Monitoring: Silences: dict of dicts (should be list of dicts)
  602. monitors.silences: data/monitor/silences.yaml
  603.  
  604. # Monitoring: Shifts: key=shift name
  605. monitors.shifts: data/monitor/shifts.yaml
  606.  
  607. # Monitoring: Shift Filters: key=shift filter name
  608. monitors.shift_filters: data/monitor/shift_filters.yaml
  609.  
  610. # Monitoring: Outages: dict of dicts: Active outages
  611. monitors.outages: data/monitor/outages.yaml
  612.  
  613. # Monitoring: Outage Groups: dict of dicts, Active Outage Groups
  614. monitors.outage_groups: data/monitor/outage_groups.yaml
  615.  
  616. # Monitoring: Outage Groups: dict of dicts, Historical Outage Groups
  617. monitors.outage_groups.history: data/monitor/outage_groups_history.yaml
  618.  
  619. # Monitoring: Outages: dict of dicts: Historical outages (completed)
  620. monitors.outages.history.unack: data/monitor/outages_history_unack.yaml
  621.  
  622. # Monitoring: Outages: dict of dicts: Historical outages (completed)
  623. monitors.outages.history.ack: data/monitor/outages_history_ack.yaml
  624.  
  625. # Monitoring: Notifications: dict of dicts: History of emails/SMSs/etc
  626. monitors.notifications: data/monitor/alert_notifications.yaml
  627.  
  628. # Monitoring: Dashboard: dict of dicts
  629. monitors.dashboard: data/monitor/dashboard.yaml
  630.  
  631. # Monitoring: Globals: dict of values
  632. monitors.globals: data/monitor/globals.yaml
  633.  
  634.  
  635. # Keep track of when we last rendered graphs, to ensure we dont do them
  636. # all again immediately on restart
  637. #NOTE(g): If you're wondering why startup takes a lot of time, this is why.
  638. #TODO(g): Cant I remove this now? Graphing is now client side, I dont think
  639. # this is required anymore... Even if we keep them, we dont need to save it
  640. #__timeseries.last_rendered: data/monitor/timeseries_last_rendered.yaml
  641.  
  642.  
  643.  
  644. #TODO(g): I kind of like this specification model, where I could give it a
  645. # full name, or use the path and key, but I have to explicitly save it.
  646. # This way there can be 10000s of locks in the system, but only the specified
  647. # ones are stored, and are done so by package that uses them.
  648. #NODE(g): Use namespaces with dot separation to ensure package separation.
  649. # Not stomping on your data is up to you!
  650. #TODO(g): Add test with warning/error if packages try to use the same variables
  651. # in their usage.
  652. #load locks:
  653. # monitors.lock01: data/monitor/locks/%s.yaml
  654. # monitors.lock02: data/monitor/locks/%s.yaml
  655. # monitors.lock03: data/monitor/locks/%s.yaml
  656.  
  657. #TODO(g): Remove this one the individual lock method is done, this doesnt work
  658. # in a packaged environment... Leaving temporarily only for design history.
  659. #######TODO(g): Stored locks all the locks?
  660. #######TODO(g): Does it ever make sense to store SOME locks? SOME counters?
  661. ####### It seems to me they shouldnt be that plentiful, and they, together, are
  662. ####### the shared state. Clear them if you want, but save them all for peace
  663. ####### of mind that they can be trusted to come back.
  664. #######TODO(g): Figure out the delays on saves, ESPECIALLY for counters, which
  665. ####### by their definition are meant to change in a frequent manner, linear
  666. ####### or exponential to requests
  667. #######load locks: data/monitor/locks.yaml
  668.  
  669.  
  670. # Load the stored counters
  671. #NOTE(g): Being listed here, they will automatically be registered to be
  672. # save, without any delays, so these files should always be accurate in
  673. # terms of the latest counter values
  674. #TODO(g):DESIGN: Switch this to just specify a directory? Then the counters
  675. # can be specified in one line. This way is just more typing...
  676. # Per file has the benefit of them working without any starting files,
  677. # and also not saving counters that are used in the code, but not specified
  678. # to be saved. The method of one entry per counter is more explicit...
  679. load counters:
  680. #TODO(g): Should these be moved into the controllers for this data?
  681. # Maybe the rest of them should be too...
  682. monitors.outages: data/monitor/counters/monitors.outages
  683. monitors.outage_groups: data/monitor/counters/monitors.outage_groups
  684. monitors.notifications: data/monitor/counters/monitors.notifications

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.