Graphite does two things:
- Store numeric time-series data
- Render graphs of this data on demand
What Graphite does not do is collect data for you, however there are some tools out there that know
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI) | |
# This should be performed as root since it's going to be installing a bunch of stuff | |
# --- Update things to make sure we have the latest patches --- | |
# Add EPEL so we can get reasonably recent packages | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# --- Install all the packages --- # | |
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached |
Graphite does two things:
What Graphite does not do is collect data for you, however there are some tools out there that know
#!/usr/bin/env bash | |
# | |
# Get the value of a tag for a running EC2 instance. | |
# | |
# This can be useful within bootstrapping scripts ("user-data"). | |
# | |
# Note the EC3 instance needs to have an IAM role that lets it read tags. The policy | |
# JSON for this looks like: | |
# | |
# { |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
''' | |
Follow these steps to configure the webhook in Slack: | |
1. Navigate to https://<your-team-domain>.slack.com/services/new | |
2. Search for and select "Incoming WebHooks". |
I recently came across the need to spawn multiple threads, each of which needs to write to the same file. Since the file will experience contention from multiple resources, we need to guarantee thread-safety.
NOTE: The following examples work with Python 3.x. To execute the following programs using Python 2.7, please replace threading.get_ident()
with thread.get_ident()
. As a result, you would need to import thread
and not threading
.
# threading_lock.py
import threading
// this currently is restricted on OpenShift Online, however is possible on OSD/OCP clusters | |
// we create a dotnet builder pod using the provided jenkins slave image for executing dotnet commands in | |
podTemplate( | |
label: 'dotnet-build-pod', cloud: 'openshift', | |
containers: [ | |
containerTemplate( | |
name: 'dotnet-build-pod', image: 'registry.access.redhat.com/dotnet/dotnet-20-jenkins-slave-rhel7:latest' | |
) | |
]) { | |
node('dotnet-build-pod-x') { |
We're looking at CPU bandwidth control via CFS:
Program does number of iterations, in each iteration we burn CPU in small chunks until we get 5ms of real time spent. On each iteration we also print how much