diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 98f6b6fe928..57fca7f44cb 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -1,5 +1,10 @@ -Please prefix your title with [Bug] or [Feature request] -For question please check [Support Options](http://grafana.org/support/). **Do not** open a github issue +Read before posting: + +- Questions should be posted to https://community.grafana.com. Please search there and here on GitHub for similar issues before creating a new issue. +- Checkout FAQ: https://community.grafana.com/c/howto/faq +- Checkout How to troubleshoot metric query issues: https://community.grafana.com/t/how-to-troubleshoot-metric-query-issues/50 + +Please prefix your title with [Bug] or [Feature request]. Please include this information: - What Grafana version are you using? @@ -8,11 +13,6 @@ Please include this information: - What did you do? - What was the expected result? - What happened instead? - -**IMPORTANT** -If it relates to *metric data viz*: -- An image or text representation of your metric query -- The raw query and response for the network request (check this in chrome dev tools network tab, here you can see metric requests and other request, please include the request body and request response) - -If it relates to *alerting* -- An image of the test execution data fully expanded. +- If related to metric query / data viz: + - Include raw network request & response: get by opening Chrome Dev Tools (F12, Ctrl+Shift+I on windows, Cmd+Opt+I on Mac), go the network tab. + diff --git a/CHANGELOG.md b/CHANGELOG.md index cd9cb6d797e..82b3ba2037e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,86 @@ -# 4.2.0 (unreleased) +# 4.3.0 (unreleased) ## Enhancements -* **Alerting**: Added Telegram alert notifier [#7098](https://github.com/grafana/grafana/pull/7098), thx [@leonoff](https://github.com/leonoff) + +* **InfluxDB**: influxdb query builder support for ORDER BY and LIMIT (allows TOPN queries) [#6065](https://github.com/grafana/grafana/issues/6065) Support influxdb's SLIMIT Feature [#7232](https://github.com/grafana/grafana/issues/7232) thx [@thuck](https://github.com/thuck) +* **InfluxDB**: Small fix for the "glow" when focus the field for LIMIT and SLIMIT [#7799](https://github.com/grafana/grafana/pull/7799) thx [@thuck](https://github.com/thuck) +* **Panels**: Delay loading & Lazy load panels as they become visible (scrolled into view) [#5216](https://github.com/grafana/grafana/issues/5216) thx [@jifwin](https://github.com/jifwin) +* **Graph**: Support auto grid min/max when using log scale [#3090](https://github.com/grafana/grafana/issues/3090), thx [@bigbenhur](https://github.com/bigbenhur) +* **Elasticsearch**: Support histogram aggregations [#3164](https://github.com/grafana/grafana/issues/3164) + +## Minor Enchancements + +* **Prometheus**: Make Prometheus query field a textarea [#7663](https://github.com/grafana/grafana/issues/7663), thx [@hagen1778](https://github.com/hagen1778) +* **Templating**: Should not be possible to create self-referencing (recursive) template variable definitions [#7614](https://github.com/grafana/grafana/issues/7614) thx [@thuck](https://github.com/thuck) +* **Cloudwatch**: Correctly obtain IAM roles within ECS container tasks [#7892](https://github.com/grafana/grafana/issues/7892) thx [@gomlgs](https://github.com/gomlgs) +* **Units**: New number format: Scientific notation [#7781](https://github.com/grafana/grafana/issues/7781) thx [@cadnce](https://github.com/cadnce) +* **Oauth**: Add common type for oauth authorization errors [#6428](https://github.com/grafana/grafana/issues/6428) thx [@amenzhinsky](https://github.com/amenzhinsky) + +# 4.2.0 (2017-03-22) +## Minor Enhancements +* **Templates**: Prevent use of the prefix `__` for templates in web UI [#7678](https://github.com/grafana/grafana/issues/7678) +* **Threema**: Add emoji to Threema alert notifications [#7676](https://github.com/grafana/grafana/pull/7676) thx [@dbrgn](https://github.com/dbrgn) +* **Panels**: Support dm3 unit [#7695](https://github.com/grafana/grafana/issues/7695) thx [@mitjaziv](https://github.com/mitjaziv) +* **Docs**: Added some details about Sessions in Postgres [#7694](https://github.com/grafana/grafana/pull/7694) thx [@rickard-von-essen](https://github.com/rickard-von-essen) +* **Influxdb**: Allow commas in template variables [#7681](https://github.com/grafana/grafana/issues/7681) thx [@thuck](https://github.com/thuck) +* **Cloudwatch**: stop using deprecated session.New() [#7736](https://github.com/grafana/grafana/issues/7736) thx [@mtanda](https://github.com/mtanda) +* **OpenTSDB**: Pass dropcounter rate option if no max counter and no reset value or reset value as 0 is specified [#7743](https://github.com/grafana/grafana/pull/7743) thx [@r4um](https://github.com/r4um) +* **Templating**: support full resolution for $interval variable [#7696](https://github.com/grafana/grafana/pull/7696) thx [@mtanda](https://github.com/mtanda) +* **Elasticsearch**: Unique Count on string fields in ElasticSearch [#3536](https://github.com/grafana/grafana/issues/3536), thx [@pyro2927](https://github.com/pyro2927) +* **Templating**: Data source template variable that refers to other variable in regex filter [#6365](https://github.com/grafana/grafana/issues/6365) thx [@rlodge](https://github.com/rlodge) +* **Admin**: Global User List: add search and pagination [#7469](https://github.com/grafana/grafana/issues/7469) +* **User Management**: Invite UI is now disabled when login form is disabled [#7875](https://github.com/grafana/grafana/issues/7875) + +## Bugfixes +* **Webhook**: Use proxy settings from environment variables [#7710](https://github.com/grafana/grafana/issues/7710) +* **Panels**: Deleting a dashboard with unsaved changes raises an error message [#7591](https://github.com/grafana/grafana/issues/7591) thx [@thuck](https://github.com/thuck) +* **Influxdb**: Query builder detects regex to easily for measurement [#7276](https://github.com/grafana/grafana/issues/7276) thx [@thuck](https://github.com/thuck) +* **Docs**: router_logging not documented [#7723](https://github.com/grafana/grafana/issues/7723) +* **Alerting**: Spelling mistake [#7739](https://github.com/grafana/grafana/pull/7739) thx [@woutersmit](https://github.com/woutersmit) +* **Alerting**: Graph legend scrolls to top when an alias is toggled/clicked [#7680](https://github.com/grafana/grafana/issues/7680) thx [@p4ddy1](https://github.com/p4ddy1) +* **Panels**: Fixed panel tooltip description after scrolling down [#7708](https://github.com/grafana/grafana/issues/7708) thx [@askomorokhov](https://github.com/askomorokhov) + +# 4.2.0-beta1 (2017-02-27) + +## Enhancements +* **Telegram**: Added Telegram alert notifier [#7098](https://github.com/grafana/grafana/pull/7098), thx [@leonoff](https://github.com/leonoff) * **Templating**: Make $__interval and $__interval_ms global built in variables that can be used in by any datasource (in panel queries), closes [#7190](https://github.com/grafana/grafana/issues/7190), closes [#6582](https://github.com/grafana/grafana/issues/6582) * **S3 Image Store**: External s3 image store (used in alert notifications) now support AWS IAM Roles, closes [#6985](https://github.com/grafana/grafana/issues/6985), [#7058](https://github.com/grafana/grafana/issues/7058) thx [@mtanda](https://github.com/mtanda) -* **Optimzation**: Never issue refresh event when Grafana tab is not visible [#7218](https://github.com/grafana/grafana/issues/7218), thx [@mtanda](https://github.com/mtanda) -* **Browser History**: Browser back/forward now works time ranges / zoom, [#7259](https://github.com/grafana/grafana/issues/7259) * **SingleStat**: Implements diff aggregation method for singlestat [#7234](https://github.com/grafana/grafana/issues/7234), thx [@oliverpool](https://github.com/oliverpool) * **Dataproxy**: Added setting to enable more verbose logging in dataproxy [#7209](https://github.com/grafana/grafana/pull/7209), thx [@Ricky-N](https://github.com/Ricky-N) * **Alerting**: Better information about why an alert triggered [#7035](https://github.com/grafana/grafana/issues/7035) -* **LINE**: Add LINE as alerting notification channel [#7301](https://github.com/grafana/grafana/pull/7301), thx [#huydx](https://github.com/huydx) -* **Elasticsearch**: Support for Min Doc Count options in Terms aggregation [#7324](https://github.com/grafana/grafana/pull/7324), thx [#lpic10](https://github.com/lpic10) -* **Elasticsearch**: Term aggregation limit can now be changed in template queries [#7112](https://github.com/grafana/grafana/issues/7112), thx [#FFalcon](https://github.com/FFalcon) +* **LINE**: Add LINE as alerting notification channel [#7301](https://github.com/grafana/grafana/pull/7301), thx [@huydx](https://github.com/huydx) +* **LINE**: Adds image to notification message [#7417](https://github.com/grafana/grafana/pull/7417), thx [@Erliz](https://github.com/Erliz) +* **Hipchat**: Adds support for sending alert notifications to hipchat [#6451](https://github.com/grafana/grafana/issues/6451), thx [@jregovic](https://github.com/jregovic) +* **Alerting**: Uploading images for alert notifications is now optional [#7419](https://github.com/grafana/grafana/issues/7419) +* **Dashboard**: Adds shortcut for collapsing/expanding all rows [#552](https://github.com/grafana/grafana/issues/552), thx [@mtanda](https://github.com/mtanda) +* **Alerting**: Adds de duping of alert notifications [#7632](https://github.com/grafana/grafana/pull/7632) +* **Orgs**: Sharing dashboards using Grafana share feature will now redirect to correct org. [#1613](https://github.com/grafana/grafana/issues/1613) +* **Pushover**: Add Pushover alert notifications [#7526](https://github.com/grafana/grafana/pull/7526) thx [@devkid](https://github.com/devkid) +* **Threema**: Add Threema Gateway alert notification integration [#7482](https://github.com/grafana/grafana/pull/7482) thx [@dbrgn](https://github.com/dbrgn) + +## Minor Enhancements +* **Optimzation**: Never issue refresh event when Grafana tab is not visible [#7218](https://github.com/grafana/grafana/issues/7218), thx [@mtanda](https://github.com/mtanda) +* **Browser History**: Browser back/forward now works time ranges / zoom, [#7259](https://github.com/grafana/grafana/issues/7259) +* **Elasticsearch**: Support for Min Doc Count options in Terms aggregation [#7324](https://github.com/grafana/grafana/pull/7324), thx [@lpic10](https://github.com/lpic10) +* **Elasticsearch**: Term aggregation limit can now be changed in template queries [#7112](https://github.com/grafana/grafana/issues/7112), thx [@FFalcon](https://github.com/FFalcon) +* **Elasticsearch**: Ad-hoc filters now support all operators [#7612](https://github.com/grafana/grafana/issues/7612), thx [@tamayika](https://github.com/tamayika) +* **Graph**: Add full series name as title for legends. [#7493](https://github.com/grafana/grafana/pull/7493), thx [@kolobaev](https://github.com/kolobaev) +* **Table**: Add a message when queries returns no data. [#6109](https://github.com/grafana/grafana/issues/6109), thx [@xginn8](https://github.com/xginn8) +* **Graph**: Set max width for series names in legend tables. [#2385](https://github.com/grafana/grafana/issues/2385), thx [@kolobaev](https://github.com/kolobaev) +* **Database**: Allow max db connection pool configuration [#7427](https://github.com/grafana/grafana/issues/7427), thx [@huydx](https://github.com/huydx) +* **Datasources** Delete datsource by name [#7476](https://github.com/grafana/grafana/issues/7476), thx [@huydx](https://github.com/huydx) +* **Dataproxy**: Only allow get that begins with api/ to access Prometheus [#7459](https://github.com/grafana/grafana/pull/7459), thx [@mtanda](https://github.com/mtanda) +* **Snapshot**: Make timeout for snapshot creation configurable [#7449](https://github.com/grafana/grafana/pull/7449) thx [@ryu1-sakai](https://github.com/ryu1-sakai) +* **Panels**: Add more physics units [#7554](https://github.com/grafana/grafana/pull/7554) thx [@ryantxu](https://github.com/ryantxu) +* **Email**: Add sender's name on email [#2131](https://github.com/grafana/grafana/issues/2131) thx [@jacobbednarz](https://github.com/jacobbednarz) +* **HTTPS**: Set tls 1.2 as lowest tls version. [#7347](https://github.com/grafana/grafana/pull/7347) thx [@roman-vynar](https://github.com/roman-vynar) +* **Table**: Added suppressing of empty results to table plugin. [#7602](https://github.com/grafana/grafana/pull/7602) thx [@LLIyRiK](https://github.com/LLIyRiK) ## Tech * **Library Upgrade**: Upgraded angularjs from 1.5.8 to 1.6.1 [#7274](https://github.com/grafana/grafana/issues/7274) +* **Backend**: Grafana is now built using golang 1.8 ## Bugfixes * **Alerting**: Fixes missing support for no_data and execution error when testing alerts [#7149](https://github.com/grafana/grafana/issues/7149) @@ -23,11 +88,18 @@ * **Alertlist**: Only show scrollbar when required [#7269](https://github.com/grafana/grafana/issues/7269) * **SMTP**: Set LocalName to hostname [#7223](https://github.com/grafana/grafana/issues/7223) * **Sidemenu**: Disable sign out in sidemenu for AuthProxyEnabled [#7377](https://github.com/grafana/grafana/pull/7377), thx [@solugebefola](https://github.com/solugebefola) +* **Prometheus**: Add support for basic auth in Prometheus tsdb package [#6799](https://github.com/grafana/grafana/issues/6799), thx [@hagen1778](https://github.com/hagen1778) +* **OAuth**: Redirect to original page when logging in with OAuth [#7513](https://github.com/grafana/grafana/issues/7513) +* **Annotations**: Wrap text in annotations tooltip [#7542](https://github.com/grafana/grafana/pull/7542), thx [@xginn8](https://github.com/xginn8) +* **Templating**: Fixes error when using numeric sort on empty strings [#7382](https://github.com/grafana/grafana/issues/7382) +* **Templating**: Fixed issue detecting template variable dependency [#7354](https://github.com/grafana/grafana/issues/7354) -# 4.1.2 (unreleased) +# 4.1.2 (2017-02-13) ### Bugfixes * **Table**: Fixes broken annotation rendering mode in the table panel [#7268](https://github.com/grafana/grafana/issues/7268) +* **Data Sources**: Sorting for lists of data sources in UI is now case insensitive [#7491](https://github.com/grafana/grafana/issues/7491) +* **Admin**: Support more then 1000 users in global users list [#7469](https://github.com/grafana/grafana/issues/7469) # 4.1.1 (2017-01-11) @@ -730,7 +802,7 @@ Grafana 2.x is fundamentally different from 1.x; it now ships with an integrated # 1.8.0 (2014-09-22) -Read this [blog post](http://grafana.org/blog/2014/09/11/grafana-1-8-0-rc1-released.html) for an overview of all improvements. +Read this [blog post](https://grafana.com/blog/2014/09/11/grafana-1.8.0-rc1-released) for an overview of all improvements. **Fixes** - [Issue #802](https://github.com/grafana/grafana/issues/802). Annotations: Fix when using InfluxDB datasource diff --git a/Makefile b/Makefile index dbb345473ec..d003cda6dd4 100644 --- a/Makefile +++ b/Makefile @@ -4,9 +4,9 @@ deps-go: go run build.go setup deps-js: - yarn install --pure-lockfile + yarn install --pure-lockfile --no-progress -deps: deps-go deps-js +deps: deps-js build-go: go run build.go build diff --git a/README.md b/README.md index 14f5669d846..35bfad353fc 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,13 @@ -[Grafana](http://grafana.org) [](https://circleci.com/gh/grafana/grafana) +[Grafana](https://grafana.com) [](https://circleci.com/gh/grafana/grafana) ================ -[Website](http://grafana.org) | +[Website](https://grafana.com) | [Twitter](https://twitter.com/grafana) | -[IRC](https://webchat.freenode.net/?channels=grafana) | -[](http://slack.raintank.io) -[Slack](http://slack.raintank.io) | -[Email](mailto:contact@grafana.org) +[Community & Forum](https://community.grafana.com) Grafana is an open source, feature rich metrics dashboard and graph editor for Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. - + - [Install instructions](http://docs.grafana.org/installation/) - [What's New in Grafana 2.0](http://docs.grafana.org/guides/whats-new-in-v2/) @@ -19,6 +16,7 @@ Graphite, Elasticsearch, OpenTSDB, Prometheus and InfluxDB. - [What's New in Grafana 3.0](http://docs.grafana.org/guides/whats-new-in-v3/) - [What's New in Grafana 4.0](http://docs.grafana.org/guides/whats-new-in-v4/) - [What's New in Grafana 4.1](http://docs.grafana.org/guides/whats-new-in-v4-1/) +- [What's New in Grafana 4.2](http://docs.grafana.org/guides/whats-new-in-v4-2/) ## Features ### Graphite Target Editor @@ -66,7 +64,7 @@ There are no dependencies except an external time series data store. For dashboa database (sqlite3) or you can use an external SQL data base like MySQL or Postgres. ## Installation -Head to [grafana.org](http://docs.grafana.org/installation/) and [download](http://grafana.org/download/) +Head to [grafana.org](http://docs.grafana.org/installation/) and [download](https://grafana.com/get) the latest release. If you have any problems please read the [troubleshooting guide](http://docs.grafana.org/installation/troubleshooting/). @@ -76,11 +74,11 @@ Be sure to read the [getting started guide](http://docs.grafana.org/guides/getti ## Run from master If you want to build a package yourself, or contribute. Here is a guide for how to do that. You can always find -the latest master builds [here](http://grafana.org/builds) +the latest master builds [here](https://grafana.com/grafana/download) ### Dependencies -- Go 1.7.3 +- Go 1.8 - NodeJS v4+ ### Get Code @@ -110,7 +108,7 @@ go run build.go build ### Building frontend assets -To build less to css for the frontend you will need a recent version of **node (v4+)**, +To build less to css for the frontend you will need a recent version of **node (v6+)**, npm (v2.5.0) and grunt (v0.4.5). Run the following: ```bash diff --git a/appveyor.yml b/appveyor.yml index 8b4a16d19cb..303c3abca9e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,13 +7,17 @@ clone_folder: c:\gopath\src\github.com\grafana\grafana environment: nodejs_version: "6" GOPATH: c:\gopath + GOVERSION: 1.8 install: + - rmdir c:\go /s /q # install nodejs and npm - ps: Install-Product node $env:nodejs_version - - npm install -g yarn - - yarn install --pure-lockfile + - npm install -g yarn --silent + - yarn install --pure-lockfile --no-progress - npm install -g grunt-cli + - appveyor DownloadFile https://storage.googleapis.com/golang/go%GOVERSION%.windows-amd64.zip + - 7z x go%GOVERSION%.windows-amd64.zip -y -oC:\ > NUL # install gcc (needed for sqlite3) - choco install -y --limit-output mingw - set PATH=C:\tools\mingw64\bin;%PATH% @@ -21,18 +25,28 @@ install: - echo %GOPATH% - go version - go env - - go run build.go setup + # - go run build.go setup build_script: - go run build.go build - grunt release - - go run build.go sha1-dist + - go run build.go sha-dist - cp dist/* . artifacts: - path: grafana-*windows-*.* name: binzip + type: zip deploy: - provider: Environment - name: GrafanaBuildsS3 + name: GrafanaReleaseMaster + on: + buildType: master + + - provider: Environment + name: GrafanaReleaseRelease + on: + buildType: release + + diff --git a/build.go b/build.go index 78f73816ead..a706842dfec 100644 --- a/build.go +++ b/build.go @@ -5,7 +5,7 @@ package main import ( "bytes" "crypto/md5" - "crypto/sha1" + "crypto/sha256" "encoding/json" "flag" "fmt" @@ -14,6 +14,7 @@ import ( "log" "os" "os/exec" + "path" "path/filepath" "regexp" "runtime" @@ -38,10 +39,11 @@ var ( phjsToRelease string workingDir string includeBuildNumber bool = true + buildNumber int = 0 binaries []string = []string{"grafana-server", "grafana-cli"} ) -const minGoVersion = 1.7 +const minGoVersion = 1.8 func main() { log.SetOutput(os.Stdout) @@ -58,6 +60,7 @@ func main() { flag.StringVar(&phjsToRelease, "phjs", "", "PhantomJS binary") flag.BoolVar(&race, "race", race, "Use race detector") flag.BoolVar(&includeBuildNumber, "includeBuildNumber", includeBuildNumber, "IncludeBuildNumber in package name") + flag.IntVar(&buildNumber, "buildNumber", 0, "Build number from CI system") flag.Parse() readVersionFromPackageJson() @@ -102,8 +105,8 @@ func main() { grunt(gruntBuildArg("release")...) createDebPackages() - case "sha1-dist": - sha1FilesInDist() + case "sha-dist": + shaFilesInDist() case "latest": makeLatestDistCopies() @@ -118,14 +121,24 @@ func main() { } func makeLatestDistCopies() { - rpmIteration := "-1" - if linuxPackageIteration != "" { - rpmIteration = linuxPackageIteration + files, err := ioutil.ReadDir("dist") + if err != nil { + log.Fatalf("failed to create latest copies. Cannot read from /dist") } - runError("cp", fmt.Sprintf("dist/grafana_%v-%v_amd64.deb", linuxPackageVersion, linuxPackageIteration), "dist/grafana_latest_amd64.deb") - runError("cp", fmt.Sprintf("dist/grafana-%v-%v.x86_64.rpm", linuxPackageVersion, rpmIteration), "dist/grafana-latest-1.x86_64.rpm") - runError("cp", fmt.Sprintf("dist/grafana-%v-%v.linux-x64.tar.gz", linuxPackageVersion, linuxPackageIteration), "dist/grafana-latest.linux-x64.tar.gz") + latestMapping := map[string]string{ + ".deb": "dist/grafana_latest_amd64.deb", + ".rpm": "dist/grafana-latest-1.x86_64.rpm", + ".tar.gz": "dist/grafana-latest.linux-x64.tar.gz", + } + + for _, file := range files { + for extension, fullName := range latestMapping { + if strings.HasSuffix(file.Name(), extension) { + runError("cp", path.Join("dist", file.Name()), fullName) + } + } + } } func readVersionFromPackageJson() { @@ -157,7 +170,11 @@ func readVersionFromPackageJson() { // add timestamp to iteration if includeBuildNumber { - linuxPackageIteration = fmt.Sprintf("%d%s", time.Now().Unix(), linuxPackageIteration) + if buildNumber != 0 { + linuxPackageIteration = fmt.Sprintf("%d%s", buildNumber, linuxPackageIteration) + } else { + linuxPackageIteration = fmt.Sprintf("%d%s", time.Now().Unix(), linuxPackageIteration) + } } } @@ -258,9 +275,9 @@ func createPackage(options linuxPackageOptions) { "--description", "Grafana", "-C", packageRoot, "--vendor", "Grafana", - "--url", "http://grafana.org", + "--url", "https://grafana.com", "--license", "\"Apache 2.0\"", - "--maintainer", "contact@grafana.org", + "--maintainer", "contact@grafana.com", "--config-files", options.initdScriptFilePath, "--config-files", options.etcDefaultFilePath, "--config-files", options.systemdServiceFilePath, @@ -270,6 +287,14 @@ func createPackage(options linuxPackageOptions) { "-p", "./dist", } + if options.packageType == "rpm" { + args = append(args, "--rpm-posttrans", "packaging/rpm/control/posttrans") + } + + if options.packageType == "deb" { + args = append(args, "--deb-no-default-config-files") + } + if pkgArch != "" { args = append(args, "-a", pkgArch) } @@ -328,7 +353,7 @@ func gruntBuildArg(task string) []string { if includeBuildNumber { args = append(args, fmt.Sprintf("--pkgVer=%v-%v", linuxPackageVersion, linuxPackageIteration)) } else { - args = append(args, fmt.Sprintf("--pkgVer=%v", linuxPackageVersion)) + args = append(args, fmt.Sprintf("--pkgVer=%v", version)) } if pkgArch != "" { args = append(args, fmt.Sprintf("--arch=%v", pkgArch)) @@ -505,14 +530,14 @@ func md5File(file string) error { return out.Close() } -func sha1FilesInDist() { +func shaFilesInDist() { filepath.Walk("./dist", func(path string, f os.FileInfo, err error) error { if path == "./dist" { return nil } - if strings.Contains(path, ".sha1") == false { - err := sha1File(path) + if strings.Contains(path, ".sha256") == false { + err := shaFile(path) if err != nil { log.Printf("Failed to create sha file. error: %v\n", err) } @@ -521,20 +546,20 @@ func sha1FilesInDist() { }) } -func sha1File(file string) error { +func shaFile(file string) error { fd, err := os.Open(file) if err != nil { return err } defer fd.Close() - h := sha1.New() + h := sha256.New() _, err = io.Copy(h, fd) if err != nil { return err } - out, err := os.Create(file + ".sha1") + out, err := os.Create(file + ".sha256") if err != nil { return err } diff --git a/circle.yml b/circle.yml index daa90305720..b8767b79b8b 100644 --- a/circle.yml +++ b/circle.yml @@ -9,7 +9,7 @@ machine: GOPATH: "/home/ubuntu/.go_workspace" ORG_PATH: "github.com/grafana" REPO_PATH: "${ORG_PATH}/grafana" - GODIST: "go1.7.4.linux-amd64.tar.gz" + GODIST: "go1.8.linux-amd64.tar.gz" post: - mkdir -p ~/download - mkdir -p ~/docker @@ -33,7 +33,7 @@ dependencies: test: override: - - bash scripts/circle-test.sh + - bash scripts/circle-test.sh deployment: gh_branch: @@ -41,15 +41,17 @@ deployment: commands: - ./scripts/build/deploy.sh - ./scripts/build/sign_packages.sh - - go run build.go sha1-dist + - go run build.go sha-dist - aws s3 sync ./dist s3://$BUCKET_NAME/master - #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} + - ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} master + - ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} + - go run ./scripts/build/publish.go -apiKey ${GRAFANA_COM_API_KEY} gh_tag: tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ commands: - ./scripts/build/deploy.sh - ./scripts/build/sign_packages.sh - - go run build.go sha1-dist + - go run build.go sha-dist - aws s3 sync ./dist s3://$BUCKET_NAME/release - #- ./scripts/trigger_grafana_docker_build.sh ${TRIGGER_GRAFANA_DOCKER_CIRCLECI_TOKEN} - + - ./scripts/trigger_windows_build.sh ${APPVEYOR_TOKEN} ${CIRCLE_SHA1} release + - ./scripts/trigger_docker_build.sh ${TRIGGER_GRAFANA_PACKER_CIRCLECI_TOKEN} ${CIRCLE_TAG} diff --git a/conf/defaults.ini b/conf/defaults.ini index 358847724ab..5c12937f4f8 100644 --- a/conf/defaults.ini +++ b/conf/defaults.ini @@ -73,6 +73,10 @@ password = # Example: mysql://user:secret@host:port/database url = +# Max conn setting default is 0 (mean not set) +max_idle_conn = +max_open_conn = + # For "postgres", use either "disable", "require" or "verify-full" # For "mysql", use either "true", "false", or "skip-verify". ssl_mode = disable @@ -127,11 +131,11 @@ logging = false # Change this option to false to disable reporting. reporting_enabled = true -# Set to false to disable all checks to https://grafana.net +# Set to false to disable all checks to https://grafana.com # for new vesions (grafana itself and plugins), check is used # in some UI views to notify that grafana or plugin update exists # This option does not cause any auto updates, nor send any information -# only a GET request to http://grafana.net to get latest versions +# only a GET request to https://grafana.com to get latest versions check_for_updates = true # Google Analytics universal tracking code, only enabled if you specify an id here @@ -201,6 +205,9 @@ default_theme = dark # Set to true to disable (hide) the login form, useful if you use OAuth disable_login_form = false +# Set to true to disable the signout link in the side menu. useful if you use auth.proxy +disable_signout_menu = false + #################################### Anonymous Auth ###################### [auth.anonymous] # enable anonymous access @@ -238,7 +245,7 @@ api_url = https://www.googleapis.com/oauth2/v1/userinfo allowed_domains = hosted_domain = -#################################### Grafana.net Auth #################### +#################################### Grafana.com Auth #################### [auth.grafananet] enabled = false allow_sign_up = true @@ -291,6 +298,7 @@ cert_file = key_file = skip_verify = false from_address = admin@grafana.localhost +from_name = Grafana [emails] welcome_email_on_sign_up = false @@ -420,7 +428,7 @@ address = prefix = prod.grafana.%(instance_name)s. [grafana_net] -url = https://grafana.net +url = https://grafana.com #################################### External Image Storage ############## [external_image_storage] diff --git a/conf/sample.ini b/conf/sample.ini index ce9344e1d4f..87505221790 100644 --- a/conf/sample.ini +++ b/conf/sample.ini @@ -82,6 +82,11 @@ # For "sqlite3" only, path relative to data_path setting ;path = grafana.db +# Max conn setting default is 0 (mean not set) +;max_idle_conn = +;max_open_conn = + + #################################### Session #################################### [session] # Either "memory", "file", "redis", "mysql", "postgres", default is "file" @@ -123,7 +128,7 @@ # for new vesions (grafana itself and plugins), check is used # in some UI views to notify that grafana or plugin update exists # This option does not cause any auto updates, nor send any information -# only a GET request to http://grafana.net to get latest versions +# only a GET request to http://grafana.com to get latest versions ;check_for_updates = true # Google Analytics universal tracking code, only enabled if you specify an id here @@ -187,6 +192,9 @@ # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false ;disable_login_form = false +# Set to true to disable the signout link in the side menu. useful if you use auth.proxy, defaults to false +;disable_signout_menu = false + #################################### Anonymous Auth ########################## [auth.anonymous] # enable anonymous access @@ -237,7 +245,7 @@ ;team_ids = ;allowed_organizations = -#################################### Grafana.net Auth #################### +#################################### Grafana.com Auth #################### [auth.grafananet] ;enabled = false ;allow_sign_up = true @@ -276,6 +284,7 @@ ;key_file = ;skip_verify = false ;from_address = admin@grafana.localhost +;from_name = Grafana [emails] ;welcome_email_on_sign_up = false @@ -372,10 +381,10 @@ ;address = ;prefix = prod.grafana.%(instance_name)s. -#################################### Internal Grafana Metrics ########################## -# Url used to to import dashboards directly from Grafana.net +#################################### Grafana.com integration ########################## +# Url used to to import dashboards directly from Grafana.com [grafana_net] -;url = https://grafana.net +;url = https://grafana.com #################################### External image storage ########################## [external_image_storage] diff --git a/docker/blocks/prometheus/fig b/docker/blocks/prometheus/fig index ec4dd8e4b16..1c70c14fc37 100644 --- a/docker/blocks/prometheus/fig +++ b/docker/blocks/prometheus/fig @@ -3,8 +3,6 @@ prometheus: net: host ports: - "9090:9090" - volumes: - - /var/docker/prometheus:/prometheus-data node_exporter: image: prom/node-exporter diff --git a/docs/Dockerfile b/docs/Dockerfile index 7652cbd3e3f..7679f2b7e4b 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -3,10 +3,11 @@ FROM grafana/docs-base:latest # to get the git info for this repo # COPY config.toml /site -RUN rm -rf /site/content/* +# RUN rm -rf /site/content/* -COPY ./sources /site/content/ +# COPY ./sources /site/content/docs/ +COPY config.toml /site COPY awsconfig /site VOLUME ["/site/content"] diff --git a/docs/Makefile b/docs/Makefile index 718c4b52be7..e5c555f8019 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,50 +1,33 @@ .PHONY: all default docs docs-build docs-shell shell test -# to allow `make DOCSDIR=1 docs-shell` (to create a bind mount in docs) -DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR):/docs/content/grafana/) # to allow `make DOCSPORT=9000 docs` DOCSPORT := 3004 -# Get the IP ADDRESS -DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''") -HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)") -HUGO_BIND_IP=0.0.0.0 - -GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) -GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") DOCKER_DOCS_IMAGE := grafana/grafana-docs -DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE SOURCES_HOST_DIR := "$(shell pwd)/sources" -# for some docs workarounds (see below in "docs-build" target) -GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null) +DOCS_MOUNT := -v $(SOURCES_HOST_DIR):/site/content + +DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e NOCACHE -p 3004:3004 -p 3005:3005 + default: docs docs: docs-build - $(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt && grunt connect --port=3004" - -docs-watch: docs-build - $(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -v $(SOURCES_HOST_DIR):/site/content -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs" - -docs-watch-mac: docs-build - $(DOCKER_RUN_DOCS) -p 3004:3004 -p 3005:3005 -v $(SOURCES_HOST_DIR):/site/content -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs-mac && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs-mac" - -publish: docs-build - $(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh staging-docs v3.1" - -publish-prod: docs-build - $(DOCKER_RUN_DOCS) "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh prod-docs root" - -docs-draft: docs-build - $(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP) - -docs-shell: docs-build - $(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash + $(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004" test: docs-build - $(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" + $(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "ls -la /site/content" + +docs-watch: docs-build + $(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && grunt connect --port=3004 & grunt watch --port=3004 --env=dev-docs" + +publish: docs-build + $(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh staging-docs root" + +publish-prod: docs-build + $(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh prod-docs root" docs-build: - docker build -t "$(DOCKER_DOCS_IMAGE)" . + docker build -t "$(DOCKER_DOCS_IMAGE)" --no-cache . diff --git a/docs/README.md b/docs/README.md index 65bd5714615..ea3f8394ace 100644 --- a/docs/README.md +++ b/docs/README.md @@ -6,14 +6,13 @@ and the [mkdocs](http://www.mkdocs.org/) tool. **Prepare the Docker Image**: -Build the `grafana/docs-base:latest` image. Run these commands in the -same directory this file is in. **Note** that you may require ``sudo`` +Git clone `grafana/grafana.org` repo. Run these commands in the root of that repo. **Note** that you may require ``sudo`` when running ``make docs-build`` depending on how your system's docker service is configured): ``` -$ git clone https://github.com/grafana/docs-base -$ cd docs-base +$ git clone https://github.com/grafana/grafana.org +$ cd grafana.org $ make docs-build ``` @@ -31,31 +30,6 @@ This command will not return control of the shell to the user. Instead the command is now running a new docker container built from the image we created in the previous step. -Open [localhost:8180](http://localhost:8180) to view the docs. - -**Note** that after running ``make docs`` you may notice a message -like this in the console output - -> Running at: http://0.0.0.0:8000/ - -This is misleading. That is **not** the port the documentation is -served from. You must browse to port **8180** to view the new -documentation. +Open [localhost:3004](http://localhost:3004) to view the docs. -# Adding a New Page - -Adding a new page requires updating the ``mkdocs.yml`` file which is -located in this directory. - -For example, if you are adding documentation for a new HTTP API called -``preferences`` you would: - -1. Create the file ``docs/sources/http_api/preferences.md`` -1. Add a reference to it in ``docs/sources/http_api/overview.md`` -1. Update the list under the **pages** key in the ``docs/mkdocs.yml`` file with a reference to your new page: - - -```yaml -- ['http_api/preferences.md', 'API', 'Preferences API'] -``` diff --git a/docs/config.toml b/docs/config.toml index c8d093a81d7..8ace86392ea 100644 --- a/docs/config.toml +++ b/docs/config.toml @@ -1,70 +1,20 @@ + baseurl = "http://localhost:3002/" languageCode = "en-us" -title = "Grafana Docs" -canonifyurls = false +title = "Grafana Documentation" +canonifyurls = true relativeURLs = false verbose = true enableRobotsTXT = true disableSitemap = false -disableRSS = true - -[[menu.top]] - name = "Docs" - url = "" - weight = 1 - -[[menu.top]] - name = "Community" - url = "/community" - weight = 2 - -[[menu.top]] - name = "Support" - url = "/support" - weight = 3 - -[[menu.top]] - name = "Plugins" - url = "https://grafana.net/plugins" - weight = 4 - -[[menu.top]] - name = "Dashboards" - url = "https://grafana.net/dashboards" - weight = 5 - -[[menu.top]] - name = "Hosting" - url = "/hosting" - weight = 6 - -[[menu.top]] - name = "Github" - url = "https://github.com/grafana/grafana" - weight = 7 - -## Main -[[menu.main]] - name = "Feature Gallery" - url = "/features" - weight = 1 - -[[menu.main]] - name = "Live Demo" - url = "http://play.grafana.org" - weight = 2 - -[[menu.main]] - name = "Download" - url = "/download" - weight = 3 - -[[menu.main]] - name = "Blog" - url = "/blog" - weight = 4 - - +disableRSS = false +preservetaxonomynames = true +metaDataFormat = "yaml" +[taxonomies] +tag = "tags" +category = "categories" +[permalinks] + blog = ":year/:month/:day/:title/" diff --git a/docs/sources/administration/cli.md b/docs/sources/administration/cli.md index 99446fb5f1b..8c7755506e8 100644 --- a/docs/sources/administration/cli.md +++ b/docs/sources/administration/cli.md @@ -10,11 +10,13 @@ weight = 8 # Grafana CLI -Grafana cli is a small executable that is bundled with grafana server and is suppose to be executed on the same machine as grafana runs. +Grafana cli is a small executable that is bundled with grafana server and is suppose to be executed on the same machine as grafana runs. ## Plugins -The CLI helps you install, upgrade and manage your plugins on the same machine it CLI is running. You can find more information about how to install and manage your plugins at the [plugin page] ({{< relref "/installation.md" >}}) +The CLI helps you install, upgrade and manage your plugins on the same machine it CLI is running. +You can find more information about how to install and manage your plugins at the +[plugin page]({{< relref "plugins/installation.md" >}}). ## Admin diff --git a/docs/sources/alerting/metrics.md b/docs/sources/alerting/metrics.md index b0bf5c9f4fc..02fee6a718a 100644 --- a/docs/sources/alerting/metrics.md +++ b/docs/sources/alerting/metrics.md @@ -13,7 +13,7 @@ weight = 2 > Alerting is only available in Grafana v4.0 and above. -The alert engine publish some internal metrics about itself. You can read more about how Grafana published [interal metrics](/installation/configuration/#metrics) +The alert engine publishes some internal metrics about itself. You can read more about how Grafana published [internal metrics](/installation/configuration/#metrics). Description | Type | Metric name ---------- | ----------- | ---------- diff --git a/docs/sources/alerting/notifications.md b/docs/sources/alerting/notifications.md index 9f8d3c36120..d0dd19cbcdc 100644 --- a/docs/sources/alerting/notifications.md +++ b/docs/sources/alerting/notifications.md @@ -101,4 +101,9 @@ config file. This is an optional requirement, you can get slack and email notifications without setting this up. +# Configure the link back to Grafana from alert notifications + +All alert notifications contains a link back to the triggered alert in the Grafana instance. +This url is based on the [domain](/installation/configuration/#domain) setting in Grafana. + diff --git a/docs/sources/alerting/rules.md b/docs/sources/alerting/rules.md index af3cfecfdb8..a2688de3100 100644 --- a/docs/sources/alerting/rules.md +++ b/docs/sources/alerting/rules.md @@ -33,7 +33,7 @@ of core Grafana. Only some data soures are supported right now. They include `Gr ### Clustering We have not implemented clustering yet. So if you run multiple instances of grafana-server -you have to make sure [execute_alerts]({{< relref "/installation/configuration.md#alerting" >}}) +you have to make sure [execute_alerts]({{< relref "installation/configuration.md#alerting" >}}) is true on only one instance or otherwise you will get duplicated notifications.
diff --git a/docs/sources/contribute/cla.md b/docs/sources/contribute/cla.md new file mode 100644 index 00000000000..b990187d809 --- /dev/null +++ b/docs/sources/contribute/cla.md @@ -0,0 +1,104 @@ ++++ +title = "Contributor Licence Agreement (CLA)" +description = "Contributer Licence Agreement (CLA)" +type = "docs" +aliases = ["/project/cla", "docs/contributing/cla.html"] +[menu.docs] +parent = "contribute" +weight = 1 ++++ + +# Grafana Labs Contributor License Agreement + +Thank you for your interest in contributing to Grafana Labs ("We" or "Us"). + +This contributor agreement ("Agreement") documents the rights granted by contributors to Us. +To make this document effective, please sign it following the instructions at +[cla-assistant](https://cla-assistant.io/grafana/grafana). This is a legally binding document, +so please read it carefully before agreeing to it. The Agreement may cover more than +one software project managed by Us. + +## 1. Definitions + +"You" (Individual) means the individual who Submits a Contribution to Us. + +"You" (Entity) means any Legal Entity on behalf of whom a Contribution has been received by Us. "Legal Entity" means an entity which is not a natural person. "Affiliates" means other Legal Entities that control, are controlled by, or under common control with that Legal Entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such Legal Entity, whether by contract or otherwise, (ii) ownership of fifty percent (50%) or more of the outstanding shares or securities which vote to elect the management or other persons who direct such Legal Entity or (iii) beneficial ownership of such entity. + +"Contribution" means any work of authorship that is Submitted by You to Us in which You own or assert ownership of the Copyright. If You do not own the Copyright in the entire work of authorship, you must notify us at contact@grafana.com before Submitting such a Contribution. + +"Copyright" means all rights protecting works of authorship owned or controlled by You [or Your Affiliates], including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You. + +"Material" means the work of authorship which is made available by Us to third parties. When this Agreement covers more than one software project, the Material means the work of authorship to which the Contribution was Submitted. After You Submit the Contribution, it may be included in the Material. + +"Submit" means any form of electronic, verbal, or written communication sent to Us or our representatives, including but not limited to electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, Us for the purpose of discussing and improving the Material, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." + +"Submission Date" means the date on which You Submit a Contribution to Us. + +"Effective Date" means the date You execute this Agreement or the date You first Submit a Contribution to Us, whichever is earlier. + +"Media" means any portion of a Contribution which is not software. + +## 2. Grant of Rights + +### 2.1 Copyright License + +(a) You retain ownership of the Copyright in Your Contribution and have the same rights to use or license the Contribution which You would have had without entering into the Agreement. + +(b) To the maximum extent permitted by the relevant law, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable license under the Copyright covering the Contribution, with the right to sublicense such rights through multiple tiers of sublicensees, to reproduce, modify, display, perform and distribute the Contribution as part of the Material; provided that this license is conditioned upon compliance with Section 2.3. + +### 2.2 Patent License + +For patent claims including, without limitation, method, process, and apparatus claims which You [or Your Affiliates] own, control or have the right to grant, now or in the future, You grant to Us a perpetual, worldwide, non-exclusive, transferable, royalty-free, irrevocable patent license, with the right to sublicense these rights to multiple tiers of sublicensees, to make, have made, use, sell, offer for sale, import and otherwise transfer the Contribution and the Contribution in combination with the Material (and portions of such combination). This license is granted only to the extent that the exercise of the licensed rights infringes such patent claims; and provided that this license is conditioned upon compliance with Section 2.3. + +### 2.3 Outbound License + +As a condition on the grant of rights in Sections 2.1 and 2.2, We agree to license the Contribution only under the terms of the license or licenses which We are using on the Submission Date for the Material or any licenses which are approved by the Open Source Initiative on or after the Effective Date, including both permissive and copyleft licenses, whether or not such licenses are subsequently disapproved (including any right to adopt any future version of a license if permitted). + +In addition, We may use the following licenses for Media in the Contribution: GNU Free Documentation License v1.3, Creative Commons Attribution 3.0, or Creative Commons Attribution No Derivatives 3.0 (including any right to adopt any future version of a license if permitted). + +2.4 Moral Rights. If moral rights apply to the Contribution, to the maximum extent permitted by law, You waive and agree not to assert such moral rights against Us or our successors in interest, or any of our licensees, either direct or indirect. + +2.5 Our Rights. You acknowledge that We are not obligated to use Your Contribution as part of the Material and may decide to include any Contribution We consider appropriate. + +2.6 Reservation of Rights. Any rights not expressly [assigned or] licensed under this section are expressly reserved by You. + +## 3. Agreement + +You confirm that: + +(a) You have the legal authority to enter into this Agreement. + +(b) You [or Your Affiliates] own the Copyright and patent claims covering the Contribution which are required to grant the rights under Section 2. + +\(c)(Individual) The grant of rights under Section 2 does not violate any grant of rights which You have made to third parties, including Your employer. If You are an employee, You have had Your employer approve this Agreement or sign the Entity version of this document. If You are less than eighteen years old, please have Your parents or guardian sign the Agreement. + +\(c)(Entity) The grant of rights under Section 2 does not violate any grant of rights which You or Your Affiliates have made to third parties. + +## 4. Disclaimer + +EXCEPT FOR THE EXPRESS WARRANTIES IN SECTION 3, THE CONTRIBUTION IS PROVIDED "AS IS". MORE PARTICULARLY, ALL EXPRESS OR IMPLIED WARRANTIES INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED BY YOU TO US [AND BY US TO YOU]. TO THE EXTENT THAT ANY SUCH WARRANTIES CANNOT BE DISCLAIMED, SUCH WARRANTY IS LIMITED IN DURATION TO THE MINIMUM PERIOD PERMITTED BY LAW. + +## 5. Consequential Damage Waiver + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT WILL YOU [OR US] BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF ANTICIPATED SAVINGS, LOSS OF DATA, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL AND EXEMPLARY DAMAGES ARISING OUT OF THIS AGREEMENT REGARDLESS OF THE LEGAL OR EQUITABLE THEORY (CONTRACT, TORT OR OTHERWISE) UPON WHICH THE CLAIM IS BASED. + +## 6. Miscellaneous + +6.1 This Agreement will be governed by and construed in accordance with the laws of New York State, United States excluding its conflicts of law provisions. Under certain circumstances, the governing law in this section might be superseded by the United Nations Convention on Contracts for the International Sale of Goods ("UN Convention") and the parties intend to avoid the application of the UN Convention to this Agreement and, thus, exclude the application of the UN Convention in its entirety to this Agreement. + +6.2 This Agreement sets out the entire agreement between You and Us for Your Contributions to Us and overrides all other agreements or understandings. + +6.3 If You or We assign the rights or obligations received through this Agreement to a third party, as a condition of the assignment, that third party must agree in writing to abide by all the rights and obligations in the Agreement. + +6.4 The failure of either party to require performance by the other party of any provision of this Agreement in one situation shall not affect the right of a party to require such performance at any time in the future. A waiver of performance under a provision in one situation shall not be considered a waiver of the performance of the provision in the future or a waiver of the provision in its entirety. + +6.5 If any provision of this Agreement is found void and unenforceable, such provision will be replaced to the extent possible with a provision that comes closest to the meaning of the original provision and which is enforceable. The terms and conditions set forth in this Agreement shall apply notwithstanding any failure of essential purpose of this Agreement or any limited remedy to the maximum extent possible under law. + +### Sign using CLA-Assistant + +[https://cla-assistant.io/grafana/grafana](https://cla-assistant.io/grafana/grafana) + +
The above screenshot shows the new import modal that gives you 3 options for how to import a dashboard.
-One notable new addition here is the ability to import directly from Dashboards shared on [Grafana.net](https://grafana.net).
+One notable new addition here is the ability to import directly from Dashboards shared on [Grafana.com](https://grafana.com).
The next step in the import process:
@@ -37,9 +37,9 @@ shows a CollectD dashboard for Graphite that requires a metric prefix be specifi
## Discover Dashboards
-On [Grafana.net](https://grafana.net) you can now browse & search for dashboards. We have already added a few but
+On [Grafana.com](https://grafana.com) you can now browse & search for dashboards. We have already added a few but
more are being uploaded every day. To import a dashboard just copy the dashboard url and head back to Grafana,
-then Dashboard Search -> Import -> Paste Grafana.net Dashboard URL.
+then Dashboard Search -> Import -> Paste Grafana.com Dashboard URL.
diff --git a/docs/sources/guides/whats-new-in-v3.md b/docs/sources/guides/whats-new-in-v3.md
index fd4d1e40a18..d82a833ec90 100644
--- a/docs/sources/guides/whats-new-in-v3.md
+++ b/docs/sources/guides/whats-new-in-v3.md
@@ -14,7 +14,7 @@ weight = 6
## Commercial Support
-Commercial Support subscriptions for Grafana are now [generally available](https://grafana.net/support/plans/).
+Commercial Support subscriptions for Grafana are now [generally available](https://grafana.com/support/plans/).
Raintank is committed to a 100% open-source strategy for Grafana. We
do not want to go down the “open core” route. If your organization
@@ -41,15 +41,15 @@ two new plugin types:
Dashboards, and Grafana **Pages**. Apps are a great way to provide an
entire experience right within Grafana.
-## Grafana.net
+## Grafana.com
-[Grafana.net](https://grafana.net) offers a central repository where the community can come together to discover, create and
+[Grafana.com](https://grafana.com) offers a central repository where the community can come together to discover, create and
share plugins (data sources, panels, apps) and dashboards.
We are also working on a hosted Graphite-compatible data source that will be optimized for use with Grafana.
-It’ll be easy to combine your existing data source(s) with this OpenSaaS option. Finally, Grafana.net can
+It’ll be easy to combine your existing data source(s) with this OpenSaaS option. Finally, Grafana.com can
also be a hub to manage all your Grafana instances. You’ll be able to monitor their health and availability,
perform dashboard backups, and more.
@@ -57,12 +57,12 @@ We are also working on a hosted Graphite-compatible Data Source that
will be optimized for use with Grafana. It’ll be easy to combine your
existing Data Source(s) with this OpenSaaS option.
-Finally, Grafana.net will also be a hub to manage all your Grafana
+Finally, Grafana.com will also be a hub to manage all your Grafana
instances. You’ll be able to monitor their health and availability,
perform Dashboard backups, and more.
Grafana.net will officially launch along with the stable version of
-Grafana 3.0, but check out the preview
+Grafana 3.0, but go to and check out the preview
and sign up for an account in the meantime.
@@ -189,37 +189,37 @@ variable is interpolated.
data source (or panel) they need to be updated as well.
* InfluxDB 0.8: This data source is no longer included in releases,
-you can still install manually from [Grafana.net](http://grafana.net)
+you can still install manually from [Grafana.com](https://grafana.com)
* KairosDB: This data source has also no longer shipped with Grafana,
-you can install it manually from [Grafana.net](http://grafana.net)
+you can install it manually from [Grafana.com](https://grafana.com)
## Plugin showcase
-Discovering and installing plugins is very quick and easy with Grafana 3.0 and [Grafana.net](https://grafana.net). Here
+Discovering and installing plugins is very quick and easy with Grafana 3.0 and [Grafana.com](https://grafana.com). Here
are a couple that I incurage you try!
-#### [Clock Panel](https://grafana.net/plugins/grafana-clock-panel)
+#### [Clock Panel](https://grafana.com/plugins/grafana-clock-panel)
Support's both current time and count down mode.
-#### [Pie Chart Panel](https://grafana.net/plugins/grafana-piechart-panel)
+#### [Pie Chart Panel](https://grafana.com/plugins/grafana-piechart-panel)
A simple pie chart panel is now available as an external plugin.
-#### [WorldPing App](https://grafana.net/plugins/raintank-worldping-app)
+#### [WorldPing App](https://grafana.com/plugins/raintank-worldping-app)
This is full blown Grafana App that adds new panels, data sources and pages to give
feature rich global performance monitoring directly from your on-prem Grafana.
-#### [Zabbix App](https://grafana.net/plugins/alexanderzobnin-zabbix-app)
+#### [Zabbix App](https://grafana.com/plugins/alexanderzobnin-zabbix-app)
This app contains the already very pouplar Zabbix data source plugin, 2 dashboards and a triggers panel. It is
created and maintained by [Alexander Zobnin](https://github.com/alexanderzobnin/grafana-zabbix).
-Checkout the full list of plugins on [Grafana.net](https://grafana.net/plugins)
+Checkout the full list of plugins on [Grafana.com](https://grafana.com/plugins)
## CHANGELOG
diff --git a/docs/sources/guides/whats-new-in-v4-1.md b/docs/sources/guides/whats-new-in-v4-1.md
index 59e6236af40..bd2b0f1b75f 100644
--- a/docs/sources/guides/whats-new-in-v4-1.md
+++ b/docs/sources/guides/whats-new-in-v4-1.md
@@ -7,7 +7,7 @@ type = "docs"
name = "Version 4.1"
identifier = "v4.1"
parent = "whatsnew"
-weight = -1
+weight = 3
+++
diff --git a/docs/sources/guides/whats-new-in-v4-2.md b/docs/sources/guides/whats-new-in-v4-2.md
new file mode 100644
index 00000000000..44aa3a45dc0
--- /dev/null
+++ b/docs/sources/guides/whats-new-in-v4-2.md
@@ -0,0 +1,88 @@
++++
+title = "What's New in Grafana v4.2"
+description = "Feature & improvement highlights for Grafana v4.2"
+keywords = ["grafana", "new", "documentation", "4.2.0"]
+type = "docs"
+[menu.docs]
+name = "Version 4.2"
+identifier = "v4.2"
+parent = "whatsnew"
+weight = -1
++++
+
+## Whats new in Grafana v4.2
+
+Grafana v4.2 Beta is now [available for download](/download/4_2_0/).
+Just like the last release this one contains lots bug fixes and minor improvements.
+We are very happy to say that 27 of 40 issues was closed by pull requests from the community.
+Big thumbs up!
+
+## Release Highlights
+
+- **Hipchat**: Adds support for sending alert notifications to hipchat [#6451](https://github.com/grafana/grafana/issues/6451), thx [@jregovic](https://github.com/jregovic)
+- **Telegram**: Added Telegram alert notifier [#7098](https://github.com/grafana/grafana/pull/7098), thx [@leonoff](https://github.com/leonoff)
+- **LINE**: Add LINE as alerting notification channel [#7301](https://github.com/grafana/grafana/pull/7301), thx [@huydx](https://github.com/huydx)
+- **Templating**: Make $__interval and $__interval_ms global built in variables that can be used in by any datasource (in panel queries), closes [#7190](https://github.com/grafana/grafana/issues/7190), closes [#6582](https://github.com/grafana/grafana/issues/6582)
+- **Alerting**: Adds deduping of alert notifications [#7632](https://github.com/grafana/grafana/pull/7632)
+- **Alerting**: Better information about why an alert triggered [#7035](https://github.com/grafana/grafana/issues/7035)
+- **Orgs**: Sharing dashboards using Grafana share feature will now redirect to correct org. [#6948](https://github.com/grafana/grafana/issues/6948)
+- [Full changelog](https://github.com/grafana/grafana/blob/master/CHANGELOG.md)
+
+### New alert notification channels
+
+This release adds **five** new alert notifications channels, all of them contributed by the community.
+
+* Hipchat
+* Telegram
+* LINE
+* Pushover
+* Threema
+
+### Templating
+
+We added two new global built in variables in grafana. `$__interval` and `$__interval_ms` are now reserved template names in grafana and can be used by any datasource.
+We might add more global built in variables in the future and if we do we will prefix them with `$__`. So please avoid using that in your template variables.
+
+### Dedupe alert notifications when running multiple servers
+
+In this release we will dedupe alert notificiations when you are running multiple servers.
+This makes it possible to run alerting on multiple servers and only get one notification.
+
+We currently solve this with sql transactions which puts some limitations for how many servers you can use to execute the same rules.
+3-5 servers should not be a problem but as always, it depends on how many alerts you have and how frequently they execute.
+
+Next up for a better HA situation is to add support for workload balancing between Grafana servers.
+
+### Alerting more info
+
+You can now see the reason why an alert triggered in the alert history. Its also easier to detect when an alert is set to `alerting` due to the `no_data` option.
+
+### Improved support for multi-org setup
+
+When loading dashboards we now set an query parameter called orgId. So we can detect from which org an user shared a dashboard.
+This makes it possible for users to share dashboards between orgs without changing org first.
+
+We aim to introduce [dashboard groups](https://github.com/grafana/grafana/issues/1611) sometime in the future which will introduce access control and user groups within one org.
+Making it possible to have users in multiple groups and have detailed access control.
+
+## Upgrade & Breaking changes
+
+If your using https in grafana we now force you to use tls 1.2 and the most secure ciphers.
+We think its better to be secure by default rather then making it configurable.
+If you want to run https with lower versions of tls we suggest you put a reserve proxy in front of grafana.
+
+If you have template variables name `$__interval` or `$__interval_ms` they will no longer work since these keywords
+are reserved as global built in variables. We might add more global built in variables in the future and if we do, we will prefix them with `$__`. So please avoid using that in your template variables.
+
+## Changelog
+
+Checkout the [CHANGELOG.md](https://github.com/grafana/grafana/blob/master/CHANGELOG.md) file for a complete list
+of new features, changes, and bug fixes.
+
+## Download
+
+Head to [v4.2-beta download page](/download/4_2_0/) for download links & instructions.
+
+## Thanks
+
+A big thanks to all the Grafana users who contribute by submitting PRs, bug reports & feedback!
diff --git a/docs/sources/guides/whats-new-in-v4.md b/docs/sources/guides/whats-new-in-v4.md
index cfd454cdc23..68a40ed7a1e 100644
--- a/docs/sources/guides/whats-new-in-v4.md
+++ b/docs/sources/guides/whats-new-in-v4.md
@@ -27,7 +27,7 @@ notifications will be sent out when the rule conditions are met.
This feature has been worked on for over a year with many iterations and rewrites
just to make sure the foundations are really solid. We are really proud to finally release it!
-Since the alerting execution is processed in the backend all data source plugins are not supported.
+Since the alerting execution is processed in the backend not all data source plugins are supported.
Right now Graphite, Prometheus, InfluxDB and OpenTSDB are supported. Elasticsearch is being worked
on but will be not ready for v4 release.
@@ -70,8 +70,8 @@ to add graph comments in the form of annotations directly from within Grafana in
{{< imgbox max-width="30%" img="/img/docs/v4/alert_list_panel.png" caption="Alert List Panel" >}}
-This new panel allows you to show alert rules or a history of alert rule state changes. You can filter based on states your
-interested in. Very useful panel for overview style dashboards.
+This new panel allows you to show alert rules or a history of alert rule state changes. You can filter based on states you are
+interested in. This panel is very useful for overview style dashboards.
@@ -79,8 +79,8 @@ interested in. Very useful panel for overview style dashboards.
{{< imgbox max-width="30%" img="/img/docs/v4/adhoc_filters.gif" caption="Ad-hoc filters variable" >}}
-This is a new and very different type of template variable. It will allow you to create new key/value filters on the fly.
-With autocomplete for both key and values. The filter condition will be automatically applied to all
+This is a new and very different type of template variable. It will allow you to create new key/value filters on the fly
+with autocomplete for both key and values. The filter condition will be automatically applied to all
queries that use that data source. This feature opens up more exploratory dashboards. In the gif animation to the right
you have a dashboard for Elasticsearch log data. It uses one query variable that allow you to quickly change how the data
is grouped, and an interval variable for controlling the granularity of the time buckets. What was missing
@@ -126,15 +126,15 @@ We always try to bring some UX/UI refinements & polish in every release.
{{< imgbox max-width="50%" img="/img/docs/v4/add_panel.gif" caption="Add Panel flow" >}}
-We spent a lot of time improving the dashboard building experience. Trying to make it both
+We spent a lot of time improving the dashboard building experience to make it both
more efficient and easier for beginners. After many good but not great experiments
with a `build mode` we eventually decided to just improve the green row menu and
continue work on a `build mode` for a future release.
The new row menu automatically slides out when you mouse over the edge of the row. You no longer need
-to hover over the small green icon and the click it to expand the row menu.
+to hover over the small green icon and then click it to expand the row menu.
-There is some minor improvements to drag and drop behaviour. Now when dragging a panel from one row
+There are some minor improvements to drag and drop behaviour. Now when dragging a panel from one row
to another you will insert the panel and Grafana will automatically make room for it.
When you drag a panel within a row you will simply reorder the panels.
@@ -150,7 +150,7 @@ We plan to further improve dashboard building in the future with a more rich gri
{{< imgbox max-width="40%" img="/img/docs/v4/shortcuts.png" caption="Shortcuts" >}}
Grafana v4 introduces a number of really powerful keyboard shortcuts. You can now focus a panel
-by hovering over it with your mouse. With a panel focused you can simple hit `e` to toggle panel
+by hovering over it with your mouse. With a panel focused you can simply hit `e` to toggle panel
edit mode, or `v` to toggle fullscreen mode. `p r` removes the panel. `p s` opens share
modal.
@@ -164,10 +164,10 @@ Some nice navigation shortcuts are:
## Upgrade & Breaking changes
-There are no breaking changes. Old dashboards and features should work the same. Grafana-server will automatically upgrade it's db
+There are no breaking changes. Old dashboards and features should work the same. Grafana-server will automatically upgrade its db
schema on restart. It's advisable to do a backup of Grafana's database before updating.
-If your are using plugins make sure to update your plugins as some might not work perfectly v4.
+If you are using plugins make sure to update your plugins as some might not work perfectly v4.
You can update plugins using grafana-cli
diff --git a/docs/sources/http_api/admin.md b/docs/sources/http_api/admin.md
index 8aa00d08618..950ea4c8202 100644
--- a/docs/sources/http_api/admin.md
+++ b/docs/sources/http_api/admin.md
@@ -158,6 +158,7 @@ with Grafana admin permission.
"cert_file":"",
"enabled":"false",
"from_address":"admin@grafana.localhost",
+ "from_name":"Grafana",
"host":"localhost:25",
"key_file":"",
"password":"************",
@@ -292,4 +293,4 @@ Change password for specific user
HTTP/1.1 200
Content-Type: application/json
- {state: "new state", message: "alerts pause/un paused", "alertsAffected": 100}
+ {state: "new state", message: "alerts pause/un paused", "alertsAffected": 100}
diff --git a/docs/sources/http_api/alerting.md b/docs/sources/http_api/alerting.md
index b58a177fecd..cc7ce4c2650 100644
--- a/docs/sources/http_api/alerting.md
+++ b/docs/sources/http_api/alerting.md
@@ -87,7 +87,7 @@ This API can also be used to create, update and delete alert notifications.
{
"alertId": 1,
- "paused: true
+ "paused": true
}
**Example Response**:
diff --git a/docs/sources/http_api/auth.md b/docs/sources/http_api/auth.md
index aaeda1105b1..ef62f271715 100644
--- a/docs/sources/http_api/auth.md
+++ b/docs/sources/http_api/auth.md
@@ -30,7 +30,7 @@ curl example:
Open the sidemenu and click the organization dropdown and select the `API Keys` option.
-
+
You use the token in all requests in the `Authorization` header, like this:
diff --git a/docs/sources/http_api/data_source.md b/docs/sources/http_api/data_source.md
index dd8cbc9aa74..f15411e5eff 100644
--- a/docs/sources/http_api/data_source.md
+++ b/docs/sources/http_api/data_source.md
@@ -195,7 +195,7 @@ parent = "http_api"
{"message":"Datasource updated", "id": 1, "name": "test_datasource"}
-## Delete an existing data source
+## Delete an existing data source by id
`DELETE /api/datasources/:datasourceId`
@@ -213,6 +213,24 @@ parent = "http_api"
{"message":"Data source deleted"}
+## Delete an existing data source by name
+
+`DELETE /api/datasources/name/:datasourceName`
+
+**Example Request**:
+
+ DELETE /api/datasources/name/test_datasource HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+
+ {"message":"Data source deleted"}
+
## Data source proxy calls
`GET /api/datasources/proxy/:datasourceId/*`
diff --git a/docs/sources/http_api/user.md b/docs/sources/http_api/user.md
index 2309b56fa2a..fa20fd3e9b3 100644
--- a/docs/sources/http_api/user.md
+++ b/docs/sources/http_api/user.md
@@ -13,7 +13,7 @@ parent = "http_api"
## Search Users
-`GET /api/users`
+`GET /api/users?perpage=10&page=1`
**Example Request**:
@@ -22,6 +22,8 @@ parent = "http_api"
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+Default value for the `perpage` parameter is `1000` and for the `page` parameter is `1`.
+
**Example Response**:
HTTP/1.1 200
@@ -44,6 +46,45 @@ parent = "http_api"
}
]
+## Search Users with Paging
+
+`GET /api/users/search?perpage=10&page=1&query=mygraf`
+
+**Example Request**:
+
+ GET /api/users/search?perpage=10&page=1&query=mygraf HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+
+Default value for the `perpage` parameter is `1000` and for the `page` parameter is `1`. The `totalCount` field in the response can be used for pagination of the user list E.g. if `totalCount` is equal to 100 users and the `perpage` parameter is set to 10 then there are 10 pages of users. The `query` parameter is optional and it will return results where the query value is contained in one of the `name`, `login` or `email` fields. Query values with spaces need to be url encoded e.g. `query=Jane%20Doe`.
+
+**Example Response**:
+
+ HTTP/1.1 200
+ Content-Type: application/json
+ {
+ "totalCount": 2,
+ "users": [
+ {
+ "id": 1,
+ "name": "Admin",
+ "login": "admin",
+ "email": "admin@mygraf.com",
+ "isAdmin": true
+ },
+ {
+ "id": 2,
+ "name": "User",
+ "login": "user",
+ "email": "user@mygraf.com",
+ "isAdmin": false
+ }
+ ],
+ "page": 1,
+ "perPage": 10
+ }
+
## Get single user by Id
`GET /api/users/:id`
@@ -71,36 +112,35 @@ parent = "http_api"
## Get single user by Username(login) or Email
- `GET /api/users/lookup`
+`GET /api/users/lookup?loginOrEmail=user@mygraf.com`
- **Parameter:** `loginOrEmail`
+**Example Request using the email as option**:
- **Example Request using the email as option**:
+ GET /api/users/lookup?loginOrEmail=user@mygraf.com HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
- GET /api/users/lookup?loginOrEmail=user@mygraf.com HTTP/1.1
- Accept: application/json
- Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+**Example Request using the username as option**:
+
+ GET /api/users/lookup?loginOrEmail=admin HTTP/1.1
+ Accept: application/json
+ Content-Type: application/json
+ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
- **Example Request using the username as option**:
- GET /api/users/lookup?loginOrEmail=admin HTTP/1.1
- Accept: application/json
- Content-Type: application/json
- Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
+**Example Response**:
- **Example Response**:
+ HTTP/1.1 200
+ Content-Type: application/json
- HTTP/1.1 200
- Content-Type: application/json
-
- {
- "email": "user@mygraf.com"
- "name": "admin",
- "login": "admin",
- "theme": "light",
- "orgId": 1,
- "isGrafanaAdmin": true
- }
+ {
+ "email": "user@mygraf.com"
+ "name": "admin",
+ "login": "admin",
+ "theme": "light",
+ "orgId": 1,
+ "isGrafanaAdmin": true
+ }
## User Update
diff --git a/docs/sources/index.md b/docs/sources/index.md
index 0324bf888ad..f22ee82cc5c 100644
--- a/docs/sources/index.md
+++ b/docs/sources/index.md
@@ -1,8 +1,9 @@
+++
-title = "Grafana Documentation Site"
+title = "Docs Home"
description = "Install guide for Grafana"
keywords = ["grafana", "installation", "documentation"]
type = "docs"
+aliases = ["v1.1", "guides/reference/admin"]
[menu.docs]
name = "Welcome to the Docs"
identifier = "root"
@@ -22,7 +23,7 @@ other domains including industrial sensors, home automation, weather, and proces
- [Installing on Windows](installation/windows)
- [Installing on Docker](installation/docker)
- [Installing using Provisioning (Chef, Puppet, Salt, Ansible, etc)](installation/provisioning)
-- [Nightly Builds](http://grafana.org/builds)
+- [Nightly Builds](https://grafana.com/grafana/download)
For other platforms Read the [build from source]({{< relref "project/building_from_source.md" >}})
instructions for more information.
@@ -30,21 +31,21 @@ instructions for more information.
## Configuring Grafana
The back-end web server has a number of configuration options. Go the
-[Configuration](/installation/configuration) page for details on all
+[Configuration]({{< relref "installation/configuration.md" >}}) page for details on all
those options.
## Getting started
-- [Getting Started](guides/getting_started)
-- [Basic Concepts](guides/basic_concepts)
-- [Screencasts](tutorials/screencasts)
+- [Getting Started]({{< relref "guides/getting_started.md" >}})
+- [Basic Concepts]({{< relref "guides/basic_concepts.md" >}})
+- [Screencasts]({{< relref "tutorials/screencasts.md" >}})
## Data sources guides
-- [Graphite](datasources/graphite)
-- [Elasticsearch](datasources/elasticsearch)
-- [InfluxDB](datasources/influxdb)
-- [OpenTSDB](datasources/opentsdb)
+- [Graphite]({{< relref "features/datasources/graphite.md" >}})
+- [Elasticsearch]({{< relref "features/datasources/elasticsearch.md" >}})
+- [InfluxDB]({{< relref "features/datasources/influxdb.md" >}})
+- [OpenTSDB]({{< relref "features/datasources/opentsdb.md" >}})
diff --git a/docs/sources/installation/behind_proxy.md b/docs/sources/installation/behind_proxy.md
index 46b70b5dc85..0caa31bbfb5 100644
--- a/docs/sources/installation/behind_proxy.md
+++ b/docs/sources/installation/behind_proxy.md
@@ -23,16 +23,18 @@ domain = foo.bar
To use sub *path* ex `http://foo.bar/grafana` make sure to include `/grafana` in the end of root_url.
Otherwise Grafana will not behave correctly. See example below.
-# Examples
+## Examples
Here are some example configurations for running Grafana behind a reverse proxy.
-## Grafana configuration (ex http://foo.bar.com)
+### Grafana configuration (ex http://foo.bar.com)
+
```
[server]
domain = foo.bar
```
-## Nginx configuration
+### Nginx configuration
+
```
server {
listen 80;
@@ -45,16 +47,16 @@ server {
}
```
-# Examples with **sub path** (ex http://foo.bar.com/grafana)
+### Examples with **sub path** (ex http://foo.bar.com/grafana)
-## Grafana configuration with sub path
+#### Grafana configuration with sub path
```
[server]
domain = foo.bar
root_url = %(protocol)s://%(domain)s:/grafana
```
-## Nginx configuration with sub path
+#### Nginx configuration with sub path
```
server {
listen 80;
diff --git a/docs/sources/installation/configuration.md b/docs/sources/installation/configuration.md
index e222f8b5f4f..176f843e86b 100644
--- a/docs/sources/installation/configuration.md
+++ b/docs/sources/installation/configuration.md
@@ -55,6 +55,7 @@ Then you can override them using:
-
-## Enabling app plugins
-After installing an app it have to be enabled before it show up as an datasource or panel. You can do that on the app page in the config tab.
-
-### Develop your own App
-
-> Our goal is not to have a very extensive documentation but rather have actual
-> code that people can look at. An example implementation of an app can be found
-> in this [example app repo](https://github.com/grafana/example-app)
-
diff --git a/docs/sources/plugins/developing/apps.md b/docs/sources/plugins/developing/apps.md
new file mode 100644
index 00000000000..a3fc35066f6
--- /dev/null
+++ b/docs/sources/plugins/developing/apps.md
@@ -0,0 +1,63 @@
++++
+title = "Developing App Plugins"
+keywords = ["grafana", "plugins", "documentation"]
+type = "docs"
+[menu.docs]
+name = "Developing App Plugins"
+parent = "developing"
+weight = 6
++++
+
+# Grafana Apps
+
+App plugins are a new kind of grafana plugin that can bundle datasource and panel plugins within one package. It also enable the plugin author to create custom pages within grafana. The custom pages enable the plugin author to include things like documentation, sign up forms or controlling other services using HTTP requests.
+
+Datasource and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
+
+{{< imgbox img="/img/docs/v3/app-in-main-menu.png" caption="App in Main Menu" >}}
+
+## Enabling app plugins
+
+After installing an app, it has to be enabled before it shows up as a datasource or panel. You can do that on the app page in the config tab.
+
+## Developing an App Plugin
+
+An App is a bundle of panels, dashboards and/or data source(s). There is nothing different about developing panels and data sources for an app.
+
+Apps have to be enabled in Grafana and should import any included dashboards when the user enables it. A ConfigCtrl class should be created and the dashboards imported in the postUpdate hook. See example below:
+
+```javascript
+export class ConfigCtrl {
+ /** @ngInject */
+ constructor($scope, $injector, $q) {
+ this.$q = $q;
+ this.enabled = false;
+ this.appEditCtrl.setPostUpdateHook(this.postUpdate.bind(this));
+ }
+
+ postUpdate() {
+ if (!this.appModel.enabled) {
+ return this.$q.resolve();
+ }
+ return this.appEditCtrl.importDashboards().then(() => {
+ this.enabled = true;
+ return {
+ url: "plugins/raintank-kubernetes-app/page/clusters",
+ message: "Kubernetes App enabled!"
+ };
+ });
+ }
+}
+ConfigCtrl.templateUrl = 'components/config/config.html';
+```
+
+If possible a link to a dashboard or custom page should be shown after enabling the app to guide the user to the appropriate place.
+
+{{< imgbox img="/img/docs/app_plugin_after_enable.png" caption="After enabling" >}}
+
+### Develop your own App
+
+> Our goal is not to have a very extensive documentation but rather have actual
+> code that people can look at. An example implementation of an app can be found
+> in this [example app repo](https://github.com/grafana/example-app)
+
diff --git a/docs/sources/plugins/developing/code-styleguide.md b/docs/sources/plugins/developing/code-styleguide.md
new file mode 100644
index 00000000000..44379c4d4e5
--- /dev/null
+++ b/docs/sources/plugins/developing/code-styleguide.md
@@ -0,0 +1,182 @@
++++
+title = "Plugin Code Styleguide"
+type = "docs"
+[menu.docs]
+name = "Plugin Code Styleguide"
+parent = "developing"
+weight = 2
++++
+
+# Grafana Plugin Code Styleguide
+
+This guide has two parts. The first part describes the metadata and the second part is a styleguide for HTML/CSS and JavaScript in Grafana plugins and applies if you are using ES6 in your plugin. If using TypeScript then the [Angular TypeScript styleguide](https://angular.io/styleguide) is recommended.
+
+## Metadata
+
+The plugin metadata consists of a plugin.json file and the README.md file. These two files are used by Grafana and Grafana.com.
+
+### Plugin.json (mandatory)
+
+The plugin.json file is the same concept as the package.json file for an npm package. When Grafana starts it will scan the plugin folders and mount every folder that contains a plugin.json file unless the folder contains a subfolder named `dist`. In that case grafana will mount the `dist` folder instead.
+
+The most important fields are the first three, especially the id. The convention for the plugin id is **[github username/org]-[plugin name]-[datasource|app|panel]** and it has to be unique.
+
+Examples:
+
+```
+raintank-worldping-app
+grafana-simple-json-datasource
+grafana-piechart-panel
+mtanda-histogram-panel
+```
+
+The full file format for plugin.json is described [here]({{< relref "plugin.json.md" >}}).
+
+Minimal plugin.json:
+
+```javascript
+{
+ "type": "panel",
+ "name": "Clock",
+ "id": "yourorg-clock-panel",
+
+ "info": {
+ "description": "Clock panel for grafana",
+ "author": {
+ "name": "Raintank Inc.",
+ "url": "http://raintank.io"
+ },
+ "keywords": ["clock", "panel"],
+ "version": "1.0.0",
+ "updated": "2015-03-24"
+ },
+
+ "dependencies": {
+ "grafanaVersion": "3.x.x",
+ "plugins": [ ]
+ }
+}
+```
+
+### README.md
+
+The README.md file is rendered both on Grafana.net and in the plugins section in Grafana. The only difference from how GitHub renders markdown is that html is not allowed.
+
+## File and Directory Structure Conventions
+
+Here is a typical directory structure for a plugin.
+
+```
+johnnyb-awesome-datasource
+|-- dist
+|-- spec
+| |-- datasource_spec.js
+| |-- query_ctrl_spec.js
+| |-- test-main.js
+|-- src
+| |-- img
+| | |-- logo.svg
+| |-- partials
+| | |-- annotations.editor.html
+| | |-- config.html
+| | |-- query.editor.html
+| |-- datasource.js
+| |-- module.js
+| |-- plugin.json
+| |-- query_ctrl.js
+|-- Gruntfile.js
+|-- LICENSE
+|-- package.json
+|-- README.md
+```
+
+Most JavaScript projects have a build step and most Grafana plugins are built using Babel and ES6. The generated JavaScript should be placed in the `dist` directory and the source code in the `src` directory. We recommend that the plugin.json file be placed in the src directory and then copied over to the dist directory when building. The `README.md` can be placed in the root or in the dist directory.
+
+Directories:
+
+- `src/` contains plugin source files.
+- `src/partials` contains html templates.
+- `src/img` contains plugin logos and other images.
+- `spec/` contains tests (optional).
+- `dist/` contains built content.
+
+## HTML and CSS
+
+For the HTML on editor tabs, we recommend using the inbuilt Grafana styles rather than defining your own. This makes plugins feel like a more natural part of Grafana. If done correctly, the html will also be responsive and adapt to smaller screens. The `gf-form` css classes should be used for labels and inputs.
+
+Below is a minimal example of an editor row with one form group and two fields, a dropdown and a text input:
+
+```html
+
+
As a Grafana Administrator, you have complete access to any Organization or User in that instance of Grafana.
When performing actions as a Grafana admin, the sidebar will change it's appearance as below to indicate you are performing global server administration.
diff --git a/docs/sources/reference/dashboard.md b/docs/sources/reference/dashboard.md
index c1c574ce917..595a10e5081 100644
--- a/docs/sources/reference/dashboard.md
+++ b/docs/sources/reference/dashboard.md
@@ -66,11 +66,11 @@ Each field in the dashboard JSON is explained below with its usage:
| **editable** | whether a dashboard is editable or not |
| **hideControls** | whether row controls on the left in green are hidden or not |
| **graphTooltip** | TODO |
-| **rows** | row metadata, see [rows section](/docs/sources/reference/dashboard.md/#rows) for details |
+| **rows** | row metadata, see [rows section](#rows) for details |
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
-| **timepicker** | timepicker metadata, see [timepicker section](/docs/sources/reference/dashboard.md/#timepicker) for details |
-| **templating** | templating metadata, see [templating section](/docs/sources/reference/dashboard.md/#templating) for details |
-| **annotations** | annotations metadata, see [annotations section](/docs/sources/reference/dashboard.md/#annotations) for details |
+| **timepicker** | timepicker metadata, see [timepicker section](#timepicker) for details |
+| **templating** | templating metadata, see [templating section](#templating) for details |
+| **annotations** | annotations metadata, see [annotations section](#annotations) for details |
| **schemaVersion** | TODO |
| **version** | TODO |
| **links** | TODO |
@@ -79,7 +79,7 @@ Each field in the dashboard JSON is explained below with its usage:
`rows` field consists of an array of JSON object representing each row in a dashboard, such as shown below:
-```
+```json
"rows": [
{
"collapse": false,
@@ -105,14 +105,14 @@ Usage of the fields is explained below:
| **collapse** | whether row is collapsed or not |
| **editable** | whether a row is editable or not |
| **height** | height of the row in pixels |
-| **panels** | panels metadata, see [panels section](/docs/sources/reference/dashboard.md/#panels) for details |
+| **panels** | panels metadata, see [panels section](#panels) for details |
| **title** | title of row |
#### panels
Panels are the building blocks a dashboard. It consists of datasource queries, type of graphs, aliases, etc. Panel JSON consists of an array of JSON objects, each representing a different panel in a row. Most of the fields are common for all panels but some fields depends on the panel type. Following is an example of panel JSON representing a `graph` panel type:
-```
+```json
"panels": [
{
"aliasColors": {},
@@ -276,7 +276,7 @@ Usage of each field is explained below:
Description: TODO
-```
+```json
"timepicker": {
"collapse": false,
"enable": true,
@@ -330,7 +330,7 @@ Usage of the fields is explained below:
`templating` fields contains array of template variables with their saved values along with some other metadata, for example:
-```
+```json
"templating": {
"enable": true,
"list": [
diff --git a/docs/sources/reference/export_import.md b/docs/sources/reference/export_import.md
index bc05795c030..4c2d5faa3d3 100644
--- a/docs/sources/reference/export_import.md
+++ b/docs/sources/reference/export_import.md
@@ -33,7 +33,7 @@ To import a dashboard open dashboard search and then hit the import button.
-From here you can upload a dashboard json file, paste a [Grafana.net](https://grafana.net) dashboard
+From here you can upload a dashboard json file, paste a [Grafana.com](https://grafana.com) dashboard
url or paste dashboard json text directly into the text area.
@@ -41,15 +41,15 @@ url or paste dashboard json text directly into the text area.
In step 2 of the import process Grafana will let you change the name of the dashboard, pick what
data source you want the dashboard to use and specify any metric prefixes (if the dashboard use any).
-## Discover dashboards on Grafana.net
+## Discover dashboards on Grafana.com
-Find dashboards for common server applications at [Grafana.net/dashboards](https://grafana.net/dashboards).
+Find dashboards for common server applications at [Grafana.com/dashboards](https://grafana.com/dashboards).
## Import & Sharing with Grafana 2.x or 3.0
-Dashboards on Grafana.net use a new feature in Grafana 3.1 that allows the import process
+Dashboards on Grafana.com use a new feature in Grafana 3.1 that allows the import process
to update each panel so that they are using a data source of your choosing. If you are running a
Grafana version older than 3.1 then you might need to do some manual steps either
before or after import in order for the dashboard to work properly.
@@ -99,10 +99,10 @@ These are then referenced in the dashboard panels like this:
```
These inputs and their usage in data source properties are automatically added during export in Grafana 3.1.
-If you run an older version of Grafana and want to share a dashboard on Grafana.net you need to manually
+If you run an older version of Grafana and want to share a dashboard on Grafana.com you need to manually
add the inputs and templatize the datasource properties like above.
-If you want to import a dashboard from Grafana.net into an older version of Grafana then you can either import
+If you want to import a dashboard from Grafana.com into an older version of Grafana then you can either import
it as usual and then update the data source option in the metrics tab so that the panel is using the correct
data source. Another alternative is to open the json file in a a text editor and update the data source properties
to value that matches a name of your data source.
diff --git a/docs/sources/reference/index.md b/docs/sources/reference/index.md
new file mode 100644
index 00000000000..aaaabe89b4b
--- /dev/null
+++ b/docs/sources/reference/index.md
@@ -0,0 +1,7 @@
+---
+title: Reference Index
+description: Grafana docs reference
+type: docs
+---
+
+# Documentation
diff --git a/docs/sources/reference/playlist.md b/docs/sources/reference/playlist.md
index 359a5d8f3bd..e2d59bc322d 100644
--- a/docs/sources/reference/playlist.md
+++ b/docs/sources/reference/playlist.md
@@ -16,7 +16,7 @@ Since Grafana automatically scales Dashboards to any resolution they're perfect
## Creating a Playlist
-{{< docs-imagebox img="img/docs/v3/playlist.png" max-width="25rem" >}}
+{{< docs-imagebox img="/img/docs/v3/playlist.png" max-width="25rem" >}}
The Playlist feature can be accessed from Grafana's sidemenu, in the Dashboard submenu.
diff --git a/docs/sources/tutorials/ha_setup.md b/docs/sources/tutorials/ha_setup.md
new file mode 100644
index 00000000000..998b382a43f
--- /dev/null
+++ b/docs/sources/tutorials/ha_setup.md
@@ -0,0 +1,40 @@
++++
+title = "Setup Grafana for High availability"
+type = "docs"
+keywords = ["grafana", "tutorials", "HA", "high availability"]
+[menu.docs]
+parent = "tutorials"
+weight = 10
++++
+
+# How to setup Grafana for high availability
+
+> Alerting does not support high availability yet.
+
+Setting up Grafana for high availability is fairly simple. It comes down to two things:
+
+ * Use a shared database for multiple grafana instances.
+ * Consider how user sessions are stored.
+
+## Configure multiple servers to use the same database
+
+First you need to do is to setup mysql or postgres on another server and configure Grafana to use that database.
+You can find the configuration for doing that in the [[database]]({{< relref "configuration.md" >}}#database) section in the grafana config.
+Grafana will now persist all long term data in the database.
+It also worth considering how to setup the database for high availability but thats outside the scope of this guide.
+
+## User sessions
+
+The second thing to consider is how to deal with user sessions and how to balance the load between servers.
+By default Grafana stores user sessions on disk which works fine if you use `sticky sessions` in your load balancer.
+Grafana also supports storing the session data in the database, redis or memcache which makes it possible to use round robin in your load balancer.
+If you use mysql/postgres for session storage you first need a table to store the session data in. More details about that in [[sessions]]({{< relref "configuration.md" >}}#session)
+
+For Grafana itself it doesn't really matter if you store your sessions on disk or database/redis/memcache.
+But we suggest that you store the session in redis/memcache since it makes it easier to add/remote instances from the group.
+
+## Alerting
+
+Currently alerting does not support high availability. But this is something that we will be working on in the future.
+
+
diff --git a/docs/sources/tutorials/hubot_howto.md b/docs/sources/tutorials/hubot_howto.md
index 17658fbaecd..2c886b94f29 100644
--- a/docs/sources/tutorials/hubot_howto.md
+++ b/docs/sources/tutorials/hubot_howto.md
@@ -22,15 +22,17 @@ take you to the graph.
> is so Hipchat and Slack can show them reliably (they require the image to be publicly available).
+
+
+
You need to set the environment variable `HUBOT_GRAFANA_API_KEY` to a Grafana API Key.
You can add these from the API Keys page which you find in the Organization dropdown.
### Amazon S3
+
The `S3` options are optional but for the images to work properly in services like Slack and Hipchat they need
to publicly available. By specifying the `S3` options the hubot-grafana script will publish the rendered
panel to `S3` and it will use that URL when it posts to Slack or Hipchat.
@@ -99,6 +104,7 @@ panel to `S3` and it will use that URL when it posts to Slack or Hipchat.
- Get a templated dashboard with the `$host` parameter set to `carbon-a`
## Aliases
+
Some of the hubot commands above can lengthy and you might have to remember the dashboard slug (url id).
If you have a few favorite graphs you want to be able check up on often (let's say from your mobile) you
can create hubot command aliases with the hubot script `hubot-alias`.
@@ -115,7 +121,7 @@ Now you can add an alias like this:
+
+ Notifications can be configured for any Threema Gateway ID of type + "Basic". End-to-End IDs are not currently supported. +
++ The Threema Gateway ID can be set up at + https://gateway.threema.ch/. +
+| Id | +Name | +Login | +Grafana Admin | ++ | |
|---|---|---|---|---|---|
| {{user.id}} | +{{user.name}} | +{{user.login}} | +{{user.email}} | +{{user.isAdmin}} | ++ + + Edit + + + + + + | +
| Id | -Name | -Login | -Grafana Admin | -- | |
|---|---|---|---|---|---|
| {{user.id}} | -{{user.name}} | -{{user.login}} | -{{user.email}} | -{{user.isAdmin}} | -- - - Edit - - - - - - | -