tally Documentation Release Dan Watson

Similar documents
Bambu API Documentation

django-app-metrics Documentation

Django-Select2 Documentation. Nirupam Biswas

django-oauth2-provider Documentation

Django Test Utils Documentation

django-selenium Documentation

django-avatar Documentation

django-subdomains Documentation

django-embed-video Documentation

django-openid Documentation

Easy-select2 Documentation

django-allauth-2fa Documentation

Tangent MicroServices Documentation

django-avatar Documentation

FCS Documentation. Release 1.0 AGH-GLK

django-audiofield Documentation

Django IPRestrict Documentation

wagtail-robots Documentation

django-embed-video Documentation

Django-frontend-notification Documentation

staff Documentation Release 1.2

django-password-reset Documentation

django-embed-video Documentation

django-auditlog Documentation

django-cron Documentation

DJOAuth2 Documentation

Tailor Documentation. Release 0.1. Derek Stegelman, Garrett Pennington, and Jon Faustman

djangotribune Documentation

django-konfera Documentation

django-teamwork Documentation

django-ratelimit-backend Documentation

django-mongonaut Documentation

Trunk Player Documentation

django-storages Documentation

Carbon Black QRadar App User Guide

Django QR Code Documentation

turbo-hipster Documentation

Moxie Notifications Documentation

Plone Performance Testing Documentation

django-audit-log Documentation

django-precise-bbcode Documentation

django-session-security Documentation

django-waffle Documentation

django-storages Documentation

Hal Documentation. Release 1.0. Dan Ryan

Privacy and Security in Online Social Networks Department of Computer Science and Engineering Indian Institute of Technology, Madras

Django CBTools Documentation

Django FTP server Documentation

Building a Django Twilio Programmable Chat Application

YouTube API Wrapper Documentation

Kwapi Documentation. Release. OpenStack, LLC

datastream Documentation

django-conduit Documentation

django-notifier Documentation

django-ad-code Documentation

django-celery Documentation

django-oscar-paypal Documentation

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul

Spade Documentation. Release 0.1. Sam Liu

Django MSSQL Documentation

django-intercom Documentation

Graphene Documentation

UReport USSD application Documentation

Archer Documentation. Release 0.1. Praekelt Dev

bbcode Documentation Release Dan Watson

Django MFA Documentation

RESTful User Provisioning with IBM Business Process Manager on Cloud

CIS192 Python Programming

canary Documentation Release 0.1 Branton K. Davis

Kiki Documentation. Release 0.7a1. Stephen Burrows

Performance Platform Documentation

Tablo Documentation. Release Conservation Biology Institute

django-renderit Documentation

ClickToCall SkypeTest Documentation

The Django Web Framework Part VI

django-push Documentation

Django Groups Manager Documentation

bottle-rest Release 0.5.0

micawber Documentation

nidm Documentation Release 1.0 NIDASH Working Group

django-users2 Documentation

IPConfigure Embedded LPR API

Bitdock. Release 0.1.0

Control Center Release Notes

Intro to AIS & Orchestrator (IoT) Presented by Terry Dobbs

Santiago Documentation

django-model-report Documentation

D3 Documentation. Release 1. Khalifah K. Shabazz

Signals Documentation

Pusher Documentation. Release. Top Free Games

P:\filebeat.yml 18 October :55

django-antispam Documentation

Djam Documentation. Release Participatory Culture Foundation

Django-Front Documentation

django-secure Documentation

Course Title: Python + Django for Web Application

neo4django Documentation

Django Leaflet Documentation

django-slim Documentation

eventbrite-sdk-python Documentation

Transcription:

tally Documentation Release 1.0.0 Dan Watson Sep 27, 2017

Contents 1 Installation 3 1.1 The tally Server............................................. 3 1.2 Sending Metrics............................................. 3 2 Configuration 5 2.1 Settings.................................................. 5 2.2 Middleware................................................ 5 3 Tally API 7 3.1 Values.................................................. 7 3.2 Aggregates................................................ 7 3.3 Useful Examples............................................. 8 4 Indices and tables 9 i

ii

tally Documentation, Release 1.0.0 Contents: Contents 1

tally Documentation, Release 1.0.0 2 Contents

CHAPTER 1 Installation pip install tally The tally Server Tally can be easily added to your existing Django site: 1. Add tally to your INSTALLED_APPS 2. Include tally.urls in your URLconf somewhere, for example: url(r'^_tally/', include('tally.urls')) 3. Run manage.py syncdb to create tally s Archive table 4. Create one or more Archives in the Django admin (or via the API, coming soon) 5. Run manage.py tallyserver to start listening for metrics Note: Unless you want your metrics to be public, you should take care to protect the URLs using HTTP basic authentication, or some other method. You may also consider running a separate tally instance inside your network that your production site sends metrics to. Sending Metrics Use the tally.tally method to send a metric for aggregation: tally.tally(data, value=1, timestamp=none, host=none, port=none) Sends a metric to the specified host:port 3

tally Documentation, Release 1.0.0 4 Chapter 1. Installation

CHAPTER 2 Configuration Settings TALLY_DATA_DIR: A directory where tally will store its archive data (will be created if it does not exist) TALLY_HOST: The IP address tally should listen on, and the default address for clients to send metrics to (default: 127.0.0.1) TALLY_PORT: The port tally should use (default: 8900) TALLY_FLUSH_TIME: The time, in seconds, between flushes of received metric data (default: 5) TALLY_INSTALL_ADMIN: Whether the Django admin should be included in tally s URLconf. Typically set to True for standalone installations, and False for embedded application installations. TALLY_PREFIX: If specified, this string will be prepended to every metric the client sends (default: ) Middleware Tally includes a simple middleware class, tally.middleware.pagetimingmiddleware, that sends the amount of time each request takes to the metrics server. The key is generated by stripping leading and trailing slashes, transforming remaining slashes to periods, and prepending requests.[method]. So a POST request for /myapp/some-page/update/ is recorded as requests.post.myapp.some-page.update. 5

tally Documentation, Release 1.0.0 6 Chapter 2. Configuration

CHAPTER 3 Tally API The real power of tally lies in its JSON API. Each API endpoint accepts the following GET parameters: q: a glob pattern (e.g. requests.get.*) for matching metric names since: earliest timestamp to return metrics for until: latest timestamp to return metrics for pretty: indicates the JSON should be pretty-printed (useful for debugging or just playing around) Values These API endpoints return metrics broken down by both metric name and timestamp. /values/<slug>/ Returns a dictionary of metric keys contained in the archived identified by <slug>, each mapping to a dictionary of timestamps with all aggregate values. /values/<slug>/by<time name>/ Breaks down the values by time or name. Note that this indicates the second-level breakdown, so specifying byname will first break down values by time, then by name. /values/<slug>/<aggregate>/ Returns the same breakdown as /values/<slug>/, but only returns the specified aggregate, instead of all aggregates. <aggregate> may be one of: avg, min, max, sum, or count. /values/<slug>/<aggregate>/by<time name>/ Returns the specified aggreagte, broken down by either time or name. Aggregates These API endpoints return metrics broken down only by name or timestamp, then aggregated. So if broken down by name (for instance), instead of returning metrics for every timestamp, the metrics are appropriately aggregated (summing count and sum, averaging avg, etc.) and one value is returned per name. 7

tally Documentation, Release 1.0.0 /aggregate/<slug>/ Returns aggregated metrics for each timestamp. Equivalent to /aggregate/<slug>/ bytime/. /aggregate/<slug>/by<time name>/ Returns aggregated metrics for names or timestamps. /aggregate/<slug>/<aggregate>/ Returns only the specifed aggregate per timestamp. /aggregate/<slug>/<aggregate>/by<time name>/ Returns only the specified aggregate per name or timestamp. Useful Examples Imagine an archive named daily that records page request timings with a 10 second resolution and 24 hour retention, via the PageTimingMiddleware (see Middleware): /aggregate/daily/avg/ This will return all timestamps for the last 24 hours (every 10 seconds), along with the average request time for each 10 second window. 8 Chapter 3. Tally API

CHAPTER 4 Indices and tables genindex modindex search 9

tally Documentation, Release 1.0.0 10 Chapter 4. Indices and tables

Index T tally() (in module tally), 3 11