General
Guides
Development
API
Charts
- Bar Chart
- Bar Chart (Discrete)
- Donut Chart
- Scatter Plot
- Simple Time Series
- Singlegraph
- Singlegraph Grid
- Standard Time Series
Text
- Comparison Jumbotron Singlestat
- Comparison Singlestat
- Comparison Summation Table
- Heading
- Jumbotron Singlestat
- Markdown
- Percentage Table
- Singlestat
- Summation Table
- Timer Stat
- Time-Shifted Jumbotron Singlestat
- Time-Shifted Singlestat
- Time-Shifted Summation Table
Layout
Getting Started
In order to get this project running from source, you will need to have Python 2.7, node.js, and a C compiler installed. node.js is used for building the web assets, but is not used for running the server.
Setting up the Python Environment
Setting up the Javascript Environment
Javascript code is bundled using Grunt. To set up grunt and generate the bundled .js files that the web app loads:
If you’re going to edit the javascript, .css, or .hbs files and wish to automatically regenerate the bundled files as they’re edited, run
Create the database
Tessera is configured by default to run off of a sqlite backing store, which has to be initialized, and can be populated with a bunch of demo dashboards. To initialize the database and generate the demo dashboards:
The importer uses Tessera’s ReST API to do the import, so the server must be running.
Configure
Tessera provides a short but flexible configuration hierarchy:
- Application defaults are stored in
tessera/config.py
- If a file
etc/config.py
exists, relative to the app process’ working directory, it will be loaded next, overriding settings from the above defaults file. - If the environment variable
TESSERA_CONFIG
is set, the file it points to will be loaded last, overriding settings from either of the above two.
The settings you will most likely need to change from the get-go are:
SQLALCHEMY_DATABASE_URI
: A database URI string telling SQLAlchemy where to find your database, e.g.sqlite:///tessera.db
to load a file relative to the Tessera app code,sqlite:////var/data/tessera/app.db
to load a DB from a systemwide/var/data/
hierarchy, orpostgresql://localhost/tessera
to load thetessera
Postgres db from a local default Postgres install.GRAPHITE_URL
: The URL to your Graphite webapp, e.g.http://graphite.example.com/
.SECRET_KEY
: Key used to secure sessions.
Graphite-Web Configuration
Tessera makes requests to graphite-web
directly from the browser, so
it requires configuration of the Access-Control-Allow-Origin
header
on your graphite web server.
For example, in nginx:
add_header Access-Control-Allow-Origin $http_origin;
Run
In development environments, running Tessera is as simple as:
In production we recommend using gunicorn or your WSGI server of choice, e.g.:
Importing Dashboards from Graphite-Web
Importing dashboard definitions from the built-in dashboard system in graphite-web is currently supported, via the command import_graphite_dashboards, which supports four optional arguments query, layout, and columns, and overwrite.
By default, the importer will skip any dashboards that have already
been imported, as determined by the original dashboard URL in
Dashboard.imported_from
. To re-import a dashboard, overwriting the
definition, supply --overwrite
on the command line.
To import everything with default settings, which will create a 4 column fluid layout:
You can import a subset of dashboards with the --query
parameter.
The importer also allows specify the basic layout type (fluid
or
fixed
), and the number of columns.