Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Demonstrate telemetry #18

Merged
merged 5 commits into from
Apr 11, 2016
Merged

Demonstrate telemetry #18

merged 5 commits into from
Apr 11, 2016

Conversation

tgross
Copy link
Contributor

@tgross tgross commented Apr 6, 2016

@misterbisson this PR demonstrates the new telemetry feature of Containerbuddy.

I've done a bit of work to update the blueprint to use r2 of our Couchbase blueprint before I add the telemetry work, but I've otherwise tried to avoid doing a rework for things like using CNS to bootstrap the connection to Consul.

Changes so far include:

  • Our Couchbase r2 does not require bootstrapping via docker exec so eliminate that. But we do need to add polling of the REST API to make sure we wait for CB to be ready before writing indexes.
  • Touchbase and Nginx can take advantage of preStart
  • Minor ports cleanup in the compose files
  • Added Prometheus to compose file but its not used in start.sh yet
  • Wrote sensors and added telemetry stanzas to Nginx config
  • Write the sensors and add the telemetry stanzas to Touchbase
  • Opened a separate PR to add a telemetry stanza to Couchbase

Changes include:
- Our Couchbase r2 does not require bootstrapping via docker exec so eliminate
  that. But we do need to add polling of the REST API to make sure we wait for
  CB to be ready before writing indexes.
- Touchbase and Nginx can take advantage of `preStart`
- Minor ports cleanup in the compose files
- Added Prometheus to compose file but its not used in `start.sh` yet
removeBucket benchmark
while true; do
echo -n '.'
curl -sf -u ${COUCHBASE_USER}:${COUCHBASE_PASS} \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section appears in progress, but my question is if you're planning to move the bucket and index creation to the Touchbase preStart script.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to make a minimal intervention in this PR so that we're focusing on telemetry. There's a couple things I'd like to clean up, but I didn't want to go too far down the rabbit hole. Up to you though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we both want to change that at some point. Let's see where/how the rest goes.

Nginx's telemetry configuration measures its current connections and
makes them available for the Prometheus server. Added a section to our
`./start.sh` script to open the Prometheus graph explorer available.
],
"telemetry": {
"name": "telemetry",
"url": "/telemetry",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the URL and name be user-configured options? My reason for asking is how discovery would work in an environment where there may be different for each application.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposal: remove name, url, poll, and ttl as user-configurable options, so that the telemetry stanza is just the following:

  "telemetry": {
    "port": 9090,
    "sensors": [
      {...}
    ]
  }

This goes with TritonDataCenter/containerpilot#27 (comment) and the discussion that followed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking this is a design question about Containerbuddy's telemetry implementation. So I'm moving this conversation to TritonDataCenter/containerpilot#119 (comment) so that anyone following Containerbuddy can follow this discussion.

@tgross
Copy link
Contributor Author

tgross commented Apr 11, 2016

@misterbisson I've added some simple metrics to Touchbase and opened autopilotpattern/couchbase#15 for Couchbase.

@misterbisson
Copy link
Contributor

🏡 🚶

@tgross tgross merged commit 18ec23a into autopilotpattern:master Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants