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
| PBLOC=~/projects/somewhere/addserver.yml | |
| addserver() { | |
| if [[ -z "$1" ]]; then | |
| echo "[e] You need to give an IP for this to work. Dont use ssh-agent, since it will have precedence" | |
| else | |
| echo "[i] Running setup for new server, be ready to type in your root password" | |
| echo "[i] Removing and re-adding the known_hosts file" | |
| ssh-keygen -f "${HOME}/.ssh/known_hosts" -R $1 | |
| ssh-keyscan -t rsa -H $1 >> ~/.ssh/known_hosts | |
| ansible-playbook ${PBLOC} -u root -i "newserver," --extra-vars="hosts=newserver ansible_ssh_host=$1" -k |
| { | |
| "description": "MyGroup allowed access to MyProject only", | |
| "context": { | |
| "application": "rundeck" | |
| }, | |
| "for": { | |
| "project": [ | |
| { | |
| "match": { | |
| "name": "MyProject" |
| input { | |
| file { | |
| type => "php-error" | |
| path => "/var/www/error_log" | |
| sincedb_path => "/opt/logstash/sincedb-access" | |
| } | |
| } |
| <div>Execution ${execution.id} was <b>${execution.status}</b></div> | |
| <ul> | |
| <li><a href="${execution.href}">Execution result</a></li> | |
| <li><a href="${job.href}">Job</a></li> | |
| <li><a href="${execution.projectHref}">Project: ${execution.project}</a></li> | |
| <li><a href="${rundeck.href}">Rundeck</a></li> | |
| </ul> | |
| <p> | |
| </p> |
Graphite does two things:
What Graphite does not do is collect data for you, however there are some tools out there that know
| from MySQLdb import cursors | |
| from flask import request | |
| class DataTablesServer(object): | |
| def __init__( self, request, columns, index, table, cursor): | |
| self.columns = columns | |
| self.index = index | |
| self.table = table | |
| # values specified by the datatable for filtering, sorting, paging |
| from collections import namedtuple | |
| from pymongo import MongoClient | |
| from flask import request | |
| from core.web.site import app | |
| from core.web.site.views_master import * | |
| import json | |
| ''' | |
| $('#companies').dataTable( { | |
| "bProcessing": true, |
| #!/usr/bin/env python | |
| # Parse disk:* from lshw -xml | |
| """ | |
| Sample Output: | |
| ATA Disk Hitachi HDS72105 /dev/sda | |
| Disk Space: 500107862016 | |
| Sector size: 512 |
| ''' | |
| Demonstration of using `splice` with non-blocking IO | |
| Lots of code is similar to 'splice.py', take a look at that module for more | |
| documentation. | |
| ''' | |
| import os | |
| import os.path | |
| import errno |
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |