mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Add basic "Getting started" documentation
This commit is contained in:
parent
dcf915bde7
commit
d6ea16a5c4
30
.gitignore
vendored
30
.gitignore
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
47
guides/getting-started-osx.md
Normal file
47
guides/getting-started-osx.md
Normal file
|
@ -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
|
24
prometheus.conf.example
Normal file
24
prometheus.conf.example
Normal file
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue