bosh-monitor 1.2865.0 → 1.2881.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +58 -6
  3. data/lib/bosh/monitor/version.rb +1 -1
  4. metadata +45 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0f9f55a4cafda4c885516166da7af5159d473467
4
- data.tar.gz: c58029e306d0c1ea7d87cf38ed8dfba78da261d6
3
+ metadata.gz: e44cc68a8009e216ec79aece78f1a22927fa0007
4
+ data.tar.gz: 5e88e52fed0c515c880d7f540be6d4a22f05b984
5
5
  SHA512:
6
- metadata.gz: 7b02fbf180a9e100c77210173ba198259d7835a90f49b5e6e7db9915d268a51cd9bb1052ea2a8cd8f0ed158bac03b52c2bc793a50dafb48d4f88a703c9a2a56a
7
- data.tar.gz: 39a839f66fc3273e79dc8481f1380a37a7cb91d9f239298e8a0042dfcf64f180bc392f73fc1d0fd73717799309372f94c584e0fb5996bb113febe01e9a21ec4c
6
+ metadata.gz: 570959d21dd5070d2acb688ef919e139808173769c87b68209826302b154c97b22d6ab212fc8ba2dc149972b3c536014f56be0cfc3e01d5b56e697fc92a1603f
7
+ data.tar.gz: 4255c42046e5243f3a12b8ffa8da5985f2d1db5d574b86b15baf7f4b07fca51d7e727c7201224baadc55475b6b8a867f45ba8c3239195ff735e4a63039b08bee
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ## Synopsis
2
2
 
3
- BOSH Monitor is a component that listens to and responds to events (Heartbeats & Alerts) on the message bus (NATS).
3
+ BOSH Monitor is a component that listens to and responds to events (Heartbeats & Alerts) on the message bus (NATS).
4
4
 
5
5
  The Monitor also includes a few primary components:
6
6
  - The Agent Monitor maintains a record of known agents (by heartbeat event subscription)
@@ -22,7 +22,7 @@ The message syntax is as follows:
22
22
 
23
23
  ## Alert Events
24
24
 
25
- A BOSH Alert is a specific type of event sent by BOSH components via the message bus.
25
+ A BOSH Alert is a specific type of event sent by BOSH components via the message bus.
26
26
 
27
27
  Alerts includes the following data:
28
28
 
@@ -62,8 +62,8 @@ Plugins are notified in the order that they were registered (based on configurat
62
62
 
63
63
  The Agent Monitor listens for heartbeat events on the message bus and handles them in the following way:
64
64
 
65
- - If the Agent is known to the Monitor then the last heartbeat timestamp gets updated.
66
- - If the Agent is unknown to the Monitor then it is recorded with a flag that marks it as a "rogue agent".
65
+ - If the Agent is known to the Monitor then the last heartbeat timestamp gets updated.
66
+ - If the Agent is unknown to the Monitor then it is recorded with a flag that marks it as a "rogue agent".
67
67
 
68
68
  No analysis is performed when a heatbeat is received. The Agent Analyzer process and Director Monitor polling are asynchronous to heartbeat event processing by the Agent Monitor.
69
69
 
@@ -77,14 +77,14 @@ The message syntax is as follows:
77
77
  |----------|------------|------------|
78
78
  | /deployments/\<deployment_name\>/vms | GET | JSON including agent ids, job names and indices for all managed VMs |
79
79
 
80
- - If a new agent is discovered via polling then it is recorded by the Monitor as part of the managed deployment.
80
+ - If a new agent is discovered via polling then it is recorded by the Monitor as part of the managed deployment.
81
81
  - If a "rogue agent" is discovered via polling then its "rogue agent" flag is cleared.
82
82
 
83
83
  The Director Monitor does not actively poll the agents themselves, just the Director. The Director Monitor simply remembers the state of the world as reported by polling and event processing so that the difference can be analyzed.
84
84
 
85
85
  ## Agent Analyzer
86
86
 
87
- The Agent Analyzer is a periodic process that generates "Agent Missing" alerts.
87
+ The Agent Analyzer is a periodic process that generates "Agent Missing" alerts.
88
88
 
89
89
  If an agent's heartbeat timestamp is not updated within the configured time period, the Agent Analyzer process will generate an "Agent Missing" alert.
90
90
 
@@ -103,3 +103,55 @@ BOSH Agent is responsible for mapping any underlying supervisor alert format to
103
103
  The Monitor is responsible for interpreting the JSON payload and mapping it to a sequence of Monitor & Plugin actions, possibly generating new alerts that bypass the message bus. Malformed payloads are ignored.
104
104
 
105
105
  Job name and index are not part of alerts from the Agent, those are looked up in the Director. If heartbeat came from a rogue agent and we have no job name and/or index then we note that fact in the alert description but don't try to be too worried about that (service name and agent id should be enough). We might consider including agent IP address as a part of heartbeat so we can track down rogue agents.
106
+
107
+ ## Authoring new health monitoring plugins
108
+
109
+ There are many existing ways to communicate health alerts to the external world. If you need an additional method then you can create new `bosh-monitor` plugins.
110
+
111
+ The following instructures are for developing/testing your new plugin into a new single-server BOSH:
112
+
113
+ 1. Clone bosh repo and install dependencies
114
+
115
+ ```
116
+ git clone https://github.com/cloudfoundry/bosh.git
117
+ cd bosh
118
+ bundle install
119
+ ```
120
+
121
+ 2. Run the current `bosh-monitor` tests to ensure they currently all pass
122
+
123
+ ```
124
+ cd bosh-monitor
125
+ rspec
126
+ ```
127
+
128
+ 2. Create a `plugin.rb` for your plugin extension https://github.com/cloudfoundry/bosh/tree/master/bosh-monitor/lib/bosh/monitor/plugins
129
+ 3. Create a matching test file for your plugin extension `spec.rb` https://github.com/cloudfoundry/bosh/tree/master/bosh-monitor/spec/unit/bosh/monitor/plugins
130
+ 4. Write tests and make them pass
131
+
132
+ ```
133
+ rspec
134
+ ```
135
+
136
+ 5. Allow configuration to be passed into the `health_monitor` job template to activate and configure your plugin https://github.com/cloudfoundry/bosh/blob/master/release/jobs/health_monitor/spec and https://github.com/cloudfoundry/bosh/blob/master/release/jobs/health_monitor/templates/health_monitor.yml.erb
137
+ 6. Run the rake task to create a bosh release of your modified `bosh`
138
+
139
+ ```
140
+ rake release:create_dev_release
141
+ ```
142
+
143
+ 7. Upload to your microbosh
144
+
145
+ ```
146
+ rake release:upload_dev_release
147
+ ```
148
+
149
+ 8. Construct a deployment manifest to deploy a new bosh https://github.com/cloudfoundry/bosh/blob/master/release/examples/bosh-openstack-solo.yml
150
+ 9. Deploy
151
+
152
+ ```
153
+ bosh deployment path/to/manifest.yml
154
+ bosh deploy
155
+ ```
156
+
157
+ 10. Externally test your plugin -> external thing
@@ -1,5 +1,5 @@
1
1
  module Bosh
2
2
  module Monitor
3
- VERSION = '1.2865.0'
3
+ VERSION = '1.2881.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bosh-monitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2865.0
4
+ version: 1.2881.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - VMware
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-06 00:00:00.000000000 Z
11
+ date: 2015-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eventmachine
@@ -136,9 +136,51 @@ dependencies:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
138
  version: 1.6.0
139
+ - !ruby/object:Gem::Dependency
140
+ name: rake
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: rspec-its
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
139
181
  description: |-
140
182
  BOSH Health Monitor
141
- 14ebaf
183
+ 756fc2
142
184
  email: support@cloudfoundry.com
143
185
  executables:
144
186
  - bosh-monitor-console