From dcf915bde70b4361e2a255b4c5f9fd0d5ffd2518 Mon Sep 17 00:00:00 2001 From: Tobias Schmidt Date: Thu, 24 Jan 2013 21:56:08 +0100 Subject: [PATCH 1/2] Add missing prerequisites to the Readme --- README.md | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 81cd56bbf7..22270b889e 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,30 @@ -Prometheus -========== +# Prometheus Bedecke deinen Himmel, Zeus! A new kid is in town. -Prerequisites -============= -1. Go 1.0.X. -2. LevelDB: (https://code.google.com/p/leveldb/). -3. Protocol Buffers Compiler: (http://code.google.com/p/protobuf/). -4. goprotobuf: the code generator and runtime library: (http://code.google.com/p/goprotobuf/). -5. Levigo, a Go-wrapper around LevelDB's C library: (https://github.com/jmhodges/levigo). -Initial Hurdles -=============== -1. A bit of this grew organically without an easy way of binding it all together. The tests will pass but slowly. They were not optimized for speed but end-to-end coverage of the whole storage model. This is something immediate to fix. -2. Protocol Buffer generator for Go changed emitted output API. This will need to be fixed before other contributors can participate. +## Prerequisites + + 1. Go 1.0.X. + 2. LevelDB: (https://code.google.com/p/leveldb/). + 3. Protocol Buffers Compiler: (http://code.google.com/p/protobuf/). + 4. goprotobuf: the code generator and runtime library: (http://code.google.com/p/goprotobuf/). + 5. Levigo, a Go-wrapper around LevelDB's C library: (https://github.com/jmhodges/levigo). + 6. GoRest, a RESTful style web-services framework: (http://code.google.com/p/gorest/). + 7. Prometheus Client, Prometheus in Prometheus (https://github.com/matttproud/golang_instrumentation). -Milestones -========== -1. In-memory archive, basic rule language, simple computation engine, and naive exposition system. +## Initial Hurdles + + 1. A bit of this grew organically without an easy way of binding it all together. The tests will pass but slowly. They were not optimized for speed but end-to-end coverage of the whole storage model. This is something immediate to fix. + 2. Protocol Buffer generator for Go changed emitted output API. This will need to be fixed before other contributors can participate. -License -======= +## Milestones + + 1. In-memory archive, basic rule language, simple computation engine, and naive exposition system. + + +## License + Apache License 2.0 From d6ea16a5c41a30586c45270a4b959964d67b5c04 Mon Sep 17 00:00:00 2001 From: Tobias Schmidt Date: Fri, 25 Jan 2013 00:33:16 +0100 Subject: [PATCH 2/2] Add basic "Getting started" documentation --- .gitignore | 30 +++++++++++----------- README.md | 6 +++++ guides/getting-started-osx.md | 47 +++++++++++++++++++++++++++++++++++ prometheus.conf.example | 24 ++++++++++++++++++ 4 files changed, 93 insertions(+), 14 deletions(-) create mode 100644 guides/getting-started-osx.md create mode 100644 prometheus.conf.example diff --git a/.gitignore b/.gitignore index dd66d1329f..93fe42cb52 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,22 @@ +*# +*.[568ao] +*.a[568o] +*.cgo*.c +*.cgo*.go +*.conf +*.exe +*.orig +*.pyc +*.rej +*.rules +*.so +*~ +.*.swp +._* .DS_Store .git .gitignore -*.[568ao] -*.a[568o] -*.so -*.pyc -._* .nfs.* [568a].out -*~ -*.orig -*.rej -*.exe -.*.swp -core -*.cgo*.go -*.cgo*.c _cgo_* -*# +core diff --git a/README.md b/README.md index 22270b889e..35578d99b9 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,12 @@ Bedecke deinen Himmel, Zeus! A new kid is in town. 6. GoRest, a RESTful style web-services framework: (http://code.google.com/p/gorest/). 7. Prometheus Client, Prometheus in Prometheus (https://github.com/matttproud/golang_instrumentation). +## Getting started + +For basic help how to get started: + + * [Getting started on Mac OSX](guides/getting-started-osx.md) + ## Initial Hurdles diff --git a/guides/getting-started-osx.md b/guides/getting-started-osx.md new file mode 100644 index 0000000000..9ea1292449 --- /dev/null +++ b/guides/getting-started-osx.md @@ -0,0 +1,47 @@ +# Getting started + +## Installation + +### Go + +First, create a `$HOME/mygo` directory and its src subdirectory: + + mkdir -p $HOME/mygo/src # create a place to put source code + +Next, set it as the GOPATH. You should also add the bin subdirectory to your PATH environment variable so that you can run the commands therein without specifying their full path. To do this, add the following lines to `$HOME/.profile` (or equivalent): + + export GOPATH=$HOME/mygo + export PATH=$PATH:$HOME/mygo/bin + +Now you can install Go: + + brew install go + + +### Dependencies + +Install leveldb and protobuf dependencies: + + brew install leveldb protobuf + + +### Libraries + + go get code.google.com/p/goprotobuf/{proto,protoc-gen-go} + go get github.com/jmhodges/levigo + go get code.google.com/p/gorest + go get github.com/matttproud/{prometheus,golang_instrumentation} + + +## Build + + cd ${GOPATH}/src/github.com/matttproud/prometheus + make build + +## Configure + + cp prometheus.conf.example prometheus.conf + +## Run + + ./prometheus diff --git a/prometheus.conf.example b/prometheus.conf.example new file mode 100644 index 0000000000..0ed17b439f --- /dev/null +++ b/prometheus.conf.example @@ -0,0 +1,24 @@ +global { + scrape_interval = "1s" + evaluation_interval = "1s" + labels { + monitor = "test" + } + rule_files = [ + "prometheus.rules" + ] +} + +job { + name = "prometheus" + scrape_interval = "5s" + + targets { + endpoints = [ + "http://localhost:9090/metrics.json" + ] + labels { + group = "canary" + } + } +}