Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
add Grafana and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
obfuscurity committed Jul 12, 2016
1 parent 72f27b1 commit 4a36b1e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,18 @@ Installing Graphite doesn't have to be difficult. The `install` script in synthe

Synthesize is built to run on Ubuntu 14.04 LTS. It will __not__ run on other Ubuntu releases or Linux distributions. The goal of this project is not to become an automation alternative to modern configuration management utilities (e.g. Chef or Puppet), but rather, to make it as easy as possible for the beginner Graphite user to get started and familiar with the project without having to learn a suite of other automation and/or infrastructure-related projects.

The resulting Graphite server __listens only on https port 443__ and has been configured to collect metrics specifically for helping profile the performance of your Graphite and Carbon services. It uses memcached for improved query performance, and Statsite for a fast, C-based implementation of the StatsD collector/aggregator.
The resulting Graphite web interface __listens only on https port 443__ and has been configured to collect metrics specifically for helping profile the performance of your Graphite and Carbon services. It uses memcached for improved query performance, and Statsite for a fast, C-based implementation of the StatsD collector/aggregator.

Beginning with version 3.0 we've also incorporated the Grafana dashboard project, a modern and full-featured alternative to Graphite's built-in Composer and Dashboard interfaces. It also includes a default dashboard for monitoring Carbon's internal statistics.

:warning: **WARNING:** You should not install Synthesize directly on your personal development system. It's strongly suggested that you use a VM or other temporary VPS instance for sandboxing Synthesize.

## Provides

* Graphite 0.9.15 ([graphite-web](https://github.com/graphite-project/graphite-web), [carbon](https://github.com/graphite-project/carbon), [whisper](https://github.com/graphite-project/whisper))
* Graphite master (0.10.0-alpha or pre-1.0) ([graphite-web](https://github.com/graphite-project/graphite-web), [carbon](https://github.com/graphite-project/carbon), [whisper](https://github.com/graphite-project/whisper))
* StatsD ([statsite](https://github.com/armon/statsite))
* collectd agent
* (Collectd)[http://collectd.org/]
* (Grafana)[https://grafana.org/]

## Dependencies

Expand All @@ -39,9 +42,11 @@ Synthesize configures the following host ports to forward to the private vagrant

```
config.vm.network :forwarded_port, guest: 443, host: 8443
config.vm.network :forwarded_port, guest: 8125, host: 8125
config.vm.network :forwarded_port, guest: 8125, host: 8125, protocol: 'tcp'
config.vm.network :forwarded_port, guest: 8125, host: 8125, protocol: 'udp'
config.vm.network :forwarded_port, guest: 2003, host: 22003
config.vm.network :forwarded_port, guest: 2004, host: 22004
config.vm.network :forwarded_port, guest: 3000, host: 3030
```

```
Expand All @@ -64,9 +69,16 @@ $ cd /opt/graphite/webapp/graphite
$ sudo python manage.py changepassword admin
```

Grafana includes a default user to start:

* username `admin`
* password `admin`

## Upgrade

It's now possible to upgrade an existing Synthesize (e.g. Graphite 0.9.12) to the newest Graphite 0.9.15. You will need to checkout at least version 2.3.0 of Synthesize for this feature. Besides upgrading the Graphite components, it will also migrate the webapp database (`graphite.db`) to the newest fixtures version.
:warning: **WARNING:** The following information is outdated for this experimental branch. If you attempt to run the upgrade script it will display a warning with further instructions to acknowledge the current experimental status and override the warning.

It's now possible to upgrade an existing Synthesize (e.g. Graphite 0.9.15) to the newest Graphite `HEAD`. Besides upgrading the Graphite components, it will also migrate the webapp database (`graphite.db`) to the newest fixtures version.

```
$ cd synthesize
Expand Down
1 change: 1 addition & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 8125, host: 8125, protocol: 'udp'
config.vm.network :forwarded_port, guest: 2003, host: 22003
config.vm.network :forwarded_port, guest: 2004, host: 22004
config.vm.network :forwarded_port, guest: 3000, host: 3030
graphite_version = ENV['GRAPHITE_RELEASE'].nil? ? 'master' : ENV['GRAPHITE_RELEASE']
config.vm.provision "shell", inline: "cd /vagrant; GRAPHITE_RELEASE=#{graphite_version} ./install"
end
14 changes: 14 additions & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,20 @@ cp ${SYNTHESIZE_HOME}/templates/graphite/cron/build-index /etc/cron.hourly/graph
chmod 755 /etc/cron.hourly/graphite-build-index
#sudo -u www-data /opt/graphite/bin/build-index.sh

# Install Grafana
echo 'deb https://packagecloud.io/grafana/stable/debian/ wheezy main' > /etc/apt/sources.list.d/grafana.list
curl https://packagecloud.io/gpg.key | apt-key add -
apt-get update -y
apt-get install -y grafana
service grafana-server start
sleep 5
curl -X POST -H 'Content-Type: application/json' -u 'admin:admin' \
-d '{ "name": "graphite", "type": "graphite", "url": "https://127.0.0.1:443", "access": "proxy", "basicAuth": false }' \
"http://127.0.0.1:3000/api/datasources"
curl -X POST -H 'Content-Type: application/json' -u 'admin:admin' \
-d '{ "inputs": [{"name": "*", "pluginId": "graphite", "type": "datasource", "value": "graphite"}], "overwrite": true, "path": "dashboards/carbon_metrics.json", "pluginId": "graphite" }' \
"http://127.0.0.1:3000/api/dashboards/import"

# Start our processes
update-rc.d carbon-cache defaults
service carbon-cache start
Expand Down

0 comments on commit 4a36b1e

Please sign in to comment.