Compare commits

...

1514 Commits

Author SHA1 Message Date
Torkel Ödegaard fff4cfd11e build: added imports of rxjs utility functions
(cherry picked from commit eda3cffe22)
2017-10-17 12:17:32 +02:00
Torkel Ödegaard d20434f828 Merge branch 'v4.6.x' of github.com:grafana/grafana into v4.6.x 2017-10-17 12:15:26 +02:00
bergquist 1ef850fae0 prepare for v4.6.0-beta2 release 2017-10-17 11:17:34 +02:00
Mitsuhiro Tanda 2f7a59fb18 fix template variable expanding
(cherry picked from commit 0f87279ab8)
2017-10-17 11:16:36 +02:00
krise3k 07be20eeb3 annotations: quote reserved fields (#9550)
(cherry picked from commit 45a572ebd8)
2017-10-17 11:04:17 +02:00
Torkel Ödegaard 689b8d79df ux: align alert and btn colors
(cherry picked from commit b86ae3f0e8)
2017-10-17 10:57:34 +02:00
Torkel Ödegaard b70c538633 fix: fixed color pickers that were broken in minified builds, fixes #9549
(cherry picked from commit 574afe8568)
2017-10-17 10:54:49 +02:00
Daniel Lee 769bc5df21 textpanel: fixes #9491
(cherry picked from commit 14241404ff)
2017-10-17 09:15:44 +02:00
Daniel Lee 4eb6d82254 csv: fix import for saveAs shim
After switch from systemjs to webpack, needed to import the
file-saver saveAs shim for it work. Fixes #9525

(cherry picked from commit f3ec139eab)
2017-10-17 09:14:45 +02:00
Daniel Lee 7935739eb3 plugins: expose more util and flot dependencies
Also, fix for coremodules export. Have to add the __esModule
attribute to fool SystemJS.

(cherry picked from commit eb4e71e2c6)
2017-10-17 09:13:58 +02:00
bergquist 7403fa0fa7 alert_tab: clear test result when testing rules
closes #9539

(cherry picked from commit 9de4d0fa6b)
2017-10-16 10:34:59 +02:00
Mitsuhiro Tanda 5ebfd1e5ab (cloudwatch) fix cloudwatch query error over 24h (#9536)
fix cloudwatch query error over 24h

(cherry picked from commit 7edc95cc35)

closes #9523
2017-10-16 08:32:13 +02:00
Mitsuhiro Tanda a1a8c0fc07 show error message when cloudwatch datasource can't add
(cherry picked from commit 40b11654fd)
2017-10-16 08:10:24 +02:00
bergquist 7069fed31d update packagecloud script for 4.6.0-beta1 2017-10-13 13:11:18 +02:00
bergquist 9d916fdad6 changelog: adds note about closing #9516 2017-10-13 10:29:11 +02:00
bergquist ec14fa58b5 alerting: add count_non_null reducer
makes it possible to have a second condition requering
at least X points of data.
2017-10-13 09:47:10 +02:00
Carl Bergquist 8e4a7060ca Merge pull request #9515 from imweijh/patch-1
Update rpm.md
2017-10-13 08:54:19 +02:00
weijh d0ace0bc13 Update rpm.md
for error "The GPG keys listed for the "grafana" repository are already installed but they are not correct for this package."
2017-10-13 12:00:22 +08:00
Torkel Ödegaard 2992fb4b0e fix: can now remove annotation tags without popover closing 2017-10-12 16:24:32 +02:00
Alexander Zobnin 3b14bee559 tech: add backward compatibility for <spectrum-picker> directive (#9510) 2017-10-12 15:31:59 +02:00
Torkel Ödegaard e7b718ed7a fix: fixed links on new 404 page, fixes #9493 2017-10-12 15:31:41 +02:00
bergquist b5727949fd logging: dont use cli logger in http_server 2017-10-12 15:29:01 +02:00
bergquist 88f55b01d8 oauth: raise error if session state is missing
ref #9476
2017-10-12 15:25:27 +02:00
bergquist 0848ba2e9c oauth: provide more logging for failed oauth requests 2017-10-12 15:25:27 +02:00
bergquist 23c610015f prepare for 4.6.0-beta1 release 2017-10-12 15:25:27 +02:00
Torkel Ödegaard 2564dda2d0 docs: updated whats new article 2017-10-12 14:53:29 +02:00
Patrick O'Carroll 1334a9e138 docs: initial draft release v46 2017-10-12 13:55:27 +02:00
Daniel Lee 4bdc3a5829 graph: fix y-axis decimalTick check. Fixes #9405 2017-10-12 12:45:20 +02:00
Torkel Ödegaard a7068d835a Merge branch 'master' of github.com:grafana/grafana 2017-10-12 12:40:43 +02:00
Torkel Ödegaard c879cc7615 minor docs update 2017-10-12 12:40:37 +02:00
Torkel Ödegaard a90052dac3 docs: annotation docs update 2017-10-12 12:19:25 +02:00
bergquist 7548734510 changelog: adds note about closing #7104 2017-10-12 12:13:00 +02:00
bergquist a45bd400f1 changelog: adds note about closing #9373 2017-10-12 12:11:51 +02:00
Carl Bergquist b63725033e Merge pull request #9450 from utkarshcmu/kafka_alert
Kafka alerting
2017-10-12 12:11:13 +02:00
Carl Bergquist ee5f69beb4 metrics: disable gzip for /metrics endpoint (#9468)
Prometheus client lib support gzip by itself. Which caused the
response to be double gzipped sometimes. We should use the Grafana
middle ware instead.

closes #9464
2017-10-12 12:02:36 +02:00
Patrick O'Carroll 5895f9dc89 Annotation docs (#9506)
* added images to annotation docs

* added gifs and png to annotations, minor code formatting fix in alertlist
2017-10-12 11:37:42 +02:00
Torkel Ödegaard 98f00f7e1f Update CHANGELOG.md 2017-10-12 11:35:47 +02:00
Daniel Lee 55d510a319 Update PLUGIN_DEV.md 2017-10-12 11:32:33 +02:00
Daniel Lee b38016e97f Update PLUGIN_DEV.md 2017-10-12 11:31:04 +02:00
Torkel Ödegaard 64d75db514 Update README.md 2017-10-12 11:30:01 +02:00
Carl Bergquist 9d53653647 Merge pull request #9378 from mattbostock/verify_tls
Bugfix: Always verify TLS unless explicitly told otherwise
2017-10-12 11:11:02 +02:00
Patrick O'Carroll 45704d4570 Fixed link issue in CHANGELOG 2017-10-12 10:56:24 +02:00
Torkel Ödegaard b81e01d1ec Create PLUGIN_DEV.md
initial draft of plugin dev document
2017-10-12 10:53:42 +02:00
bergquist 1f4df2b694 changelog: adds note about closing #9371,#5334,#8812 2017-10-12 10:44:40 +02:00
bergquist 4ca3cc90dd Merge branch 'mattbostock-verify_datasource_tls' 2017-10-12 10:39:07 +02:00
bergquist 79afd638bb ds_edit: placeholder should only be cert header 2017-10-12 10:38:45 +02:00
Patrick O'Carroll b76de790f9 fixed minor styling issus (#9497)
* fixed minor styling issus

* fixed code formatting
2017-10-12 10:33:42 +02:00
Torkel Ödegaard 81a4df1372 fix: alert api limit param did not work and caused SQL syntax error, fixes #9492 2017-10-12 10:22:53 +02:00
bergquist c0d257a0ee Merge branch 'verify_datasource_tls' of https://github.com/mattbostock/grafana into mattbostock-verify_datasource_tls 2017-10-12 10:15:32 +02:00
Alexander Zobnin 04ea7efac9 annotations: add endpoint for writing graphite-like events (#9495)
* annotations: add endpoint for writing graphite-like events

* annotations: fix new line handling in tooltip

* annotations: support tags in prior to Graphite 0.10.0 format
2017-10-12 10:12:15 +02:00
Carl Bergquist 19a57f7cb1 Merge pull request #9505 from PaulMest/you-to-your-typo
You to your typo
2017-10-12 08:49:58 +02:00
Paul Mestemaker 2f73208ca8 Update unsaved_changes_modal.ts 2017-10-11 15:57:33 -07:00
Paul Mestemaker e1d61c9678 Merge pull request #1 from grafana/master
Merging upstream
2017-10-11 15:55:05 -07:00
Torkel Ödegaard 2bc57d856c fix: set lastSeenAt date when creating users to then years in past insteasd of empty date, fixes #9260 2017-10-11 11:29:17 +02:00
Torkel Ödegaard 71a839deaf ux: minor ux fix 2017-10-11 11:17:54 +02:00
Matt Bostock 4f3856adfb Retain old name for TLS client auth
I renamed `tlsAuth` to `tlsClientAuth` to better describe the fact that
this variable is used to enable TLS client authentication (as opposed to
server authentication) in c04d95f35.

However, changing the name breaks backwards compatibility for existing
installations using this feature and Grafana does not have a
standardised way of migrating changes in the schema:
https://github.com/grafana/grafana/pull/9377#issuecomment-333063543

For reasons of expediency given the severity of the bug (not verifying
TLS), keep the old name.
2017-10-11 08:18:04 +01:00
Matt Bostock f6aa0e41e5 Return error if datasource TLS CA not parsed 2017-10-11 08:18:03 +01:00
Matt Bostock e23c678df9 Datasource settings: Make HTTP all caps
It's an acronym, so it should be all caps.
2017-10-11 08:18:03 +01:00
Matt Bostock 5d312be419 Datasource HTTP settings: Add TLS skip verify
In c04d95f35 I changed the default for datasource HTTP requests so that
TLS is always verified.

This commit adds a checkbox to allow an admin to explicitly skip TLS
verification, for testing purposes.
2017-10-11 08:18:03 +01:00
Matt Bostock ef52d956bf Make URL capitalisation consistent in UI
URL is an acronym, it should be all caps.
2017-10-11 08:18:03 +01:00
Matt Bostock a286ffa5f2 Alias macron package in app_routes.go
...to make this file compatible with goimports:
https://godoc.org/golang.org/x/tools/cmd/goimports
2017-10-11 08:18:03 +01:00
Matt Bostock 43169e4302 Verify datasource TLS and split client auth and CA 2017-10-11 08:18:03 +01:00
Matt Bostock 4719a8c8dd Tidy spacing in datasource TLS settings 2017-10-11 08:18:03 +01:00
Matt Bostock 592c46c8b5 Tests: Clarify what InsecureSkipVerify does 2017-10-11 08:18:03 +01:00
Daniel Lee 7713009caa postgres: add missing ngInject decorator 2017-10-11 09:15:55 +02:00
Torkel Ödegaard 05fbed4a36 docs: initial docs for new annotation features, #9483 2017-10-10 16:02:56 +02:00
Daniel Lee 679b169291 Adds note for #9209 to changelog 2017-10-10 15:23:22 +02:00
Daniel Lee d1c9760fa8 Postgres Data Source (#9475)
* add postgresql datasource

* add rest of files for postgres datasource

* fix timeseries query, remove unused code

* consistent naming, refactoring

* s/mysql/postgres/

* s/mysql/postgres/

* couple more tests

* tests for more datatypes

* fix macros for postgres

* add __timeSec macro

* add frontend for postgres datasource

* adjust documentation

* fix formatting

* add proper plugin description

* merge editor changes from mysql

* port changes from mysql datasource

* set proper defaultQuery for postgres

* add time_sec to timeseries query
accept int for value for timeseries query

* revert allowing time_sec and handle int or float values as unix
timestamp for "time" column

* fix tslint error

* handle decimal values in timeseries query

* allow setting sslmode for postgres datasource

* use type switch for handling data types

* fix value for timeseries query

* refactor timeseries queries to make them more flexible

* remove debug statement from inner loop in type conversion

* use plain for loop in getTypedRowData

* fix timeseries queries

* adjust postgres datasource to tsdb refactoring

* adjust postgres datasource to frontend changes

* update lib/pq to latest version

* move type conversion to getTypedRowData

* handle address types cidr, inet and macaddr

* adjust response parser and docs for annotations

* convert unknown types to string

* add documentation for postgres datasource

* add another example query with metric column

* set more helpful default query

* update help text in query editor

* handle NULL in value column of timeseries query

* add __timeGroup macro

* add test for __timeGroup macro

* document __timeGroup and set proper default query for annotations

* fix typos in docs

* add postgres to list of datasources

* add postgres to builtInPlugins

* mysql: refactoring as prep for merging postgres

Refactors out the initialization of the xorm engine and the query logic
for an sql data source.

* mysql: rename refactoring + test update

* postgres:refactor to use SqlEngine(same as mysql)

Refactored to use a common base class with the MySql data source.

Other changes from the original PR:
- Changed time column to be time_sec to allow other time units in the
future and to be the same as MySQL
- Changed integration test to test the main Query method rather than
the private transformToTable method
- Changed the __timeSec macro name to __timeEpoch
- Renamed PostgresExecutor to PostgresQueryEndpoint

Fixes #9209 (the original PR)

* postgres: encrypt password on config page

With some other cosmetic changes to the config page:
- placeholder texts
- reset button for the password after it has been encrypted.
- default value for the sslmode field.

* postgres: change back col name to time from time_sec

* postgres mysql: remove annotation title

Title has been removed from annotations

* postgres: fix images for docs page

* postgres mysql: fix specs
2017-10-10 15:19:14 +02:00
Torkel Ödegaard 630e6f5da6 tech: expose more to plugins, closes #9456 2017-10-10 15:07:09 +02:00
Alexander Zobnin 3184942aeb Fix NaN handling (#9469)
* graph: fix NaN formatting, #9012

* singlestat: prevent null value coloring, #9012, #8404

* timeseries: add tests for #9012 and move test file to TS
2017-10-10 14:25:57 +02:00
Alexander Zobnin 473c47cd1c snapshots: improve snapshot listing performance, #9314 (#9477)
exclude dashboard field from snapshot list search
2017-10-10 14:25:19 +02:00
Daniel Lee 002b4d3403 mysql: fix interpolation for numbers in temp vars 2017-10-10 11:59:44 +02:00
utkarshcmu 8aff343ce3 Added docs for Kafka alerting 2017-10-10 02:11:02 -07:00
utkarshcmu da47dc8947 Fixed failing go tests 2017-10-09 18:56:05 -07:00
utkarshcmu a562dc7c2b gofmt fixes 2017-10-09 18:27:04 -07:00
utkarshcmu 138bee99ef Added tests 2017-10-09 18:27:04 -07:00
utkarshcmu d60339a9b1 Kafka REST Proxy works with Grafana 2017-10-09 18:27:04 -07:00
Patrick O'Carroll 68829a821e added insrtuctions for oauth2 okta bitbucket (#9471) 2017-10-09 15:41:14 +02:00
Alexander Zobnin a174ad4c9a Unified Color picker fixes (#9466)
* colorpicker: fix opening error when color is undefined

* colorpicker: replace spectrum picker by new color picker

* colorpicker: remove old spectrum picker directive

* annotations: use tinycolor for working with region colors
2017-10-09 13:54:14 +02:00
Axel 6ce990af57 Show min interval query option for mixed datasource (#9467) 2017-10-09 12:56:34 +02:00
Daniel Lee 8423260f58 gzip: plugin readme content set explicitly
Macaron's gzip middleware tries to automatically figure out the content
type for a file when gzipped and seems to mostly fail with plugin
readmes. This change sets the content type to plain text.

Fixes #9344. Ref #5952.
2017-10-09 10:17:45 +02:00
bergquist 5e4bbfb08e ignore pattern for vendored libs 2017-10-09 10:11:36 +02:00
Torkel Ödegaard 4814b05746 Merge branch 'master' of github.com:grafana/grafana 2017-10-09 07:24:28 +02:00
Torkel Ödegaard ec802dbc1f fix: escape metric segment auto complete, fixes #9423 2017-10-09 07:24:09 +02:00
Anton Hvornum 08dc08550c Corrected a PostgreSQL SELECT statement. (#9460)
At least in my Postgresql 9.6.5, the old syntax of capitalized queries doesn't work (Linux).<br>
Running with UTF-8 as standard encoding and the ` notations didn't work either, so removed those.
2017-10-08 20:37:16 +02:00
Torkel Ödegaard 9e61cacd16 tests: found the unhandled promise issue in the dash import tests 2017-10-08 15:56:42 +02:00
Torkel Ödegaard b228c23dbe testing: fixing tests 2017-10-07 22:05:31 +02:00
Torkel Ödegaard 3519d8d69b annotations: minor change to default/edit annotation color 2017-10-07 12:23:20 +02:00
Torkel Ödegaard 25aa9df270 Create annotations (#8197)
* annotations: add 25px space for events section

* annotations: restored create annotation action

* annotations: able to use fa icons as event markers

* annotations: initial emoji support from twemoji lib

* annotations: adjust fa icon position

* annotations: initial emoji picker

* annotation: include user info into annotation requests

* annotation: add icon info

* annotation: display user info in tooltip

* annotation: fix region saving

* annotation: initial region markers

* annotation: fix region clearing (add flot-temp-elem class)

* annotation: adjust styles a bit

* annotations: minor fixes

* annoations: removed userId look in loop, need a sql join or a user cache for this

* annotation: fix invisible events

* lib: changed twitter emoij lib to be npm dependency

* annotation: add icon picker to Add Annotation dialog

* annotation: save icon to annotation table

* annotation: able to set custom icon for annotation added by user

* annotations: fix emoji after library upgrade (switch to 72px)

* emoji: temporary remove bad code points

* annotations: improve icon picker

* annotations: icon show icon picker at the top

* annotations: use svg for emoji

* annotations: fix region drawing when add annotation editor opened

* annotations: use flot lib for drawing region fill

* annotations: move regions building into event_manager

* annotations: don't draw additional space if no events are got

* annotations: deduplicate events

* annotations: properly render cut regions

* annotations: fix cut region building

* annotations: refactor

* annotations: adjust event section size

* add-annotations: fix undefined default icon

* create-annotations:  edit event (frontend part)

* fixed bug causes error when hover event marker

* create-annotations:  update event (backend)

* ignore grafana-server debug binary in git (created VS Code)

* create-annotations: use PUT request for updating annotation.

* create-annotations: fixed time format when editing existing event

* create-annotations: support for region update

* create-annotations: fix bug with limit and event type

* create-annotations: delete annotation

* create-annotations: show only selected icon in edit mode

* create-annotations: show event editor only for users with at least Editor role

* create-annotations: handle double-sized emoji codepoints

* create-annotations: refactor

use CP_SEPARATOR from emojiDef

* create-annotations: update emoji list, add categories.

* create-annotations: copy SVG emoji into public/vendor/npm and use it as a base path

* create-annotations: initial tabs for emoji picker

* emoji-picker: adjust styles

* emoji-picker: minor refactor

* emoji-picker: refactor - rename and move into one directory

* emoji-picker: build emoji elements on app load, not on picker open

* emoji-picker: fix emoji searching

* emoji-picker: refactor

* emoji-picker: capitalize category name

* emoji-picker: refactor

move buildEmojiElem() into emoji_converter.ts for future reuse.

* jquery.flot.events: refactor

use buildEmojiElem() for making emojis, remove unused code for font awesome based icons.

* emoji_converter: handle converting error

* tech: updated

* merged with master

* shore: clean up some stuff

* annotation: wip tags

* annotation: filtering by tags

* tags: parse out spaces etc. from a tags string

* annotations: use tagsinput component for tag filtering

* annotation: wip work on how we query alert & panel annotations

* annotations: support for updating tags in an annotation

* linting

* annotations: work on unifying how alert history annotations and manual panel annotations are created

* tslint: fixes

* tags: create tag on blur as well

Currently, the tags directive only creates the tag when the
user presses enter. This change means the tag is created on
blur as well (when the user clicks outside the input field).

* annotations: fix update after refactoring

* annotations: progress on how alert annotations are fetched

* annotations: minor progress

* annotations: progress

* annotation: minor progress

* annotations: move tag parsing from tooltip to ds

Instead of parsing a tag string into an array in the annotation_tooltip
class, this moves the parsing to the datasources. InfluxDB ds already
does that parsing. Graphite now has it.

* annotations: more work on querying

* annotations: change from tags as string to array

when saving in the db and in the api.

* annotations: delete tag link if removed on edit

* annotation: more work on depricating annotation title

* annotations: delete tag links on delete

* annotations: fix for find

* annotation: added user to annotation tooltip and added alertName to annoation dto

* annotations: use id from route instead from cmd for updating

* annotations: http api docs

* create annotation: last edits

* annotations: minor fix for querying annotations before dashboard saved

* annotations: fix for popover placement when legend is on the side (and doubel render pass is causing original marker to be removed)

* annotations: changing how the built in query gets added

* annotation: added time to header in edit mode

* tests: fixed jshint built issue
2017-10-07 10:31:39 +02:00
Matt Bostock 83f1ae4e3e OAuth: Rename sslcli
Rename `sslcli` to the more descriptive `oauthClient`.
2017-10-06 17:10:03 +01:00
Matt Bostock ccf093da81 OAuth: Separate TLS client auth and CA config
It should be specify to either use TLS client authentication or use a
user-supplied CA; previously you had to enable client authentication to
use a custom CA.
2017-10-06 17:10:03 +01:00
Matt Bostock f2f8ca52d9 OAuth: Check both TLS client cert and key
If either is set, try to use them.

This should help avoid a situation where someone has half-configured TLS
client authentication and it doesn't work without raising an obvious
error.
2017-10-06 17:10:03 +01:00
Matt Bostock 16c5d0e4b7 Always verify TLS unless explicitly told otherwise
TLS was not being verified in a number of places:

- connections to grafana.com

- connections to OAuth providers when TLS client authentication was
  enabled

- connections to self-hosted Grafana installations when using the CLI
  tool

TLS should always be verified unless the user explicitly enables an
option to skip verification.

Removes some instances where `InsecureSkipVerify` is explicitly set to
`false`, the default, to help avoid confusion and make it more difficult
to regress on this fix by accident.

Adds a `--insecure` flag to `grafana-cli` to skip TLS verification.

Adds a `tls_skip_verify_insecure` setting for OAuth.

Adds a `app_tls_skip_verify_insecure` setting under a new `[plugins]`
section.

I'm not super happy with the way the global setting is used by
`pkg/api/app_routes.go` but that seems to be the existing pattern used.
2017-10-06 17:09:27 +01:00
Lucas Costa 43903d71ec fix: threshold's colors in table panels (#9445) (#9453) 2017-10-06 17:05:26 +02:00
Alexander Zobnin 5561a099b0 singlestat: fix sizing bug #9337 (#9448) 2017-10-06 13:41:39 +02:00
Torkel Ödegaard 7af4daf23b Revert "Fix coloring in singlestat if null value (#9438)" (#9443)
This reverts commit 213ba0377b.
2017-10-05 20:29:06 +02:00
Adrien Raffin-Caboisse 213ba0377b Fix coloring in singlestat if null value (#9438)
This modification aim to allow users to set value via textMapping and
these values to be used in background coloring as it text coloring.

This pull request closes #8404, but doesn't agree with #9012.
The issue #9012 consider that no coloring output should be put when
there is no data. I partially agree with this as I explicitely setted a
value in the textMapping I obviously want to treat `N/A` as a number.

`data.valueFormatted` contain the stringified version of `data.value`

If `Number()` cannot convert a string into a number a `NaN` value is
returned. So the code is still valid if the inputted value in
`data.valueFormatted` is not a number.
2017-10-05 20:26:28 +02:00
Torkel Ödegaard e42c118b3d fix: missing semicolon 2017-10-05 19:06:46 +02:00
Patrick O'Carroll d6b512478e changed jsontree to use jsonexplorer (#9416) 2017-10-05 19:01:23 +02:00
Patrick O'Carroll e951200404 docs page for authproxy (#9420) 2017-10-05 19:01:15 +02:00
Patrick O'Carroll 81be4e2612 Update codebox (#9430)
* updated the codeboxes in docs

* codebox change from json to http
2017-10-05 19:01:03 +02:00
Alexander Zobnin 19b5d91b75 Series color picker fix (#9442)
* colorpicker: fix spectrum color update on series color picker

* colorpicker: minor refactor
2017-10-05 18:34:12 +02:00
Carl Bergquist 9b34346f6b Merge pull request #9441 from genofire/patch-1
fix typo in readme
2017-10-05 17:38:33 +02:00
Geno 22cfb614bf fix type in readme 2017-10-05 17:34:13 +02:00
Carl Bergquist 6f4038e885 Merge pull request #9437 from Ijin08/table-column-styles
fixed layout for column options, changed dropdown for date format kep…
2017-10-05 17:18:15 +02:00
Patrick O'Carroll bb52f00d2d removed commented line 2017-10-05 16:29:01 +02:00
Carl Bergquist 7e432df511 Merge pull request #9439 from shabscan/patch-1
Fixed typo
2017-10-05 16:13:46 +02:00
bergquist 4cda9d0128 changelog: adds note about closing #9110 2017-10-05 16:13:03 +02:00
shabscan eb4a568240 Fixed typo 2017-10-05 10:11:57 -04:00
Carl Bergquist ab5bc1bf4a Merge pull request #9111 from eloo/feature/enhance_hipchat_card
Feature/enhance hipchat card
2017-10-05 16:11:04 +02:00
Joseph Weigl 6a030b2e8c Change empty string checks and improve logging 2017-10-05 16:00:55 +02:00
Carl Bergquist 6979dbd921 Merge pull request #9435 from alin-amana/fix_404_spelling
Fix spelling on 404 page.
2017-10-05 15:01:29 +02:00
bergquist 1590729a24 changelog: adds note about closing #9208 2017-10-05 15:00:12 +02:00
Carl Bergquist 8e4efeeece Merge pull request #9208 from mtanda/prometheus_ace_complete_improve_label_name_complete
(prometheus) support label name/value completion
2017-10-05 14:54:07 +02:00
Carl Bergquist 363ded6ec1 Merge pull request #9434 from Yuav/patch-1
Add Norwegian Krone currency
2017-10-05 14:34:16 +02:00
Alin Sinpalean 79feba0004 Fix spelling on 404 page. 2017-10-05 13:51:02 +02:00
Jon Skarpeteig 789473fd34 Lint fix 2017-10-05 13:46:42 +02:00
Jon Skarpeteig 7479c82687 Update kbn.js
Adding the other kr currencies not to offend any maintainers
2017-10-05 13:44:23 +02:00
Jon Skarpeteig 531586beba Add Norwegian Krone denominator for currency
See http://www.xe.com/symbols.php for currency symbols reference
2017-10-05 13:34:07 +02:00
Patrick O'Carroll 7a7e8c57d1 fixed layout for column options, changed dropdown for date format kept old code 2017-10-05 13:27:36 +02:00
Daniel Lee 0841eb94a8 build: add noUnusedLocals to tsc parameters 2017-10-05 11:37:00 +02:00
bergquist b6d09a3443 Merge branch 'go1.9.1' 2017-10-05 11:35:25 +02:00
bergquist eeb2e2c6c9 build: install go based on env variable 2017-10-05 11:35:14 +02:00
bergquist 15ece1da04 changes go version to 1.9.1 2017-10-05 11:35:14 +02:00
bergquist 69b0e63502 changelog: adds note about closing #9226 2017-10-05 11:16:40 +02:00
Carl Bergquist 32342926cf Merge pull request #9226 from alin-amana/adjust_interval_variable_with_min_step
Prometheus: Rework interval and step computation
2017-10-05 10:51:31 +02:00
bergquist 273c17f3f3 changelog: add note about closing #9429 2017-10-05 10:43:23 +02:00
Carl Bergquist 27ec5449d9 Merge pull request #9429 from s1061123/table_time_ms
Add milliseconds format in table panel's config
2017-10-05 10:41:16 +02:00
bergquist 70f102dad4 changelog: adds note about closing #9399 2017-10-05 10:02:42 +02:00
Carl Bergquist 6a20c28c8c Merge pull request #9399 from cglrkn/master
Update script to make it use OpsGenie's REST API
2017-10-05 09:56:27 +02:00
Cagla Arikan 5a3f32521e Fix formatting issue 2017-10-05 08:42:45 +03:00
Tomofumi Hayashi f8719efb67 Add milliseconds format in table panel's config
This changes introduce milliseconds format option in table panel
config GUI. Current grafana support milliseconds in time and
actually used at graph panel, however current table does not
provide the way to show milliseconds. This fix is to add format
in table panel to show milliseconds in table as well as graph.
2017-10-05 13:40:52 +09:00
Ricard Clau e4541a7fd1 support for s3 path (#9151) 2017-10-04 21:04:20 +02:00
Alin Sinpalean 9cf7a2d2ed Remove apparently unnecessary .flush() calls. 2017-10-04 16:23:24 +02:00
Joseph Weigl 7284db0e54 Fix empty message and toolong attribute names
Use default state message if no message is provided by the user
Slice attribute name to maximum of 50 chars
2017-10-04 16:07:13 +02:00
Alin Sinpalean 02d426a2d4 Merge branch 'master' into adjust_interval_variable_with_min_step 2017-10-04 15:30:38 +02:00
Alin Sinpalean 2276869efc Merge remote-tracking branch 'upstream/master' 2017-10-04 15:30:16 +02:00
Alin Sinpalean 080c46f835 Address review comments. 2017-10-04 15:30:07 +02:00
bergquist 0c31c7b106 changelog: add note about closing #7175 2017-10-04 10:42:34 +02:00
Carl Bergquist ba074062d6 Merge pull request #9392 from xginn8/slack_image_upload
adding support for token-based slack file.upload API call for posting images to slack
2017-10-04 10:29:15 +02:00
Daniel Lee 3c1beb1bdd plugin_loader: expose app_events to plugins 2017-10-04 09:41:22 +02:00
cglrkn 548bc6b7c4 Add the missing comma 2017-10-04 10:15:39 +03:00
Torkel Ödegaard be3c5d1355 colorpicker: refactoring the new unififed colorpicker, #9347 2017-10-04 07:56:41 +02:00
Alexander Zobnin 2aae2556a5 Unified colorpicker (#9347)
* colorpicker: initial picker with predefined palette and spectrum

* colorpicker: highlight selected color

* colorpicker: add onChange() callback

* colorpicker: replace singlestat picker by new one

* colorpicker: style tweak

* colorpicker: parse color on input blur

* colorpicker: sort palette by hue and lightness

* colorpicker: refactor, move colors sorting to 'app/core/utils/colors'

* tech: colorpicker - fix linter errors

* colorpicker: convert to React components

* colorpicker: fix spectrum import after moving to webpack

* colorpicker: minor refactor

* colorpicker: initial series color picker

* colorpicker: fix tests error
2017-10-04 07:15:23 +02:00
Dan Cech 7859d4ffca fix missing column headers in excel export (#9413) 2017-10-04 07:04:10 +02:00
Torkel Ödegaard 1af00f5209 build: remove clean plugin from dev build 2017-10-03 20:25:47 +02:00
Torkel Ödegaard 0831238420 build: fixed broken elastic unit test 2017-10-03 19:38:52 +02:00
Torkel Ödegaard a1b543aa35 shore: cleanup unused stuff in common.d.ts 2017-10-03 18:27:25 +02:00
cglrkn ef518f6ecd Build URL for close alert request differently 2017-10-03 15:13:05 +03:00
Patrick O'Carroll e1a86e63b8 some restyling (#9409) 2017-10-03 13:35:12 +02:00
Patrick O'Carroll dd83b67de5 Docs text fixes (#9408)
* styling changes and some text changes

* styling changes
2017-10-03 13:34:52 +02:00
Patrick O'Carroll 50e2f7e366 Checkbox fixes (#9400)
* fixing checkboxes

* deleted old file, fixed checkboxes

* minor change
2017-10-03 13:23:05 +02:00
Torkel Ödegaard 3dac77468b fix: ensure panel.datasource is null as default 2017-10-03 12:18:22 +02:00
Torkel Ödegaard 4c4564b138 plugibs: expose more to plugins 2017-10-03 11:02:40 +02:00
Matthew McGinn be0d471467 properly parse & pass upload image bool from config 2017-10-02 23:18:48 -04:00
Matthew McGinn 122e2b5c42 break out slack upload into separate function 2017-10-02 20:48:35 -04:00
Torkel Ödegaard a365719d3f tech: minor npm scripts update 2017-10-02 17:25:43 +02:00
Torkel Ödegaard 4cc878b56d build: fixed build 2017-10-02 17:10:23 +02:00
Torkel Ödegaard fa79be1f2d Merge branch 'ctide-day_rounding2' 2017-10-02 16:45:44 +02:00
Torkel Ödegaard a02cac2126 refactoring: minor refactoring of PR #8916 2017-10-02 16:45:25 +02:00
Torkel Ödegaard 42a0e9ebdf Merge branch 'day_rounding' of https://github.com/ctide/grafana into ctide-day_rounding2 2017-10-02 16:20:23 +02:00
cglrkn d8f6c73aab Update script to make it use OpsGenie's REST API
The script is making API calls to the deprecated OpsGenie Web API, we updated the script to make it use new OpsGenie's REST API.
2017-10-02 16:42:09 +03:00
Torkel Ödegaard d4e5a7d3f0 Merge branch 'master' of github.com:grafana/grafana 2017-10-02 15:30:50 +02:00
Torkel Ödegaard 503336bcd5 docs: minor docs fix 2017-10-02 15:30:37 +02:00
Torkel Ödegaard 03a88206a3 Merge branch 'master' of github.com:grafana/grafana 2017-10-02 15:30:14 +02:00
Torkel Ödegaard ae14655749 plugins: expose datemath to plugins as well, fixes zabbix plugin 2017-10-02 13:39:39 +02:00
Torkel Ödegaard c338d8250b build: minor webpack fix 2017-10-02 13:15:28 +02:00
Patrick O'Carroll bd348e16bb redesigned dashboard links settingd, fixed a misspelling in rows and added fixed width to buttons (#9397) 2017-10-02 13:04:48 +02:00
Torkel Ödegaard 010a29a42d Merge branches 'master' and 'master' of github.com:grafana/grafana 2017-10-02 10:56:12 +02:00
Torkel Ödegaard 38ae460f59 docs: updated building from source docs 2017-10-02 10:55:56 +02:00
bergquist cb0ded069a playlist: play and edit should use same width 2017-10-02 09:58:58 +02:00
Torkel Ödegaard f5e8a4069c docs: minor fixes for #9369 2017-10-02 09:02:58 +02:00
Torkel Ödegaard 1dea7dab2a shore: fixed html indentation, #9368 2017-10-02 08:51:45 +02:00
Torkel Ödegaard a22dded6fa Merge branch 'update-alert-lists' of https://github.com/Ijin08/grafana into Ijin08-update-alert-lists 2017-10-02 08:43:56 +02:00
Torkel Ödegaard 6bc6911293 tech: updated yarn.lock 2017-10-02 08:24:56 +02:00
Torkel Ödegaard fea741d7c2 shore: minor cleanup 2017-10-01 20:35:01 +02:00
Torkel Ödegaard 0c86241c5b Webpack (#9391)
* webpack poc, this is not going to work for plugins, dam

* tech: webpack and systemjs for plugins starting to work

* tech: webpack and systemjs combo starting to work

* tech: webpack + karma tests progress

* tech: webpack + karma progress

* tech: working on tests

* tech: webpack

* tech: webpack + karma, all tests pass

* tech: webpack + karma, all tests pass

* tech: webpack all tests pass

* webpack: getting closer

* tech: webpack progress

* webpack: further build refinements

* webpack: ng annotate fixes

* webpack: optimized build fix

* tech: minor fix for elasticsearch

* tech: webpack + ace editor

* tech: restored lodash move mixin compatability

* tech: added enzyme react test and upgraded to react v16

* tech: package version fix

* tech: added testdata to built in bundle

* webpack: sass progress

* tech: prod & dev build is working for the sass

* tech: clean up unused grunt stuff and moved to scripts folder

* tech: added vendor and manifest chunks, updated readme and docs

* tech: webpack finishing touches
2017-10-01 20:02:25 +02:00
Matthew McGinn 89ca4b247b fixing json for CI 2017-10-01 10:37:59 -04:00
Matthew McGinn 00726e93eb adding support for token-based slack file.upload API call for posting images to slack 2017-09-30 21:20:20 -04:00
bergquist f6cc741a6d changelog: adds note about closing #8479 2017-09-29 15:43:30 +02:00
Carl Bergquist 8a7f87b752 Merge pull request #9311 from ctrlok/ctrlok/pagerdutyinfo
Include triggering metrics to pagerduty alerts (pretty print)
2017-09-29 15:40:49 +02:00
bergquist 46cc1464c4 changelog: adds note about closing #8050 2017-09-29 13:40:07 +02:00
Carl Bergquist cabb21317f Merge pull request #8050 from mtanda/cloudwatch_alert
(cloudwatch) alerting
2017-09-29 13:36:36 +02:00
bergquist a8006ada1e changelog: adds note about closing #9386 2017-09-29 13:30:38 +02:00
Carl Bergquist 7d2b989459 Merge pull request #9386 from shanhuhai5739/master
add diff and pdiff for conditions
2017-09-29 13:16:03 +02:00
coral 68ed4d45fa change pdiff to percent_diff for conditions 2017-09-29 18:14:17 +08:00
Daniel Lee 992cc1b680 panel: rename label on csv export modal 2017-09-29 11:32:13 +02:00
coral 9e48d54465 add diff and pdiff for conditions 2017-09-29 17:20:02 +08:00
Carl Bergquist dd56c4b94b Merge pull request #9382 from yagonobre/master
add brazil currency
2017-09-29 10:30:22 +02:00
Mitsuhiro Tanda 5850ae51b1 fix, add targetContainsTemplate() 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 8d6513a564 fix cloudwatch alert bug 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 5e88177f28 add debug log 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 468e8c13ee move extend statistics handling code to backend 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 6c375ed2cb fix assume role 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda f3a2dc7c5f improve cloudwatch tsdb 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda a21f53cf82 refactor cloudwatch code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 59cdd4d8d2 remove obsolete code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda fe9fca381c move cloudwatch crendential related code 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 4f5f38f41b remove old handler 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda e1fe15e094 fix annotation query 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda bf5268c0b4 fix time 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda d98d8a404f fix dimension convertion 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda c140d7aa06 re-implement annotation query 2017-09-29 13:45:11 +09:00
Mitsuhiro Tanda 8f3b060946 fix parameter format 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 17445e0c98 fix alert feature 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 8243ac39c2 fix parameter format 2017-09-29 13:44:01 +09:00
bergquist fe1d395d79 refactor cloudwatch to support new tsdb interface 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 4b34ff5b83 refactor cloudwatch frontend code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda e4de6332de refactor cloudwatch frontend code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda ea704306a0 fix test 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 1dcc51adce re-implement dimension_values() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda ec632bb9ed fix error message 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 78e3556e95 remove performEC2DescribeInstances() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 8fba6dcb0d re-implement ec2_instance_attribute() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda cf23734d7d re-implement ebs_volume_ids() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda e588b682fb import the change, https://github.com/grafana/grafana/pull/9268 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 36a537a3ce fix conflict 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda fa074249e4 fix test 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda f66e1c02a6 remove obsolete GetMetricStatistics() 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 01d2aa8af0 fix test 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda f590db1b78 move test code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 1d265e05c9 fix conflict 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda fe3d3bc384 porting other suggestion 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda feed90c0e2 re-implement get regions 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 0c95148486 move the metric find query code 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 62d84c1e14 (cloudwatch) move query parameter to 'parameters' 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda 110f157621 parse duration 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda c6607f3fa7 remove offset for startTime 2017-09-29 13:44:01 +09:00
Mitsuhiro Tanda d31f264576 cache creds for keys/credentials auth type 2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda 83b79dd624 fix test 2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda 728e96e134 fix invalid query filter 2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda dcb5ea58ce count up metrics 2017-09-29 13:44:00 +09:00
Mitsuhiro Tanda 39607d09d7 (cloudwatch) alerting 2017-09-29 13:44:00 +09:00
Yago Nobre 9c026a8e04 add brazil currency 2017-09-28 14:18:14 -03:00
Torkel Ödegaard 73295ab3ed tech: upgrade of systemjs to 0.20.x working 2017-09-28 14:08:59 +02:00
Torkel Ödegaard 8950f57050 Merge branch 'master' of github.com:grafana/grafana 2017-09-28 13:06:44 +02:00
Torkel Ödegaard 9bfda72a55 tech: reverted to systemjs 2017-09-28 13:06:23 +02:00
Torkel Ödegaard 7aa753a25f tech: migrating elasticsearch to typescript 2017-09-28 12:52:39 +02:00
bergquist 4dea94791d changelog: add note about using golang 1.9 2017-09-28 11:53:01 +02:00
bergquist 7f6924ff13 change go version to 1.9 2017-09-28 11:22:13 +02:00
bergquist c94fa7015f changelog: adds note about closing #9367 2017-09-28 11:19:01 +02:00
Carl Bergquist e9e8ffc769 Merge pull request #9367 from bobrik/dualstack
Enable dualstack in every net.Dialer, fixes #9364
2017-09-28 11:15:49 +02:00
Torkel Ödegaard 487c475a1e tech: systemjs upgrade 2017-09-28 10:37:33 +02:00
Patrick O'Carroll 0a65100eaf made a text-panel page, maybe we don't need it 2017-09-28 10:05:28 +02:00
Patrick O'Carroll 0d5540ca09 cleaned up html/sass and added final touches 2017-09-28 09:41:33 +02:00
Ivan Babrou 9a4ae30227 Enable dualstack in every net.Dialer, fixes #9364
Default transport enables it:

* https://github.com/golang/go/blob/d2826d3e06/src/net/http/transport.go#L42-L46

```
    DialContext: (&net.Dialer{
	Timeout:   30 * time.Second,
	KeepAlive: 30 * time.Second,
	DualStack: true,
    }).DialContext,
```

See also: https://github.com/golang/go/issues/15324
2017-09-27 22:29:48 -07:00
bergquist 2ec7bbb2bd jaeger: capitalize tracer name 2017-09-27 16:38:00 +02:00
bergquist 2ae74bf13d jaeger: logging improvement 2017-09-27 16:36:42 +02:00
Torkel Ödegaard 9ee343f33d tech: systemjs upgrade 2017-09-27 15:42:06 +02:00
Alin Sinpalean bb8849785a Have include intervalFactor in its calculation, so always equal to the step query parameter. 2017-09-27 14:20:51 +02:00
Alin Sinpalean 25a6ed8718 Merge remote-tracking branch 'upstream/master' into adjust_interval_variable_with_min_step 2017-09-27 11:37:14 +02:00
Alin Sinpalean 1543dc4234 Merge remote-tracking branch 'upstream/master' 2017-09-27 11:36:50 +02:00
bergquist 5373a6027c alertlist: toggle play/pause button
closes #9355
2017-09-27 10:49:39 +02:00
Patrick O'Carroll 8615912018 updated css and html for recent state changes for alert lists 2017-09-27 10:38:01 +02:00
chrisrd 0e5e2f3fb9 Fix export_modal message (#9353)
Remove duplicate "to", and "others" is plural not possessive.
2017-09-27 09:46:56 +02:00
Torkel Ödegaard eaefa3c1fa s3: minor fix for PR #9223 2017-09-27 09:43:32 +02:00
Torkel Ödegaard 50d82155ed Merge branch 'master' of https://github.com/williamjoy/grafana into williamjoy-master 2017-09-27 09:37:26 +02:00
Alin Sinpalean f25aeadf21 Resolve merge conflicts with remote/master. 2017-09-26 17:55:30 +02:00
Alin Sinpalean 7366d7eae0 Merge branch 'master' of git+ssh://github.com/alin-amana/grafana 2017-09-26 17:44:37 +02:00
bergquist 2ed753232f internal metrics: add grafana version 2017-09-26 15:25:44 +02:00
bergquist 0778f31828 changelog: adds note about closing 5765 2017-09-26 14:40:43 +02:00
Carl Bergquist da3aea5e0a Merge pull request #9186 from mtanda/prometehus_instant_query2
(prometheus) instant query support
2017-09-26 14:37:10 +02:00
Torkel Ödegaard 5b3e6e67ea Update latest.json 2017-09-26 11:58:37 +02:00
Torkel Ödegaard 7b42e13c79 typescript: stricter typescript option 2017-09-26 11:24:58 +02:00
bergquist ff108bd871 prom_docker: give targets correct job name 2017-09-25 08:55:54 +02:00
bergquist 3641e85233 testdata: add bucket scenarios for heatmap
these scenarios makes it easier debug panels based
on the same numbers without sharing datasource

ref #9332
2017-09-24 22:08:28 +02:00
bergquist 7eec60ec2e dev-docker: add grafana as target 2017-09-24 21:58:33 +02:00
Carl Bergquist dd7f42ba03 changelog: add note ablout closing #9319 2017-09-24 21:46:51 +02:00
Carl Bergquist 9aa4f5c42a Merge pull request #9341 from thz/smtp_ehlo_identity
introduce smtp config option for EHLO identity
2017-09-24 21:41:57 +02:00
Tobias Hintze af79d046db introduce smtp config option for EHLO identity 2017-09-24 20:48:20 +02:00
bergquist 3fac31e808 changelog: note about closing #9250 2017-09-24 19:02:25 +02:00
bergquist 8175783f93 go fmt 2017-09-24 18:59:21 +02:00
bergquist c927209447 Merge branch 'master' of https://github.com/BrandonArp/grafana into BrandonArp-master 2017-09-24 18:56:46 +02:00
Patrick O'Carroll 3f1452fddb new page for text, needs more work 2017-09-22 17:14:39 +02:00
Patrick O'Carroll 1258dc1cbb replaced img in graph, created alert list page 2017-09-22 16:31:34 +02:00
Torkel Ödegaard ca0085f429 docs: update docs 2017-09-22 14:05:25 +02:00
Torkel Ödegaard a98124add7 Update CHANGELOG.md 2017-09-22 13:30:23 +02:00
bergquist ae249a623d changelog: adds note about closing #5873 2017-09-22 13:17:09 +02:00
Carl Bergquist 63f78c0b59 Merge pull request #9299 from seuf/grafana-cli-plugin-url
Added --pluginUrl option to grafana-cli for local network plugin inst…
2017-09-22 13:13:17 +02:00
Carl Bergquist 632ae0986c Merge pull request #9320 from xiahuibing/patch-1
Update _navbar.scss
2017-09-22 13:06:11 +02:00
Patrick O'Carroll 31243e7132 replaced image 2017-09-22 12:53:37 +02:00
Patrick O'Carroll 367acc37c7 Docs new updates (#9324)
* replaced images, updating text(not finished)

* text uppdates for dashlist and singlestat(+img). updated the keyboard shortcuts

* deleted old shortcuts instruction

* another img update
2017-09-22 10:49:47 +02:00
Torkel Ödegaard e695ce4aa5 Update CHANGELOG.md 2017-09-22 10:33:03 +02:00
Torkel Ödegaard dd0f4460cb Update latest.json 2017-09-22 10:08:56 +02:00
Torkel Ödegaard f22d1af9e0 cleanup: removed unused file 2017-09-22 10:07:22 +02:00
Torkel Ödegaard c0c86c1138 tech: remove bower and moved remaining bower dependencies to npm 2017-09-22 09:47:25 +02:00
Torkel Ödegaard 6aad2a5b2d tech: cleanup and fixed build issue 2017-09-21 21:12:49 +02:00
Torkel Ödegaard f0e0e61809 tech: upgraded angularjs and moved dependency from bower to npm, closes #9327 2017-09-21 20:58:32 +02:00
bergquist ed661767f8 follow go idiom and return error as second param 2017-09-21 18:04:16 +02:00
Torkel Ödegaard 79b873e40e Merge branch 'stricter-ts-lint-rules' 2017-09-21 17:34:47 +02:00
Torkel Ödegaard 8fe21b43e9 tech: updated tsconfig 2017-09-21 17:34:22 +02:00
Daniel Lee 53d862143b docker: adds alertmanager to prometheus fig
with an alert rule that will always fire
2017-09-21 17:28:31 +02:00
Torkel Ödegaard 491fa6cad8 tech: more tslint rules 2017-09-21 17:23:31 +02:00
Patrick O'Carroll bf88242282 another img update 2017-09-21 16:58:25 +02:00
Torkel Ödegaard b8d9722b4f tech: removing unused variables from typescript files, and making tslint rules more strict 2017-09-21 16:40:18 +02:00
Patrick O'Carroll f6aefbd361 deleted old shortcuts instruction 2017-09-21 16:18:24 +02:00
Patrick O'Carroll fe05a996b7 text uppdates for dashlist and singlestat(+img). updated the keyboard shortcuts 2017-09-21 15:58:19 +02:00
bergquist a45e2ec9c3 context is reserved for go's context 2017-09-21 15:23:34 +02:00
bergquist 16b5b9f6be make ds a param for Query 2017-09-21 15:09:14 +02:00
bergquist c0260fd913 remove batch abstraction 2017-09-21 15:02:17 +02:00
bergquist 7f9f388293 rename executor into tsdbqueryendpoint 2017-09-21 15:02:17 +02:00
bergquist 0229d28d64 remove unused structs 2017-09-21 15:02:17 +02:00
bergquist 55f1b36e31 refactor response flow 2017-09-21 15:02:17 +02:00
Torkel Ödegaard adda84d124 tech: removed test component 2017-09-21 14:05:24 +02:00
Torkel Ödegaard 837beda155 Merge branch 'react-poc' 2017-09-21 13:59:26 +02:00
Torkel Ödegaard 9500eb8aaa ux: minor singlestat update 2017-09-21 13:59:21 +02:00
Torkel Ödegaard 1887c4f279 singlestat: minor change 2017-09-21 13:59:21 +02:00
Torkel Ödegaard 01fc37571e Update CHANGELOG.md 2017-09-21 13:58:48 +02:00
Patrick O'Carroll de17dcf3b0 Singlestat time (#9298)
* Added a timestamp option to single stat

* can now choose last time as value

* Finished last_time so it formats correctly, updated value stat

* fixed som issues, but still issue with testing

* Clean up after fake clock in test

* timezone-issue fix, fake time for from now test

* fix for timedifference
2017-09-21 13:34:51 +02:00
Torkel Ödegaard fed35909cc tech: progress on react poc 2017-09-21 13:32:57 +02:00
bergquist f1036a9382 adds note about closing #9213 2017-09-21 10:46:59 +02:00
Carl Bergquist 0db678e18f Merge pull request #9213 from grafana/dist_tracing
Add support for distributed tracing with Jaeger
2017-09-21 10:42:25 +02:00
xiahuibing 416510773b Update _navbar.scss
line66 and line118 :  "min-height:: $navbarHeight;" has double “:”
2017-09-21 16:40:49 +08:00
Patrick O'Carroll ece6588c03 replaced images, updating text(not finished) 2017-09-21 09:40:58 +02:00
Gordon McGuire 5e013f82b4 fix: close for 'Unsaved Changes' modal, #9284 (#9313)
Missing reference to the controller instance.
2017-09-21 09:05:59 +02:00
Alexander Zobnin f8b8907cc4 Initial graphite tags support (#9239)
* graphite: initial seriesByTag() support

* graphite: groupByTags() function

* graphite: aliasByTags() function

* graphite: fix optional params update, issue #9238

* graphite: fix tag-related functions version

* graphite: add 1.1.x version to config

* graphite: fix seriesByTag() series parsing
2017-09-21 08:22:56 +02:00
Torkel Ödegaard 84b1519480 tech: initial react poc 2017-09-20 17:44:23 +02:00
Vsevolod Polyakov d355862328 Make details more clean in PD description 2017-09-20 13:03:18 +03:00
bergquist 4326790bb4 bug: enable HEAD requests again
ref #9307
2017-09-20 09:45:00 +02:00
Will Sewell 4a6da233d9 Add DbClusterIdentifier to CloudWatch dimensions (#9297)
Unfortunately CloudWatch dimensions are case-sensitive and it uses both `DBClusterIdentifier` and `DbClusterIdentifier` (notice the lower case `b`) depending on the metric. All metrics which also have the `Role` dimension appear to use `DBClusterIdentifier`, whereas metric with the `EngineName` dimension use `DbClusterIdentifier`.
2017-09-20 08:31:54 +02:00
Alexander Zobnin fdec9a4daf templating: fix dependent variable updating (#9306) 2017-09-19 20:35:48 +02:00
tamayika bef4b9b3b0 Fix adhoc filters restoration (#9303) 2017-09-19 14:25:35 +02:00
Andreas Kohn 3b565dccd8 Explicitly refer to Github 'OAuth' applications
A 'Github Application' is now something else, and will not work with Grafana.
2017-09-19 13:21:15 +02:00
William 88a8991722 config bucket and region for s3 uploader
this is to support cn-north-1 region as it can get s3 url programatically.
also keeps support 'bucket_url' for backward compatiblity
2017-09-19 04:57:25 -04:00
bergquist 13e8eb6d2e Merge branch 'v4.5.x' 2017-09-19 08:34:44 +02:00
bergquist fe3c6ac355 fixes bug introduced with prom namespaces
ref #9279
2017-09-19 08:16:23 +02:00
Matthew McGinn 2840968861 fixing spelling of millesecond -> millisecond 2017-09-19 07:20:14 +02:00
Matthew McGinn 3a7ed2305d fixing spelling of millesecond -> millisecond 2017-09-19 06:14:43 +02:00
Aaron Kirkbride 442f625a4e Remove duplicate bus.AddHandler() (#9289)
`bus.AddHandler("sql", SetUsingOrg)` is already called on line 24.

Very minor change.
2017-09-18 15:52:15 +02:00
Torkel Ödegaard 5f6de33487 Update CHANGELOG.md 2017-09-18 15:21:00 +02:00
bergquist 353bb57a6f use same key as mt 2017-09-18 14:59:59 +02:00
bergquist 6c7454fc2b tag alert queries that return no_data 2017-09-18 14:53:30 +02:00
Patrick O'Carroll d6725d4fbe updated error page html+css, added ds_store to ignore (#9285) 2017-09-18 14:04:55 +02:00
deep-42-thought 5749489e7e public/app/plugins/panel/graph/specs/graph_specs.ts: relax tests to be "within" instead of "equal", so they won't fail on i686 (#9286) 2017-09-18 14:03:54 +02:00
Sven Nierlein d0ddf76730 Fix path to icon (#9276)
grafana_mask_icon.svg is located in the img/ folder.
2017-09-18 12:54:20 +02:00
bergquist 915412754c Merge branch 'v4.5.x' 2017-09-18 12:35:02 +02:00
bergquist 6d901fe145 adds note about fix in v4.5.2 2017-09-18 12:29:32 +02:00
bergquist 0a8a6fd872 skip NaN values when writing to graphite
ref #9279
2017-09-18 12:25:37 +02:00
Andrew Prokhorenkov 00b18a8aea addded mass units, #9265 (#9273) 2017-09-18 11:13:56 +02:00
Ryan Patterson a20c419583 Fully fill out nulls in cloudfront data source (#9268)
Summary:
Previously, cloudwatch data sources would only fill in a single null value if
there was missing data. This results in behavior described in #9267. This
resolves that issue by filling the entire missing period with null values. The
null values can then be interpreted as normal by the graphing frontend.

Test Plan:
Used on a data source that had missing data for many consecutive periods.
Ensured that the graph remained at 0 across the entire window.
2017-09-18 11:12:52 +02:00
bergquist bcf784375b make it possible to configure sampler type 2017-09-18 11:08:58 +02:00
bergquist 861843f4ca mark >=400 responses as error 2017-09-18 11:08:58 +02:00
bergquist 83ddd2b158 change port for jaeger dev container 2017-09-18 11:08:58 +02:00
bergquist f211455643 logwrapper for jaeger 2017-09-18 11:08:58 +02:00
bergquist f37a595f68 make samplerconfig.param configurable 2017-09-18 11:08:58 +02:00
bergquist ec29b469e4 adds custom tags from settings 2017-09-18 11:08:58 +02:00
bergquist e3211f6e48 use route as span name 2017-09-18 11:08:58 +02:00
bergquist ee2e4c6567 add trace headers for outgoing requests 2017-09-18 11:08:58 +02:00
bergquist 98c84f9458 docker file for running jaeger 2017-09-18 11:08:58 +02:00
bergquist bc678899f7 better formating for error trace 2017-09-18 11:08:58 +02:00
bergquist d55b49b7b7 attach context with span to *http.Request 2017-09-18 11:08:58 +02:00
bergquist 3c8133aa4b add traces for datasource reverse proxy requests 2017-09-18 11:08:58 +02:00
bergquist 8c8fdadb78 trace failed executions 2017-09-18 11:08:58 +02:00
bergquist e128310045 use tags instead of logs 2017-09-18 11:08:58 +02:00
bergquist 89c86c7a22 use opentracing ext package when possible 2017-09-18 11:08:58 +02:00
bergquist 935dad653c set example port to zipkin default 2017-09-18 11:08:58 +02:00
bergquist e84ff24833 adds codahale to vendor 2017-09-18 11:08:58 +02:00
bergquist a234e894bb makes jaeger tracing configurable 2017-09-18 11:08:58 +02:00
bergquist f160ad3bc8 add trace parameters for outgoing requests 2017-09-18 11:08:58 +02:00
bergquist 2e350bbb8e adds basic traces using open traces 2017-09-18 11:08:58 +02:00
bergquist 2ac6e23fc5 Merge branch 'invalid_panel_data' 2017-09-18 10:36:17 +02:00
bergquist 89eda76f29 require dashboard panels to have id
closes #9234
2017-09-18 10:32:58 +02:00
Torkel Ödegaard a687a6605d Merge branch 'v4.5.x' 2017-09-18 09:40:00 +02:00
Torkel Ödegaard 24d69ca205 fix: jsonData should not be allowed to be null, fixes #9258 2017-09-18 09:38:02 +02:00
Torkel Ödegaard 7a80a6627a Merge branch 'reduce-package-size' 2017-09-18 09:09:38 +02:00
Torkel Ödegaard a081f90403 Merge branch 'master' of github.com:grafana/grafana 2017-09-18 09:08:42 +02:00
Torkel Ödegaard d99c873221 packaging: reduce package size 2017-09-18 09:02:45 +02:00
ParadoxalManiak c94f5b456a Update upgrading.md (#9263)
Fixed some minor writing issues.
2017-09-15 22:15:12 +02:00
THIERRY SALLE e978bfc368 Added --pluginUrl option to grafana-cli for local network plugin installation 2017-09-15 20:34:08 +02:00
bergquist 67469e1809 adds note about closing #1395 2017-09-15 17:26:48 +02:00
Andrew Prokhorenkov 8cdf12b694 add locale format 2017-09-15 17:26:18 +02:00
bergquist 114ba801b9 update changelog 2017-09-15 16:25:17 +02:00
bergquist 87308fd97f fixes broken tests 💥 2017-09-15 16:11:02 +02:00
bergquist 16b1c0e63e minor code adjusetments 2017-09-15 16:11:02 +02:00
bergquist c7698a09ed pass context to image uploaders 2017-09-15 16:11:02 +02:00
bergquist d0ab028cfc remove unused deps 2017-09-15 16:11:02 +02:00
Konstantin Chukhlomin 7e3c9fcc1c Reduced OAuth scope to read_write 2017-09-15 16:11:02 +02:00
Konstantin Chukhlomin fcdf282090 GCS support via JSON API 2017-09-15 16:11:02 +02:00
Konstantin Chukhlomin 1188f8df73 gofmt fixes 2017-09-15 16:11:02 +02:00
Konstantin Chukhlomin 72d7c4d620 Added GCS support #8370 2017-09-15 16:11:02 +02:00
bergquist 93cff1a42a move more known datasources from others 2017-09-15 14:26:29 +02:00
Alexander Zobnin 54f0650321 Remove alert thresholds on panel duplicate, issue #9178 (#9257) 2017-09-15 13:34:31 +02:00
Daniel Lee f534ea057c 4.5.1 docs + update version to 5.0.0-pre1 2017-09-15 11:27:16 +02:00
Daniel Lee 3aed6595c7 Merge branch 'v4.5.x' 2017-09-15 11:10:55 +02:00
Daniel Lee 085245f97d publish_both.sh update for 4.5.1 2017-09-15 11:09:48 +02:00
Daniel Lee c114c46119 update version to 4.5.1 2017-09-15 10:05:51 +02:00
Torkel Ödegaard 9fdecb320c Merge branch 'master' of github.com:grafana/grafana 2017-09-15 10:00:17 +02:00
Torkel Ödegaard 7cac2e1817 Merge branch 'v4.5.x' 2017-09-15 09:59:44 +02:00
Torkel Ödegaard bbe191a975 graphite: do not show error for cancelled requests, fixes #9249 2017-09-15 09:59:23 +02:00
Torkel Ödegaard c532c8640b Update CHANGELOG.md 2017-09-15 09:17:44 +02:00
Torkel Ödegaard 0107f1eddb docs: updated changelog 2017-09-14 20:34:23 +02:00
Torkel Ödegaard f8326c29f9 mysql: fix query editor not showing issue, fixes #9247 2017-09-14 20:30:01 +02:00
bergquist 491e6897e7 metrics: set summary unit
we have to use milleseconds since graphite
doesnt support float64
2017-09-14 19:28:54 +02:00
Alin Sinpalean 719151b9cb Merge remote-tracking branch 'upstream/master' 2017-09-14 19:25:54 +02:00
Andrew Prokhorenkov 5b74bea476 add Ukrainian hryvnia sign 2017-09-14 19:06:25 +02:00
Torkel Ödegaard 210df23430 packaging: reducing package size be only including public vendor stuff we need 2017-09-14 17:33:58 +02:00
bergquist 314bff1b78 adds grafana_ prefix for none standard metrics 2017-09-14 14:26:32 +02:00
bergquist 9c30bf53cf introduce concept of named middleware 2017-09-14 14:26:32 +02:00
bergquist 4bc6ecb241 adds metric middlware to route register 2017-09-14 14:26:32 +02:00
bergquist 6372e22180 migrate handlers to new register 2017-09-14 14:26:32 +02:00
bergquist f842265388 add custom route register 2017-09-14 14:26:32 +02:00
bergquist bf138d1845 adds small docs page metrics 2017-09-14 14:26:32 +02:00
bergquist c177a9a77a make bridge prefix backwards compatible 2017-09-14 14:26:32 +02:00
bergquist 6d22a67a30 return /metrics before session middleware 2017-09-14 14:26:32 +02:00
bergquist 6b1ae1a8a8 use internal init for settings 2017-09-14 14:26:32 +02:00
bergquist dd9d4ecfbe update stat gauges first run to avoid gaps 2017-09-14 14:26:32 +02:00
bergquist fca80ff525 add support for deltas in histogram and summaries 2017-09-14 14:26:32 +02:00
bergquist 2de94d6548 convert old metrics to prom metrics 2017-09-14 14:26:32 +02:00
bergquist 788f677ed7 remove old internal metrics lib 2017-09-14 14:26:32 +02:00
bergquist d6b8c6a2d2 add graphite bridge that support delta counters 2017-09-14 14:26:32 +02:00
Torkel Ödegaard c1ef89d3bf Update CHANGELOG.md 2017-09-14 11:55:44 +02:00
Torkel Ödegaard aa24839ac9 Update CHANGELOG.md 2017-09-14 11:55:07 +02:00
Torkel Ödegaard a5c08a72fb docs: update download links 2017-09-14 11:28:59 +02:00
Patrick O'Carroll 337fb9bdfa fixed some images (#9237) 2017-09-14 11:04:01 +02:00
Torkel Ödegaard 512535e8ff release: bumped version to v4.5.0 stable 2017-09-14 10:51:21 +02:00
Torkel Ödegaard 4e719aa0c1 docs: minor update 2017-09-14 10:50:34 +02:00
Brandon Arp cffbcb504d allow ssl renegotiation for datasources 2017-09-13 16:20:24 -07:00
Daniel Lee 29de6387cb plugins: add styles for ol tags in markdown 2017-09-13 17:13:53 +02:00
Torkel Ödegaard a76f3fba2e docs: minor fixes to images 2017-09-13 17:11:10 +02:00
Patrick O'Carroll d71456b96f Docs image updates (#9225)
* replaced old images and gifs with new ones

* replaced images, changed some text especially for column styles

* replaced and added images and gifs
2017-09-13 16:29:53 +02:00
Torkel Ödegaard 85bd1861d6 fix: improve behavior when switching back and forth between x-axis modes, fixes #9229 2017-09-13 14:38:22 +02:00
Torkel Ödegaard 1a53d6453b Merge branch 'v4.4.x' 2017-09-13 10:02:04 +02:00
Torkel Ödegaard 10f058036c Merge branch 'master' of github.com:grafana/grafana 2017-09-13 09:48:56 +02:00
Torkel Ödegaard 73248d6687 fixes for metrics tab when data source was not found 2017-09-13 09:48:50 +02:00
Mitsuhiro Tanda 5bdd554671 check args for query 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda 6bf8144793 add test for completer 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda 1a5e786467 fix 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda 56c0d91ee5 follow token name change 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda d530ccff1c (prometheus) support label value completion 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda 40b74e6664 (prometheus) support label name completion 2017-09-13 16:34:28 +09:00
Mitsuhiro Tanda b349b3ef55 provide ace editor for external datasource plugin (#9224) 2017-09-13 09:29:53 +02:00
William 37962216ed get s3 url via aws-sdk-go, fix #9189 2017-09-12 21:52:40 -04:00
Alin Sinpalean 7a7837f47e Merge remote-tracking branch 'upstream/master' 2017-09-12 21:57:32 +02:00
Alin Sinpalean 2a62374a61 Prometheus: Rework the interaction between auto interval (computed based on graph resolution), min interval (where specified, per query) and intervalFactor (AKA resolution, where specified, per query).
As a bonus, have  and  reflect the actual interval (not the auto interval), taking into account min interval and Prometheus' 11k data points limit.
2017-09-12 16:36:27 +02:00
Torkel Ödegaard dd67c9d420 Merge branch 'master' of github.com:grafana/grafana 2017-09-12 11:36:47 +02:00
Torkel Ödegaard 968ba30fa5 ux: increased code editor auto complete width from 320px to 550px, fixes #9203 2017-09-12 11:36:30 +02:00
Daniel Lee 379f984293 docs: windows - add note about ini comments 2017-09-12 11:08:28 +02:00
Torkel Ödegaard 3c16230158 prometheus: added completer unit test, #9208 2017-09-12 11:05:32 +02:00
Torkel Ödegaard fd76c855f9 Merge branch 'master' of github.com:grafana/grafana 2017-09-12 10:32:02 +02:00
Torkel Ödegaard e16cadaa27 docs: minor update 2017-09-12 10:31:53 +02:00
Daniel Lee 665fef0114 docs: kiosk mode options add to playlist doc 2017-09-12 10:31:13 +02:00
Daniel Lee ff4cd1aef6 influxdb: small css fix for order by in query editor 2017-09-12 09:24:54 +02:00
Torkel Ödegaard 0e18c82d95 style: corrected indentation in sass file 2017-09-12 09:21:17 +02:00
Patrick O'Carroll a7b0a01b13 replaced old images and gifs with new ones (#9217) 2017-09-12 09:07:36 +02:00
Torkel Ödegaard 18cfe1b192 Merge branch 'master' of github.com:grafana/grafana 2017-09-12 09:05:47 +02:00
Torkel Ödegaard f6100dd8eb ux: success/error alerts refactoring, #9214 2017-09-12 09:05:32 +02:00
bergquist ee4bbf61a9 remove node restriction from package.json
yarn requires correct node version in package.json
and wont install with 4.x. removing since we dont
care about it.
2017-09-12 08:15:48 +02:00
Torkel Ödegaard 7164183739 Merge branch 'master' of github.com:grafana/grafana 2017-09-12 08:01:51 +02:00
Patrick O'Carroll 90602942f5 New alert design (#9214)
* ux: updated alert design

* fixed bg-color for alerts

* more changes to alerts, index fixed
2017-09-12 08:01:44 +02:00
Torkel Ödegaard 6e344f6eea api: tsdb api orgId fix 2017-09-12 08:01:34 +02:00
bergquist 057b8a6b2d improve error message for timeouts
closes #9220
2017-09-11 20:07:57 +02:00
Torkel Ödegaard e5f84484eb prometheus: another prometheus syntax highlight fix, #9212, #9167 2017-09-11 16:36:53 +02:00
Alexander Zobnin b1580bf385 ace: fix braces highlight in prometheus (#9212) 2017-09-11 15:49:15 +02:00
Torkel Ödegaard 293daf2ca1 fix: removed text option from text panel edit options, was by mistake not removed from settings dropdown, fixes #9204 2017-09-11 10:45:00 +02:00
Mitsuhiro Tanda f5a17e535b minor fix 2017-09-11 13:11:45 +09:00
Torkel Ödegaard 75c4c4d8b5 fix: query ctrl unit tests now pass as before 2017-09-08 13:52:28 +02:00
Torkel Ödegaard 2953d64429 prometheus: minor update to focus editor PR, #9201 2017-09-08 11:43:29 +02:00
Torkel Ödegaard 4b851de648 Merge branch 'prom_give_focus' of https://github.com/mtanda/grafana into mtanda-prom_give_focus 2017-09-08 10:55:50 +02:00
Alin Sinpalean 1076b75a21 Fix rounding of intervals (#9197)
* Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000.

* Fix kbn.round_interval for exact intervals.

* Remove redundant 1d return, fix a couple of comments.

* Be more cautious with values close to 1d not rounding up to 1d. They may, because of the way the calculation uses 2 potentially different current time values.
2017-09-08 10:37:57 +02:00
Daniel Lee b1506a2b09 securejson: decrypt should not modify src
When decrypting a source securejson byte array, should not
modify the source and now passes back a new dest byte array.
2017-09-08 10:19:07 +02:00
Mitsuhiro Tanda e13575eaef add AWS/NATGateway metrics (#9202) 2017-09-08 09:04:15 +02:00
Mitsuhiro Tanda 7c566a6539 fix to focus first query 2017-09-08 12:33:36 +09:00
Mitsuhiro Tanda d971eddc7a copy from give-focus 2017-09-08 11:49:44 +09:00
Mitsuhiro Tanda ce0de35a6c set give focus in code editor 2017-09-08 11:49:41 +09:00
Alin Sinpalean 13eb0c1ece Fix kbn.round_interval for exact intervals. 2017-09-07 22:14:37 +02:00
Alin Sinpalean 567e877b9e Merge remote-tracking branch 'upstream/master' 2017-09-07 20:26:28 +02:00
Mitsuhiro Tanda 6f8110956d (prometheus) support instant query for table format, use checkbox to switch query type 2017-09-08 01:15:07 +09:00
Torkel Ödegaard 93be16b106 docs: minor docs update 2017-09-07 16:55:36 +02:00
Torkel Ödegaard 8ec33574a1 docs: added v4.4 to docs archive 2017-09-07 16:44:41 +02:00
Patrick O'Carroll de647c4100 docs: uppdated getting started with images and text, added info on query inspector to version45 and trouble shooting (#9193) 2017-09-07 16:32:55 +02:00
bergquist 51d021a337 reduce readme to be about the code 2017-09-07 16:08:38 +02:00
bergquist 7dc6d67d46 adds note about closing #8876 2017-09-07 14:29:25 +02:00
Carl Bergquist 62979916ad Merge pull request #8876 from mtanda/shortcut_new_dashboard
add new dashboard shortcut
2017-09-07 14:26:05 +02:00
Carl Bergquist 4670c74942 Merge pull request #9022 from adriangarza/master
added CloudWatch data source API documentation
2017-09-07 14:10:53 +02:00
Torkel Ödegaard c9a30ef149 build: fixed broken build 2017-09-07 13:05:26 +02:00
Carl Bergquist 9dac602e98 Merge pull request #9191 from wgliang/master
Optimize some wrong usage and spelling
2017-09-07 12:04:45 +02:00
wangguoliang 652fce7e76 Optimize some wrong usage and spelling
Signed-off-by: wgliang <liangcszzu@163.com>
2017-09-07 17:50:11 +08:00
Mitsuhiro Tanda 56cb16ff5b (prometheus) instant query support 2017-09-07 18:03:53 +09:00
Mitsuhiro Tanda e98254e1e3 show only label name in label matcher (#9167) 2017-09-07 10:10:52 +02:00
Mitsuhiro Tanda 4446e95155 (prometheus) cache metric suggest query result (#9182)
* (prometheus) cache metric suggest query result

* add test
2017-09-07 10:09:59 +02:00
Alin Sinpalean 5d4b8b5a5c Have 'Hide series with only zeros' ignore nulls (#9179)
* Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000.

* Have the 'Hide series with only zeros' option also apply to series with some null values.
2017-09-06 16:50:55 +02:00
Patrick O'Carroll 095ac80d19 docs: updated image in docs (#9184) 2017-09-06 16:31:17 +02:00
Torkel Ödegaard 9451e6af39 Merge branch 'master' of github.com:grafana/grafana 2017-09-06 14:20:53 +02:00
Alin Sinpalean 24a165662c Merge remote-tracking branch 'upstream/master' 2017-09-06 09:51:13 +02:00
Torkel Ödegaard 82d365bdb8 fix: graph right y label is now correctly possitioned, fixes #9172 2017-09-05 21:57:32 +02:00
Sergey Korobov ec64dc8fae Fix sortByName and percentileOfSeries in gfunc.js (#9169)
Fixing type of parameters from "select" to "boolean" for working with carbonapi (like it was done in summarize function) + some commas prettify.
2017-09-05 19:34:55 +02:00
Torkel Ödegaard b333ad9481 docs: updated docs with v4.5 beta links 2017-09-05 16:01:28 +02:00
Torkel Ödegaard 22be9436f7 Update CHANGELOG.md 2017-09-05 15:16:04 +02:00
Torkel Ödegaard bc690232fb version bump to v4.5-beta1 2017-09-05 10:39:55 +02:00
Torkel Ödegaard 0005f8e7b3 fix: fixed jshint issue 2017-09-05 10:17:24 +02:00
Torkel Ödegaard 4e387ed47a fix: Elasticsearch and adhoc filters fix, fixes #9165 2017-09-05 10:16:17 +02:00
Daniel Lee 52676161bb docs: update to http api admin section
Make it clearer that it only works with basic auth
2017-09-05 10:04:01 +02:00
bergquist 01e2729dba spring clean! 2017-09-04 23:19:09 +02:00
Carl Bergquist a1faa6d4d9 Merge pull request #9164 from summic/master
Add the missing step of "grunt build" to the README.md
2017-09-04 23:06:42 +02:00
Allen 1a3d34b918 Add the missing step of grunt build to the readme 2017-09-05 01:56:52 +08:00
Torkel Ödegaard 5d3c3a6889 packaging: changed how pid directory is created for systemd systems, #9133 2017-09-04 16:41:07 +02:00
Torkel Ödegaard 4eabf6ce81 Update CHANGELOG.md 2017-09-04 14:49:51 +02:00
Torkel Ödegaard 2789c4f1e1 dsfix: include routes in plugin model 2017-09-04 14:09:02 +02:00
Torkel Ödegaard 9bafb108f7 docs: added docs archive for v4.3 2017-09-04 13:38:46 +02:00
Torkel Ödegaard 88e4b6ee75 docs: update changelog 2017-09-04 13:34:33 +02:00
Torkel Ödegaard 2fc67da69a Merge branch 'metrics-tab-v3' 2017-09-04 13:27:44 +02:00
Torkel Ödegaard 6e4090abf2 feat: finished work on the interval changes #9161 2017-09-04 13:27:28 +02:00
Torkel Ödegaard 284cacf560 logging: write pid file path and pid during startup 2017-09-04 12:44:54 +02:00
mxlxm c5400ffe76 mysql: use collation instead of charset (#9156)
- use charset would issue additional 'SET NAMES <VALUE>' queries, set
collation would be better. see: https://github.com/go-sql-driver/mysql#charset
2017-09-04 12:32:07 +02:00
Torkel Ödegaard c3cffeb10c packaging: fixed issue with pid file on systemd systems, fixes #9133 2017-09-04 10:43:04 +02:00
bergquist ce6050f5d6 fix(graphite): jsonData is not always present. 2017-09-04 10:28:48 +02:00
Joseph Weigl 185b0dcc05 Merge branch 'master' into feature/enhance_hipchat_card 2017-09-02 19:04:40 +02:00
Torkel Ödegaard 07e192ff47 change: more work on changing default group by time interval to min interval setting 2017-09-01 15:57:02 +02:00
Torkel Ödegaard e8e1f1bc6d updated graphite help 2017-09-01 11:15:39 +02:00
Marcel Anacker 40c008f870 Cloudwatch Datasource: changed namespace of Web Application Firewall (#9128) 2017-09-01 10:43:23 +02:00
Nevins 66441650cd changing ordering so AWS API is only called if cache has expired (#9136) 2017-09-01 07:24:05 +02:00
Jesse White 91fb3f2224 fix: cancel the initial timer when changing the auto-refresh interval, fixes #9139 (#9140) 2017-09-01 07:19:51 +02:00
Torkel Ödegaard 7b1473649b Update README.md 2017-09-01 07:16:42 +02:00
Torkel Ödegaard eb0f5cc900 ux: progress on metrics tab changes 2017-08-31 16:38:49 +02:00
Torkel Ödegaard 84d4958a3c plugin change: make interval, cache timeout & max data points options in plugin.json, remove query.options component feature, add help markdown feature and toggle for data sources 2017-08-31 14:05:52 +02:00
Torkel Ödegaard 40ae2cef38 docs: updated changelog with #9131 2017-08-31 09:54:45 +02:00
Torkel Ödegaard 52177a45d9 influxdb: use paranthesis for influxdb queries in frontend query builder, #9131 2017-08-31 09:52:32 +02:00
Jonathan A. Sternberg bdfbc2453f Use parenthesis to surround the selected tags for influxdb queries (#9131)
The generated queries when selecting multiple tags are incorrect. In
InfluxQL, `AND` has a higher precedence than `OR` so the condition:

    WHERE "hostname" = 'server1' OR "hostname" = 'server2' AND time > now() - 5m

This is parsed as if it were:

    WHERE "hostname" = 'server1' OR ("hostname" = 'server2' AND time > now() - 5m)

But the intention is to write a query like this:

    WHERE ("hostname" = 'server1' OR "hostname" = 'server2') AND time > now() - 5m

This change modifies the generated query so it surrounds a query with
multiple conditions in parenthesis so it doesn't conflict with the time
expression in an unexpected way.

This is currently not an issue because InfluxDB doesn't actually
evaluate the condition for the time expression correctly. It just looks
through the AST for anything that looks like a time expression and then
assumes the proper format of `AND` was used rather than validating that
it was used correctly.
2017-08-31 09:33:03 +02:00
Torkel Ödegaard 9b60a63778 ux: metrics tab v3 2017-08-30 16:39:00 +02:00
Daniel Lee abeaef71cc DashExport: fix View JSON in export menu
ref #9002
2017-08-30 09:56:49 +02:00
Torkel Ödegaard 54129b1340 Merge branch 'master' of github.com:grafana/grafana
: Please enter a commit message to explain why this merge is necessary,
2017-08-29 15:52:17 +02:00
Torkel Ödegaard dda1cf1a88 Merge branch 'ace-editor' 2017-08-29 15:52:03 +02:00
Torkel Ödegaard bdb1cfb008 ace: minor fixes for ace editor 2017-08-29 15:51:54 +02:00
Torkel Ödegaard c5c5fa0db3 Update ROADMAP.md 2017-08-29 15:45:59 +02:00
Torkel Ödegaard 78ea1ea76e Updated master version to v4.5 2017-08-29 10:13:16 +02:00
Alin Sinpalean bdd239e933 Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000. (#9109) 2017-08-29 09:57:45 +02:00
Torkel Ödegaard aef4eca254 fix: removed code intented to test/replicate an issue 2017-08-29 08:57:34 +02:00
Callum Loh 74ddebc8ea Fix spelling for Hipchat notifier (#9112) 2017-08-29 08:08:51 +02:00
Alin Sinpalean 84c6caabc5 Prometheus: Fix actual step computation logic when a min_step is specified and the range is longer than min_step * 11000. 2017-08-28 15:45:51 +02:00
Torkel Ödegaard 546f903141 ds: minor fix that resets data source model when switching data source type 2017-08-28 15:29:31 +02:00
Torkel Ödegaard c2b05341e5 Merge branch 'master' of github.com:grafana/grafana 2017-08-28 13:29:36 +02:00
Torkel Ödegaard c92317bafa fix: fixed gofmt formating for #9091 2017-08-28 13:29:24 +02:00
Torkel Ödegaard 407f1ad475 Merge branch 'master' of https://github.com/pdoan017/grafana 2017-08-28 13:28:13 +02:00
Torkel Ödegaard ead7ae7635 Update CHANGELOG.md 2017-08-28 11:46:54 +02:00
Torkel Ödegaard 311fa66590 Update CHANGELOG.md 2017-08-28 11:46:13 +02:00
Torkel Ödegaard 72690b3962 Update CHANGELOG.md 2017-08-28 11:45:25 +02:00
Torkel Ödegaard 62f5770908 fix: changed modal to fixed positioned, this change makes modal maintain scroll position, fixes #8800 2017-08-28 11:34:44 +02:00
Torkel Ödegaard bf110d02d1 fix: form dropdown, escape autocomplete dropdown items, fixes #9089 2017-08-28 11:00:42 +02:00
Torkel Ödegaard e91cf28f8d elasticsearch: changed ad hoc filters from using term filters to using phrase match queries, closing #9095 2017-08-28 10:52:10 +02:00
Torkel Ödegaard 3b9fbd60d8 ux: fix for showing pending invitations tab, fixes #9094 2017-08-28 09:52:53 +02:00
Dmitry Bedrin ad14ccf4bd non_negative_difference() function in InfluxDB 1.3 (#9104)
Add support of non_negative_difference() function from InfluxDB 1.3
https://docs.influxdata.com/influxdb/v1.3/administration/differences/#functions
2017-08-28 08:53:41 +02:00
Alexander Zobnin 9375441991 ace: add default light theme 2017-08-26 13:46:39 +03:00
Alexander Zobnin ef3c543620 ace: fix directive docs 2017-08-26 12:52:32 +03:00
Alexander Zobnin 54f932e960 ace: fix error when getCompleter() wasn't passed 2017-08-26 12:48:37 +03:00
Alexander Zobnin 451ecce4ab ace: styles tweak 2017-08-26 12:36:08 +03:00
Alexander Zobnin ef162c3dc7 ace: minor css refactor 2017-08-26 12:14:45 +03:00
pdoan017 3eea5d235d Added import for container/list 2017-08-24 15:42:54 -04:00
pdoan017 d6085755c4 Added series order according to query results
Raw query results would return as expected. But when appending new series to pointsBySeries map, order of keys is random. So I've added a list to keep track of series order. Should implement FIFO rules.
2017-08-24 15:38:36 -04:00
Joseph Weigl 81d3ab37c3 Add thumbnail to card 2017-08-24 14:52:23 +02:00
Joseph Weigl 9666f45e9c Add values to the hipchat card 2017-08-24 13:40:33 +02:00
Joseph Weigl c6f7d34c55 Reorder editorconfig 2017-08-24 13:40:19 +02:00
Alexander Zobnin a0cb744746 ace: reduce docs lines width 2017-08-24 13:58:26 +03:00
Alexander Zobnin dc7616e560 ace: prometheus functions docs 2017-08-24 13:56:22 +03:00
Alexander Zobnin f7ec8e0de0 Merge branch 'master' into ace-editor 2017-08-24 12:37:18 +03:00
Torkel Ödegaard 47f8145246 Merge branch 'master' of github.com:grafana/grafana 2017-08-24 11:18:44 +02:00
Torkel Ödegaard 71c22fdbff dataproxy: removed some logging, closes #9078 2017-08-24 11:18:06 +02:00
Torkel Ödegaard 71c9582944 data source with token auth is starting to work, #9078 2017-08-24 11:07:37 +02:00
Jason Stangroome 632a5e9b97 Support Azure MySQL (#8618)
Azure's MySQL implementation appears to always respond with an Authentication Method Switch Request Packet requesting `mysql_native_password` auth even though the client's initial Handshake Response already included the native password credentials.

Most MySQL client libraries support this but Golang's go-sql-driver/mysql requires the `allowNativePasswords` DSN parameter set to enable it. Without this parameter, Grafana fails to authenticate to the database with the error message "this user requires mysql native password authentication."

References:

* https://web.archive.org/web/20160814002743/http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::AuthSwitchRequest
* https://web.archive.org/web/20160814002743/http://dev.mysql.com/doc/internals/en/connection-phase-packets.html#packet-Protocol::HandshakeResponse
* https://github.com/go-sql-driver/mysql#user-content-allownativepasswords
2017-08-24 10:24:10 +02:00
Torkel Ödegaard 3c9798bec9 datasource-proxy: token exchange 2017-08-23 17:18:43 +02:00
Daniel Lee bf4ffe41b0 Merge branch 'v4.4.x' 2017-08-23 15:19:51 +02:00
Daniel Lee e763104a6f csv: add toggle for export to Excel
Adds back feature that adds 'sep=;' text that excel needs in a csv file.
Also adds toggle to make this optional if exporting to other spreadsheet
programs. Fixes #9083.
2017-08-23 15:17:53 +02:00
Torkel Ödegaard 4f9fbcc211 dataproxy: added caching of datasources when doing data proxy requests, #9078 2017-08-23 13:31:26 +02:00
Torkel Ödegaard bcb3dfac9f Merge branch 'master' of github.com:grafana/grafana 2017-08-23 10:52:56 +02:00
Torkel Ödegaard 8bf49c51b9 dataproxy: refactoring data source proxy to support route templates and wrote more tests for data proxy code, #9078 2017-08-23 10:52:31 +02:00
jenlersadnie 0ba5706400 Fixing a minor typo under Selection Options (#9082)
Mulit => Multi
2017-08-23 08:50:22 +02:00
Torkel Ödegaard 63d6ab476a feat: data source proxy refactoring and route handling, #9078 2017-08-22 17:14:15 +02:00
Daniel Lee d19aa89ec0 docs: .ini file semicolon is comment
ref #7725
2017-08-21 21:28:49 +02:00
Daniel Lee bbf9d7677b Merge branch 'v4.4.x' 2017-08-21 21:05:43 +02:00
Daniel Lee a31d0df897 shortcuts: fixes expand/collapse all rows
Fixes #9069
2017-08-21 21:04:20 +02:00
Daniel Lee 5c2958023d Merge branch 'v4.4.x' 2017-08-21 13:45:04 +02:00
Daniel Lee 7b5019482e mysqlds: add placeholder/typeahead for localhost connection strings
for the host field on the data source config page. Fixes #9046
2017-08-21 13:44:33 +02:00
Daniel Lee 649122b4fb mysqlds: add placeholder/typeahead for localhost connection strings
for the host field on the data source config page. Fixes #9046
2017-08-21 13:43:09 +02:00
Torkel Ödegaard e3bd51e38d fix: remove duplicate set-cookie when logging in, fixes #9013 2017-08-21 11:10:59 +02:00
ericslaw 73f0bd3b4b fix link to opentsdb templating (#9039) 2017-08-16 16:57:27 +02:00
Andrei Burd 3222677493 Datasource Print the received error (#9043) 2017-08-16 16:56:51 +02:00
Matt Toback 020aae1427 Updated Grafana.net to .com 2017-08-14 11:05:28 +02:00
Torkel Ödegaard 17cb3f6e6a fix: graph fix for decimals, bug introduced by #61313478063b0e0721f204847f3c0298ea8f593f 2017-08-11 16:20:36 +02:00
Torkel Ödegaard d4dd0222fa fix: prometheus does not have two editor modes, fixes #9025 2017-08-11 12:33:56 +02:00
Daniel Lee 167995776f docs: update to tag alias
ref #9024
2017-08-11 11:30:30 +02:00
Daniel Lee 02248273ae mysqlds: remove alpha state from plugin.json 2017-08-11 10:25:37 +02:00
Daniel Lee c4feef2541 docs: http api /users - corrections + adds missing method 2017-08-11 10:24:54 +02:00
Adrian Garza 5420f271f1 added CloudWatch data source API documentation
access and secret keys are base64-encoded gibberish
2017-08-10 16:03:42 -07:00
Alexander Zobnin 776e6e2c3f ace: redefine completions for prometheus and add initial docs for functions 2017-08-10 19:58:59 +03:00
Alexander Zobnin 679ddc9696 ace: example snippet for prometheus 2017-08-10 16:49:09 +03:00
Daniel Lee b716a2595a mysqlds: add support for key/value template variables
If the template variable query has two columns named __text and __value
then return a list of key values. The value is used when the variable is
interpolated in the query. Allows mapping of texts to ids.
2017-08-10 14:42:27 +02:00
Alexander Zobnin d8d59fd8d4 ace: add custom behaviour for prometheus 2017-08-10 15:28:40 +03:00
Torkel Ödegaard c7959ff06e fix: Using table cell links and ad hoc filters together now works & looks correct, fixes #8052 2017-08-10 14:12:31 +02:00
Torkel Ödegaard d2437d3cf1 fix: ad-hoc filters now works with data source variables, fixes #8052 2017-08-10 12:04:46 +02:00
Alexander Zobnin b260a642e7 ace: fix broken karma tests (error loading ace.js ) 2017-08-10 12:33:53 +03:00
Alexander Zobnin e75b39376a ace: minor refactor 2017-08-10 11:53:55 +03:00
Alexander Zobnin 6b5400bdb6 ace: fix loading text snippets error 2017-08-10 11:23:32 +03:00
Torkel Ödegaard 149e694ce6 ace: prometheus completion improvements 2017-08-10 10:08:09 +02:00
Torkel Ödegaard 0b2cc404ff ace: working on editor completion stuff 2017-08-10 09:33:17 +02:00
Torkel Ödegaard b9540e4c49 ace: minor ace theme tweaks 2017-08-09 21:12:15 +02:00
Daniel Lee 43fa852cc1 mysql: change logging from into to debug for scan 2017-08-09 19:33:09 +02:00
Daniel Lee 1105bb371f mysqlds: adds support for template variables
Fixes #8855
2017-08-09 19:32:53 +02:00
Daniel Lee 59513ff963 tempvar: bug fix for duplicate template var
and a fix for when selecting the same value twice in
a template variable if it is not multi select. It threw an
exception on the second selection
2017-08-09 14:28:23 +02:00
Torkel Ödegaard 459a8ed695 ace: minor changes to ace directive 2017-08-09 11:43:02 +02:00
Torkel Ödegaard 80f5c914e8 ace: removed the old text areas 2017-08-09 11:06:21 +02:00
Torkel Ödegaard 68cac6ccb5 Merge branch 'master' into ace-editor 2017-08-09 10:51:31 +02:00
Torkel Ödegaard 668cb3c1ef Merge branch 'v4.4.x' 2017-08-09 10:37:06 +02:00
Torkel Ödegaard e8a20643d6 feat: store last seen date for users and present in stats and user lists, closes #9007 2017-08-09 10:36:41 +02:00
Alexander Zobnin 5c0773023f code-editor: increase autocomplete popup size 2017-08-09 11:23:05 +03:00
Alexander Zobnin 1c8c746956 code-editor: prometheus metrics autocomplete 2017-08-09 10:58:00 +03:00
Torkel Ödegaard eac0d30e99 Merge branch 'v4.4.x' 2017-08-09 07:20:52 +02:00
Torkel Ödegaard 26ad025705 feat: added os to stats 2017-08-09 07:20:37 +02:00
Alexander Zobnin aa670244f1 code-editor: initial prometheus syntax definition 2017-08-08 22:27:47 +03:00
Chris Burkhart 3e0b92d6fe Enable datasources to be able to round off to a UTC day properly 2017-08-08 09:34:41 -07:00
Alexander Zobnin e0bbb74b0c code-editor: test editors for MySQL and prometheus 2017-08-08 18:42:26 +03:00
Alexander Zobnin 0e0e60317e code-editor: tabSize option 2017-08-08 18:41:11 +03:00
Alexander Zobnin 152c4170da code-editor: onChange option and usage docs 2017-08-08 18:31:13 +03:00
Torkel Ödegaard 1652426dfe :Merge branch 'master' of github.com:grafana/grafana 2017-08-08 17:08:49 +02:00
Torkel Ödegaard 68c4ce34d5 fix: templating issue with data source variables, can now be used right away in other query variables and panels (without page reload), fixes #7510 2017-08-08 17:08:35 +02:00
Torkel Ödegaard fec41cf038 Update CHANGELOG.md 2017-08-08 16:21:20 +02:00
Torkel Ödegaard fee1e6df41 Merge branch 'master' of github.com:grafana/grafana 2017-08-08 16:18:26 +02:00
Torkel Ödegaard addeccb4f0 Merge branch 'v4.4.x' 2017-08-08 16:18:08 +02:00
Torkel Ödegaard a47b31ac62 fix: MySQL/Postgress max_idle_conn default was wrongly set to zero, which does not mean unlimited but zero, which in practice disables connection pooling, not good. now max idle conn is set to golang's default which is 2, fixes #8513 2017-08-08 16:17:52 +02:00
Alexander Zobnin cd16db4d09 code-editor: use data- attributes for editor options 2017-08-08 16:28:51 +03:00
Daniel Lee 563795245a mysqlds: support for more column types
Includes integration test for most column types. Fixes #8918
2017-08-08 15:24:41 +02:00
Alexander Zobnin 59d1654df4 code-editor: adjust editor styles 2017-08-08 16:05:15 +03:00
Daniel Lee 2fb25d8fa4 mysqlds: add tests for new macros 2017-08-08 14:40:27 +02:00
Brad Lhotsky a8ac215039 Add a few more MySQL macros:
* $__timeFrom() -> Returns the dashboard 'from' suitable for use querying
  against a MySQL TIMESTAMP field.
* $__timeTo() -> Returns the dashboard 'to' suitable for use querying
  against a MySQL TIMESTAMP field.
* $__unixEpochFiler(column) -> If you store timestamps as UNIX epoch's,
  this builds: column > 'from' AND column < 'to'
* $__unixEpochFrom() -> Returns the dashboard 'from' suitable for use querying
  against a MySQL integer field (UNIX epochs)
* $__unixEpochTo() -> Returns the dashboard 'to' suitable for use querying
  against a MySQL integer field (UNIX epochs)
2017-08-08 14:40:27 +02:00
Alexander Zobnin eb944551c0 code-editor: add autocomplete styles 2017-08-08 15:32:23 +03:00
Alexander Zobnin 928fedaad7 code-editor: minor refactor 2017-08-08 15:19:15 +03:00
Torkel Ödegaard d3680d290c fix: graphite issue with metricFind and sending from/until in normal format, fixes #8997 2017-08-08 13:51:54 +02:00
Torkel Ödegaard 83beff300b Merge branch 'v4.4.x' 2017-08-08 11:26:45 +02:00
Torkel Ödegaard 64b5153e7d fix: change view json to use the grafana built json viewer, fixes #9002 2017-08-08 11:26:16 +02:00
Torkel Ödegaard 781dd25c82 Merge branch 'elasticsearch-filtering' 2017-08-08 11:09:00 +02:00
Torkel Ödegaard f979e95820 tablepanel: minor update to table panel, #8052 2017-08-08 11:08:51 +02:00
Torkel Ödegaard 1507c02ebb Merge branch 'feat-8539' of https://github.com/alexanderzobnin/grafana 2017-08-08 09:33:23 +02:00
Torkel Ödegaard 7c14ade623 Merge branch 'v4.4.x' 2017-08-08 09:28:41 +02:00
Torkel Ödegaard 7031f7e772 fix: sqlite3 and storing/displaying dates used wrong timezone, fixes #8996 2017-08-08 09:28:16 +02:00
Alexander Zobnin bf8171fd63 code-editor: initial autocomplete 2017-08-07 21:30:36 +03:00
Alexander Zobnin b74fe05fec code-editor: support language mode 2017-08-07 20:19:15 +03:00
Alexander Zobnin ecb66e7678 code-editor: disable depreacation warning 2017-08-07 19:43:58 +03:00
Alexander Zobnin e4dabb657c code-editor: initial directive for rich code editor (ace) 2017-08-07 19:31:50 +03:00
Torkel Ödegaard 48fa642727 Update CHANGELOG.md 2017-08-07 16:03:03 +02:00
Torkel Ödegaard 3e392ef921 ux: added minor help tip to graphite ds settings 2017-08-07 15:55:05 +02:00
Torkel Ödegaard 0e2b809f7e docker: added graphite v1.x docker block 2017-08-07 15:12:12 +02:00
Alexander Zobnin 4fe79edd40 Graphite 1.0 functions (#8987)
* graphite-ds: add graphite version to config editor

* graphite-ds: modify add-graphite-function to show only version-related functions

* graphite-ds: refactor, move func filtering to gfunc.js

* graphite-ds: add new functions for graphite 1.0.x

* graphite-ds: fix unit tests (add jsonData)
2017-08-07 15:10:59 +02:00
Alexander 35522c475f Fix #8998 by not overriding GOMAXPROCS (#8999) 2017-08-07 15:02:04 +02:00
Daniel Lee 92f71136e6 Update CHANGELOG.md 2017-08-07 13:40:25 +02:00
Daniel Lee ee835242ca Merge branch 'v4.4.x' 2017-08-07 13:14:24 +02:00
Daniel Lee def45f55da docs: update installation for version 4.4.3 2017-08-07 13:11:57 +02:00
Daniel Lee 54c79c5648 updated version to v4.4.3 2017-08-07 10:50:18 +02:00
Daniel Lee 649fe7e462 Merge branch 'v4.4.x' 2017-08-07 10:47:23 +02:00
Daniel Lee 0d25357367 build: remove downloaded pkg files after publish 2017-08-07 10:46:37 +02:00
Daniel Lee aa889e59a1 tests: fix after interface change 2017-08-07 10:20:46 +02:00
Torkel Ödegaard d285045ff6 removed unused images 2017-08-07 10:11:39 +02:00
Torkel Ödegaard 132cd36b0c Delete fav16.png
fixes #8989
2017-08-07 10:10:37 +02:00
Daniel Lee 1e5778174c login: regenerates session id on login 2017-08-07 10:00:29 +02:00
Patrick Tescher c082372ffe Add a Safari Pinned Tab Icon (#8983)
Icon adopted from grafana_icon.svg

Reference document:
https://developer.apple.com/library/content/documentation/AppleApplicati
ons/Reference/SafariWebContent/pinnedTabs/pinnedTabs.html
2017-08-07 09:39:36 +02:00
Torkel Ödegaard 4f9cfcd632 Update CHANGELOG.md 2017-08-07 09:35:32 +02:00
Torkel Ödegaard 0bd03098ea Update CHANGELOG.md 2017-08-07 09:31:31 +02:00
Torkel Ödegaard ee297487a5 Update CHANGELOG.md 2017-08-07 09:31:04 +02:00
Torkel Ödegaard 8930e04f2b Update CHANGELOG.md 2017-08-07 09:29:54 +02:00
Louis Ventre 97d1676fe8 Add time extremity with InfluxDB (#8722) 2017-08-07 09:26:32 +02:00
Jesse White f547c93a4f fix: hide modals when pressing Esc, fixes #8988 (#8994) 2017-08-07 09:23:33 +02:00
Torkel Ödegaard 58528a951a Merge branch 'master' of github.com:grafana/grafana 2017-08-04 14:05:00 +02:00
Torkel Ödegaard 6e0f767af7 Update CHANGELOG.md 2017-08-04 14:04:16 +02:00
Torkel Ödegaard 0a23f3dd28 Merge branch 'master' of github.com:grafana/grafana 2017-08-04 14:02:18 +02:00
Torkel Ödegaard 26766ddb27 Merge branch 'v4.4.x' 2017-08-04 14:02:01 +02:00
Torkel Ödegaard c0b0a54a8f fix: search bug where search was hidden when you click starred or tags filter links, fixes #8981 2017-08-04 14:01:09 +02:00
Sébastien Fievet 8e618bc169 Fix some typos in alerting documentation (#8986) 2017-08-04 10:08:41 +01:00
Daniel Lee 6131347806 graph: adds decimals option for y-axis
Fixes #8187
2017-08-03 17:57:04 +02:00
Daniel Lee ef0c90b9ca graph: change tick decimal calculation for y-axis
Fixes #8872. Use the automatic calculation by Flot to get the
number of decimal places for ticks on the y-axis rather than
the number of decimal places for the min value.
2017-08-03 16:58:31 +02:00
Daniel Lee 1ce134cc6f docs: fixes #8972. Note on clustering and alerting. 2017-08-03 15:37:04 +02:00
David Wittman 8f5fbb4254 Fix typo in PagerDuty notifier options template (#8978) 2017-08-03 08:57:59 +02:00
Torkel Ödegaard c7ca4830a8 Merge branch 'v4.4.x' 2017-08-03 08:56:46 +02:00
Torkel Ödegaard 1372d2e517 fix: update user permissions validation was not working properly, fixes #8977 2017-08-03 08:56:34 +02:00
Alexander Zobnin 77b7f4b376 heatmap: add unit tests for convertToCards() 2017-08-02 21:27:10 +03:00
Alexander Zobnin c7e8b98d14 heatmap: minor refactor, don't repeat cards stats calculation 2017-08-02 21:24:59 +03:00
Torkel Ödegaard 8d7186d40d Merge branch 'v4.4.x' 2017-08-02 17:33:19 +02:00
Torkel Ödegaard 3dc9d76b38 fix: viewer role fix, fixes #8976 2017-08-02 17:33:06 +02:00
Torkel Ödegaard a5bdfec0de ES: return .raw fields in field lookups, closes #8975 2017-08-02 16:52:43 +02:00
Daniel Lee b5017d1e18 docs: var in singlestat panel. Fixes #8563 2017-08-02 16:44:43 +02:00
Daniel Lee b241b98196 singlestat: fix for variable
in the prefix or postfix fields and when adding a gauge.
Previously the template variable substition was only done
when not rendering the gauge.
2017-08-02 16:40:26 +02:00
Torkel Ödegaard a5d5f3d82f feat: add ad hoc filters directly from table panel cells, kibana 3 style, #8052 2017-08-02 16:15:22 +02:00
Torkel Ödegaard c17b5d1306 table: minor table options improvement 2017-08-02 12:34:36 +02:00
Torkel Ödegaard ede827f5c0 feat: Elasticsearch change to how queries without date histogram are transformed into Grafana data stucture, now it is processed into a table structure instead of json structure 2017-08-02 12:15:39 +02:00
Torkel Ödegaard 6224a25e42 feat: Elasticsearch filtering wip, moved to typescript 2017-08-02 11:16:37 +02:00
Alexander Zobnin f7ea08dba7 heatmap: fix rendering tests 2017-08-01 16:51:55 +03:00
Phil Porada 814d164e5b Typo fix (#8966) 2017-08-01 14:44:57 +01:00
Alexander Zobnin 663a3293ee heatmap: some legend fixes 2017-08-01 16:23:01 +03:00
Alexander Zobnin b01a4e6583 heatmap: use the same color for selection as for graph 2017-08-01 16:21:40 +03:00
Alexander Zobnin f64ebf538c heatmap: minor legend fixes 2017-08-01 15:25:52 +03:00
Alexander Zobnin 91a921e12d heatmap: add show legend option 2017-08-01 14:07:52 +03:00
Alexander Zobnin e72baca4a7 heatmap: fix black selection area 2017-08-01 13:54:09 +03:00
Alexander Zobnin 2aa26c98b6 heatmap: initial legend 2017-08-01 13:53:16 +03:00
Torkel Ödegaard ae3e869d70 updated download links in docs 2017-08-01 10:18:48 +02:00
Torkel Ödegaard deab5a54bf Merge branch 'master' of github.com:grafana/grafana 2017-08-01 09:49:37 +02:00
Torkel Ödegaard ecfe28d7ac packaging: added strech to publish script, closes #8737 2017-08-01 09:49:26 +02:00
Torkel Ödegaard 9fb22ef86c Update CHANGELOG.md 2017-08-01 09:44:45 +02:00
Torkel Ödegaard 5d2054323b Merge branch 'aws-instance-attribute-tags' of https://github.com/paco3346/grafana into paco3346-aws-instance-attribute-tags 2017-08-01 09:38:58 +02:00
Torkel Ödegaard 1e4b0f01d6 Merge branch 'v4.4.x' 2017-08-01 09:18:39 +02:00
Torkel Ödegaard 6d9cbdd59e updated version to v4.4.2 2017-08-01 09:14:49 +02:00
Torkel Ödegaard c4eadb576e fix: graphite bug fix introduced in recent commit 2017-07-31 22:39:56 +02:00
Torkel Ödegaard 7de1c0eaa2 Update CHANGELOG.md 2017-07-31 22:37:11 +02:00
Torkel Ödegaard 73a1a262ef Merge branch 'v4.4.x' 2017-07-31 22:33:36 +02:00
Torkel Ödegaard e9989cb690 fix: make it easier to close search by clicking outside result container, fixes #8848 2017-07-31 22:33:22 +02:00
Torkel Ödegaard 0fcc87010a fix: cloudwatch fix for templating namespace argument to metrics tempalting function, fixes #8965 2017-07-31 22:30:49 +02:00
Mitsuhiro Tanda 91a533d948 (cloudwatch) high resolution custom metrics (#8958)
* support 1 second resolution Custom Metrics

* upgrade to aws-sdk-go v1.10.18

* simplify period calculation

* add test

* fix period calculation bug
2017-07-31 21:19:19 +02:00
squain ede6d71e72 Fix typo in alert_howto.html (#8964) 2017-07-31 21:16:39 +02:00
Torkel Ödegaard 4d82a1076a Create CODE_OF_CONDUCT.md (#8960) 2017-07-31 17:31:05 +02:00
Torkel Ödegaard 44fbd3ec9f feat: calls to Graphite api /metrics/find now include panel or dashboard time ranges in some scenarios, closes #8055 2017-07-31 17:21:25 +02:00
Alexander Zobnin c79a68dcd1 heatmap: refactor, build cards before rendering 2017-07-31 18:15:03 +03:00
Alexander Zobnin 55b24be115 heatmap: refactor, directive for color legend 2017-07-31 17:45:05 +03:00
Torkel Ödegaard bf7516d9bf Update CHANGELOG.md 2017-07-31 16:06:29 +02:00
Torkel Ödegaard 81dc64d4ec Update CHANGELOG.md 2017-07-31 16:05:56 +02:00
Torkel Ödegaard c7c5730c40 Merge branch 'v4.4.x' 2017-07-31 16:04:31 +02:00
Torkel Ödegaard 34cda65998 fix: png rendering api & timeout parameter now works as it should AND default render timeout increased from 30 to 60 seconds, fixes #8710 2017-07-31 16:04:04 +02:00
Torkel Ödegaard 61d8eb1fac Merge branch 'v4.4.x' 2017-07-31 15:07:22 +02:00
Torkel Ödegaard d630f3d59e Merge branch 'external-user-mng' into v4.4.x 2017-07-31 15:07:01 +02:00
Torkel Ödegaard 06e87c151f feat: added settings to sample ini #8768 2017-07-31 15:04:47 +02:00
Torkel Ödegaard 73563d087c feat: more work on #8768 2017-07-31 14:39:33 +02:00
Torkel Ödegaard 23558c61d4 feat: wip work on #8768 2017-07-31 13:03:42 +02:00
Alexander Zobnin ef9dd014c7 heatmap: add color scale options, issue #8539 2017-07-31 14:03:03 +03:00
Torkel Ödegaard 5406481e7b Update CHANGELOG.md 2017-07-31 12:17:46 +02:00
Torkel Ödegaard 510ad001b4 Update CHANGELOG.md 2017-07-31 12:16:29 +02:00
Dave Hall 0c70d271dc Support large github organisations (#8846)
* Add new HttpGetResponse struct type
* Modify HttpGet() return to use HttpGetResponse
* Look up _all_ the teams the user is a member of
2017-07-31 12:13:29 +02:00
Cedric Cellier 417c5163dd Fix typos (#8954)
Some being user visible.
2017-07-31 12:12:28 +02:00
Fredrik Wendt 5542309170 fixed incorrect header text (#8952)
Status code now replaced with Query parameters
2017-07-29 15:34:22 +01:00
Fredrik Wendt 6b344d0158 removed incorrect HTTP response data (#8949)
the example response body contained incorrect out-of-place data, presumably from a copy-paste operation
2017-07-28 09:25:30 +02:00
Daniel Lee 22758d5112 Merge branch 'v4.4.x' 2017-07-27 14:40:33 +02:00
Daniel Lee 7b768bca3f singlestat: change threshold check in flot gauge
Fixes #5515. Flot gauge has its own threshold check that is different
from the threshold check in singlestat. This changes the flot check to
be exclusive (same as the singlestat check). E.g. if the threshold is
10, then the value 10 is over the threshold.
2017-07-27 14:34:29 +02:00
amitkumar912 c4683f1ae8 Opentsdb datasource labeling fix (#8929)
* Fix Labeling issue when hiding Queries.

Issue #8928

* Fix spacing.

* Replacing tabs with spaces.

* Fix for jshint
2017-07-26 21:27:42 +02:00
Alexander Zobnin cb8ecb2d5f Heatmap fixes (adapted for v4.4.x branch) (#8920)
* heatmap: fix converting error when series contains 0 and log scale is selected, issue #8884

* heatmap: fix app crash when Y min set to 0 with log scale

* heatmap: fix tooltip for 'zero' buckets in log scale

* heatmap: fix tooltip histogram for log scales

* heatmap: fix flicker of the highlighted element

this was caused by too often fired mouseenter/mouseleave events

* heatmap: fix missing X axis option for log scales

* heatmap: fix missing zero bucket in tooltip histogram
2017-07-25 16:28:29 +02:00
Torkel Ödegaard ce4939bd56 Update CHANGELOG.md 2017-07-24 12:40:35 +02:00
Torkel Ödegaard d46fd890a5 Merge branch 'v4.4.x' 2017-07-24 12:38:39 +02:00
Torkel Ödegaard 8ca08d65e7 docs: updated configuration docs with new defaults, #8743 2017-07-24 12:37:58 +02:00
Torkel Ödegaard f5ed5c6529 settings(change): changed default value for allow sign up to false, closes #8743, and changed default option allow_org_create to false 2017-07-24 12:36:42 +02:00
Torkel Ödegaard 9825cd1ebb Update CHANGELOG.md 2017-07-24 12:32:22 +02:00
Torkel Ödegaard 0f33ac9e10 Merge branch 'master' of github.com:grafana/grafana 2017-07-24 12:30:43 +02:00
Torkel Ödegaard 24a79a6bea Merge branch 'v4.4.x' 2017-07-24 12:30:28 +02:00
Torkel Ödegaard 723f5bc9e8 fix: dsahboard_version data column type changed to MEDIUMTEXT, fixes #8813 2017-07-24 12:30:13 +02:00
Torkel Ödegaard 287c222fc7 Update CHANGELOG.md 2017-07-24 12:25:49 +02:00
Torkel Ödegaard 6956110497 Merge branch 'master' of github.com:grafana/grafana 2017-07-24 12:23:33 +02:00
Torkel Ödegaard f500dfd1e5 Update CHANGELOG.md 2017-07-24 12:23:07 +02:00
Torkel Ödegaard cd0e1a8978 Merge branch 'v4.4.x' 2017-07-24 12:21:43 +02:00
Torkel Ödegaard 2d2800e710 fix: url did not update correctly when closing settings view by using ESC key, fixes #8869 2017-07-24 12:21:30 +02:00
Daniel Lee 4a678c2884 influxdb: fix for adding math query part
Fixes #8870. Fixes out of bound exception on adding a math query part
when there is no group by interval (or only one query part).
2017-07-22 01:31:26 +02:00
Nicholas Nadeau 1a25b78ef2 homogenized docker run command (#8907)
There are three locations where the `docker run` command is referenced:
- 2x http://docs.grafana.org/installation/docker/
- 1x https://grafana.com/grafana/download?platform=docker

The fix syncs the given `docker run` command arguments with the other two.
2017-07-21 21:46:54 +02:00
Kakuya Ando bbfdfc012f fix(prometheus) when tag value duplicate, tags not working. (#8040) 2017-07-21 09:51:25 +02:00
Mitsuhiro Tanda b16b649c9b (cloudwatch) add new elb metrics (#8894) 2017-07-20 14:12:56 +02:00
Mitsuhiro Tanda 9d50ab8fb5 (cloudwatch) check auth type before assume role (#8895) 2017-07-20 14:11:51 +02:00
Alexander Zobnin af56cc4c28 Panel Alertlist: use dashboard timezone (#8880)
* panel-alertlist: use dashboard timezone, fixes #8874

* alert state history: use dashboard timezone, issue #8874

* alert state history: minor refactor
2017-07-19 20:45:57 +02:00
Mitsuhiro Tanda e8157f01ec add new dashboard shortcut 2017-07-19 17:54:34 +09:00
Mitsuhiro Tanda aecc6860e3 set focus on text field when opening panel/query editor (#8879)
* (prometheus) set focus to top expression when opening editor

* (text panel) set focus to top expression when opening editor
2017-07-19 10:33:04 +02:00
Alexander Zobnin 9bbc942534 table-panel: clickable cell link - draft (#8738)
* table-panel: clickable cell link - draft

* table-panel: clickable cell link - fix link target option

* table-panel: fix undefined columnStyle.link

* table-panel: option to highlight cell with link

* table-panel: render variables for all cells in row

* table-panel: remove cell highlighting

* table-panel: add help for URL field

* linkPopover directive for link info in table panel

* table-panel: add link info popover to cells

* table-panel: use native popover instead directive

* table-panel: link drop refactor, remove unused code

* table-panel: fix unclickable link when drop is opened

* refactoring: minor refactoring to #8738, do not think we need a full blown popover for the links, simple tooltip is enough and more efficient, sadly we do not have a modern tooltip framework, still using old bootstrap 2.3 tooltip

* table-panel: add tests for link rendering
2017-07-18 20:59:34 +02:00
Torkel Ödegaard 13c966c178 Update CHANGELOG.md 2017-07-18 20:59:16 +02:00
Alexander Gängel 4073949af0 add templating for prometheus monitoring other promethues (#8845) 2017-07-18 19:52:29 +02:00
Mitsuhiro Tanda a6920eb2ff (prometheus) replace each by for (#8881) 2017-07-18 19:50:44 +02:00
Mitsuhiro Tanda 32f9a42d5e Fix performance degradation by always setting fill = 0.001 (#8868)
* add benchmark

* fix, prevent plotLineArea() call if fill == 0

* remove benchmark
2017-07-17 20:50:58 +02:00
Daniel Koehler c5f6cf0809 fix for wrong locale and text issues #8840 (#8854)
fixes https://github.com/grafana/grafana/issues/8840
by setting a default locale. Also uses fromNow(true) to work arround the replace.
2017-07-14 21:58:27 +02:00
Matt Toback a045f175b6 Fixed typo 2017-07-14 12:20:04 -04:00
Adam Johnson 17d57ab074 docs(testdata): add missing word (#8856) 2017-07-13 19:52:59 +02:00
Torkel Ödegaard 74984f8da6 Update latest.json 2017-07-12 10:19:02 +02:00
Torkel Ödegaard e4950c2dc1 fix: elasticsearch with template variable with terms agg on IP field, fixes #8662 2017-07-12 07:43:30 +02:00
bergquist 4844bf9be3 docs(prometheus): updates invalid template example 2017-07-12 07:37:44 +02:00
ajrnz 43974898c1 Interpolate the field property in elastic search term queries (#8663)
* Interpolate the field property in elastic search term queries

* more defensive interpolation of query.field in ES templates
2017-07-12 07:25:56 +02:00
Torkel Ödegaard bb3bcbe6a1 fix: for issue in graph panel axes labels when iframe embedding, fixes #8827 2017-07-12 07:12:05 +02:00
gomlgs 228c210379 Cloudwatch: Fix bug with obtaining IAM roles within ECS containers. (#8766)
Fixes #8750.
2017-07-12 06:55:59 +02:00
Alexander Gängel 92937c591f upgrade grunt-sass to 2.0.0 (#8808) 2017-07-12 06:55:15 +02:00
Denis Doria 89822acf38 More precise detection for self reference variable on templates (#8814)
This should close the bug #8773
2017-07-12 06:54:32 +02:00
Moody Saada 2d99518f90 Update annotations.md typo (#8830) 2017-07-12 06:53:28 +02:00
Alin Sinpalean 5bffdfe9a4 When converting Prometheus results to table, handle the case where the returned series have non-uniform sets of labels. (#8826) 2017-07-12 06:52:59 +02:00
Liang Jiameng f8d22385ce add a placeholder to DingTalk Url (#8820) 2017-07-10 16:51:03 +02:00
Daniel Lee 1dedc886f2 docs: DingDing notifier 2017-07-10 12:22:21 +02:00
Daniel Lee 1ccfca109f docs: instructions for DingDing notifier 2017-07-10 12:16:40 +02:00
Daniel Lee 68e7219135 docs: add missing parameter api call 2017-07-09 02:00:50 +02:00
Daniel Lee 3a075be7e9 cloudwatch: make dimension text in alias popover clearer 2017-07-07 18:17:05 +02:00
Daniel Lee fc82de1543 docs: style fix 2017-07-07 13:00:13 +02:00
Daniel Lee c296e73b83 docs: x-axis mode for graph panel 2017-07-07 12:25:42 +02:00
0x6875790d0a a622c55b1b (feat) Add image to LINE notify (#8771) 2017-07-07 11:20:27 +02:00
Daniel Lee e6f9546a7c api: add no cache headers for IE11
Adds pragma and expires headers for API calls so that IE11 does not
cache GET calls. Ref #5356
2017-07-06 18:56:22 +02:00
Daniel Lee fe3bcd3678 Merge branch 'v4.4.x' 2017-07-06 10:11:07 +02:00
Torkel Ödegaard cff1c37064 fix: InfluxDB direct access with normal inflxudb credentials was not sent correctly, fixes #8789 2017-07-06 09:46:31 +02:00
Torkel Ödegaard e5b499a958 fix: Text area css issue prevented scrolling, fixes #8797 2017-07-06 09:36:57 +02:00
Torkel Ödegaard 1994b767d3 fix: InfluxDB direct access with normal inflxudb credentials was not sent correctly, fixes #8789 2017-07-05 22:15:28 +02:00
Daniel Lee eca11e862e docs: update for panel sharing options 2017-07-05 22:14:04 +02:00
Min-Zhong "John" Lu fbff905c57 Fix broken table row in prometheus.md (#8779)
"Metric Lookup" row in Query editor was broken :(
2017-07-05 22:14:03 +02:00
Daniel Lee a4266319ad packaging: v4.4.1 2017-07-05 22:14:03 +02:00
Daniel Lee 49113c1ccb Add v4.4.1 patch release 2017-07-05 22:14:03 +02:00
Daniel Lee 6d4c29ea9b migrations: dashboard version migration handles nulls
If a dashboard has a null value for updated_by then the migration
for the dashboard version table fails. This change uses coalesce to
set -1 instead of null when inserting into the created_by column
which has a non-null constraint. Fixes #8783.
2017-07-05 22:14:03 +02:00
Daniel Lee ab53b05c39 docs: fixes #8785 2017-07-05 22:14:03 +02:00
Daniel Lee ba1c79b7a8 package.json to v5.0.0-pre1 2017-07-05 22:14:03 +02:00
Daniel Lee de9ebc9a74 packaging: updates for v4.4.0 2017-07-05 22:12:51 +02:00
Daniel Lee 9341412acc release: v4.4.1 2017-07-05 22:06:00 +02:00
Daniel Lee 16cda723d3 migrations: dashboard version migration handles nulls
If a dashboard has a null value for updated_by then the migration
for the dashboard version table fails. This change uses coalesce to
set -1 instead of null when inserting into the created_by column
which has a non-null constraint. Fixes #8783.
2017-07-05 22:06:00 +02:00
Daniel Lee 36a1ab48c5 packaging: updates for v4.4.0 2017-07-05 22:04:27 +02:00
Daniel Lee 3583057155 release: v4.4.0 2017-07-04 23:42:22 +02:00
Jesse White 1940b33dc1 fix: handling of http errors without any data (#8777) 2017-07-04 22:55:13 +02:00
Daniel Lee d20455ab5f changelog: note for histogram fix 2017-07-04 22:45:33 +02:00
Alexander Zobnin 934c0fea6f histogram: improved ticks rendering 2017-07-04 21:49:57 +02:00
Alexander Zobnin c1c1bcb874 histogram: don't cut negative values, issue #8628 2017-07-04 21:49:09 +02:00
Daniel Lee 1da98f5e1e Revert "Histogram fix (#8727)"
This reverts commit 8634c9d457.
2017-07-04 21:48:39 +02:00
Daniel Lee 74093c700f api: adds no-cache header for GET requests
Fixes #5356. Internet Explorer aggressively caches GET requests which
means that all API calls fetching data are cached. This fix adds a
Cache-Control header with the value no-cache to all GET requests to
the API.
2017-07-04 21:26:05 +02:00
Daniel Lee f773a9b4c3 docs: small change 2017-07-04 21:17:43 +02:00
Daniel Lee 205be91a84 changelog: note for DingDing notifier 2017-07-04 15:25:44 +02:00
Liang Jiameng 109fd998ed Add a new notifier : DingTalk (#8473)
* add alerting notifier: DingDing

* add alerting notifier: DingDing

* add dingding unit test

* add dingding unit test

* delete debug code & format code style.

* fix build failed: dingding_test.go
2017-07-04 15:16:32 +02:00
Daniel Lee a5afd8152d docs: small update 2017-07-03 21:32:12 +02:00
Daniel Lee 3ae5f7c632 docs: built-in variables, $__interval
Fixes #8344. Documents the $__interval, $__interval_ms and $timeFilter
variables.
2017-07-03 20:44:19 +02:00
Daniel Lee a71423481b changelog: update 2017-07-03 18:07:51 +02:00
Daniel Lee 20a2334c87 docs: spelling 2017-07-03 14:47:54 +02:00
Ben Tranter 6f4c7a4d65 Add dashboard version history documentation (#8741)
Adds docs for the new API endpoints, and for the dashboard history feature.
2017-07-03 14:29:30 +02:00
Torkel Ödegaard e269b3b2a0 Merge branch 'refactor-basic-diff' of https://github.com/walmartlabs/grafana into walmartlabs-refactor-basic-diff 2017-07-03 09:49:53 +02:00
Alexander Zobnin 1499c2bf74 Fix User/Org default timezone bug (#8748)
* dashboard: don't override timezone if default selected, issue #8503

* dashboard: hide UTC icon immediately after timezone changing
2017-07-03 09:20:55 +02:00
Daniel Lee b8aa203707 signup: fix email sent logic for tempuser
Fixes #8656 and properly sets the email_sent and email_sent_on fields
for a tempuser (signup user).
2017-06-30 20:21:08 +02:00
Ben Tranter 1fd7b60efe Add more information to basic diff logic 2017-06-29 14:38:48 -04:00
Daniel Lee fb99ddf295 influxdb: tweak to help text 2017-06-29 13:58:54 +02:00
Daniel Lee 8683aff3e9 appveyor: build fix for go tests 2017-06-29 12:19:57 +02:00
Daniel Lee 7ea5930a90 alerting: minor fix 2017-06-29 12:18:10 +02:00
Alexander Zobnin 97a7081b57 Fix 8706 (#8734)
* heatmap: fix incorrect time for UTC timezone, fixes #8706

* heatmap: fix tests for time format
2017-06-29 10:40:28 +02:00
Alexander Zobnin 8634c9d457 Histogram fix (#8727)
* histogram: don't cut negative values, issue #8628

* histogram: add percent/count option

* histogram: add tests for values normalizing

* histogram: improved ticks rendering

* histogram: fix default value in axes editor
2017-06-28 17:12:55 +02:00
Daniel Lee 3ac306a72e playlist: fixes #6727. Remember Kiosk mode 2017-06-28 16:29:46 +02:00
Daniel Lee 91ad260517 build: on windows, ignore linux packaging 2017-06-28 09:35:33 +02:00
Daniel Lee 8973b48f96 setting: add tests for windows 2017-06-28 09:35:33 +02:00
Daniel Lee 1a61d2814c docs: updates to build from source 2017-06-28 09:35:33 +02:00
Daniel Lee b674b9dba2 heatmap: small fix for tooltip auto decimals
Closes #8717
2017-06-27 22:25:04 +02:00
Alexander Zobnin 83fbace6b9 heatmap: fix tooltip decimals calculation 2017-06-27 22:24:27 +02:00
Alexander Zobnin 12644372c4 heatmap: fix scaledDecimals calculation (use the same method as in flot.js) 2017-06-27 22:24:27 +02:00
Alexander Zobnin c12a7d7f59 heatmap: adjust tests for fixed decimals calc 2017-06-27 22:24:27 +02:00
Alexander Zobnin 7c840cdf38 heatmap: fix tooltip decimals 2017-06-27 22:24:27 +02:00
Alexander Zobnin b63d2b3279 heatmap: fix Y axis decimals with log scale 2017-06-27 22:24:27 +02:00
Alexander Zobnin 8e5672aee6 heatmap: fix Y axis value rounding with linear scale 2017-06-27 22:24:27 +02:00
Daniel Lee 53ea9cfbcf docs: update ha_setup with alerting deduping 2017-06-27 16:59:40 +02:00
Alexander Zobnin 1deeef9e91 Table panel: add option for preserving text formatting (#8708)
* table_panel: add option for preserving text formatting

* table_panel: fix undefined style error

* table_panel: fix class adding (add space before 'class')

* table_panel: aligin Type options labels
2017-06-27 06:38:49 -04:00
Daniel Lee 10127e8ac9 docs: small updates 2017-06-26 17:42:50 +02:00
Louis Law 8c8b1dde8a [fix] fix minor issue in gitignore file. (#8694) 2017-06-25 11:34:23 -04:00
Denis Doria e8d01218d8 Fix label showing up when Axes are configured to not be displayed (#8697)
This should close the issue #8695
2017-06-25 14:23:37 +02:00
Denis Doria 5aac2d2078 Include user Id on the lookup api (#8698)
Implements feature request #8682
2017-06-25 14:23:03 +02:00
Torkel Ödegaard 60da730c95 mysql: fix for TIME columns, fixes #8534 2017-06-23 12:55:40 -04:00
Torkel Ödegaard 73fcc919cd change: made dashboard save message optional 2017-06-23 11:49:32 -04:00
Torkel Ödegaard be29357d22 fix: added missing url route for annotation state history delete, fixes #8660 2017-06-23 11:48:58 -04:00
Torkel Ödegaard 86a73c359b fix: data source selector did not show, fixes #8692 2017-06-23 11:32:17 -04:00
Ben Tranter a3d22ae9c7 Document logic behind basic diff 2017-06-22 18:23:31 -04:00
Ben Tranter b54b43a42e Add tests for diff formatters 2017-06-22 18:08:37 -04:00
Haidara Mohamed El Mouctar bc6a57ce32 [Docs] Add documentation for max_idle_conn and max_open_conn (#8675) 2017-06-21 10:41:56 -04:00
Daniel Lee 2479e51a6b mysql: Null value should not be considered as previous value
fixes #8655
2017-06-20 02:02:05 +02:00
Torkel Ödegaard 2a93bed453 ux: aligned tabbed view body with header title 2017-06-19 19:22:44 -04:00
Denis Doria eaba985f25 Fix issue with kilovolt-ampere reactive (kvar) #8596 (#8650)
This changes the css to handle overflow of the string on the input fields.
If an overflow happends an ellipsis is used.
2017-06-19 16:23:12 -04:00
Torkel Ödegaard 77136d7a70 Merge branch 'master' of github.com:grafana/grafana 2017-06-19 16:02:31 -04:00
Torkel Ödegaard 8440d2d0a2 fix: fixed search issues with in active mode and keyboard nav 2017-06-19 16:02:16 -04:00
Denis Doria 41d300f69d Fix timeInterval for mysql datasource (#8651)
* Fix timeInterval for mysql datasource

This changes the > to >= and the < to <=, so the intervals are inclusive.
This should fix the #8635

* Fix validation
2017-06-19 08:58:22 -04:00
Alexander Zobnin 9a7e460865 fix heatmap count values bug introduced by #8632 2017-06-18 21:47:08 +03:00
Alexander Zobnin 8626bdfed8 Merge remote-tracking branch 'upstream/master' 2017-06-18 20:59:05 +03:00
Alexander Zobnin 1f4140057b heatmap-tooltip: normalize histogram Y axis 2017-06-18 20:58:13 +03:00
Daniel Lee 0eb297822c httpserver: fixes #8641
Changes to the http_server class meant that the TLS settings were not
getting applied anymore. This fixes so that the minimum TLS version is
1.2 again.
2017-06-17 23:10:12 +02:00
Daniel Lee ad080af38f docs: add tutorial for using API 2017-06-17 20:59:19 +02:00
Salman Jalali 49fdbb3843 Update kbn.js 2017-06-17 06:08:10 +02:00
Torkel Ödegaard 724368d0cd fix: data source dropdown select 2017-06-16 11:43:37 -04:00
Torkel Ödegaard 25f88e9b3a Merge branch 'master' of github.com:grafana/grafana 2017-06-16 10:47:53 -04:00
Torkel Ödegaard 39ffb04be1 Merge branch 'revert-dashboard-search-nav' 2017-06-16 10:47:28 -04:00
Torkel Ödegaard 056c57d551 ux: temporary remove search 2017-06-16 10:47:17 -04:00
Brandon Arp 5d63ad21c1 allow heatmap parsing of scaled datapoints (#8632) 2017-06-16 10:45:52 -04:00
Torkel Ödegaard a49e82e447 ux: revert dashboard search nav change, this is a tempoary change until we redesign the sidenav 2017-06-16 09:47:21 -04:00
Torkel Ödegaard e9c8881d54 Merge branch 'metric-segment-remake' 2017-06-15 15:56:41 -04:00
Torkel Ödegaard 840099bec0 refactor: metric segment remake 2017-06-15 15:56:24 -04:00
Torkel Ödegaard 76c4bfe268 ux: new metric segment is starting to work 2017-06-15 14:03:26 -04:00
Torkel Ödegaard 5f3b5fdcb2 updated 2017-06-15 12:21:12 -04:00
Torkel Ödegaard 6a95df403a refacoring: more work on metric segment replacement 2017-06-14 19:42:45 -04:00
Torkel Ödegaard 380e7e7f04 Merge branch 'master' into metric-segment-remake 2017-06-14 16:17:13 -04:00
Torkel Ödegaard 581b977787 Merge branch 'master' of github.com:grafana/grafana 2017-06-13 18:32:38 -04:00
Torkel Ödegaard c771dd4bd2 ux: metrics tab add query feature 2017-06-13 18:31:43 -04:00
Daniel Lee cb720d8eaf docs: add body options for snapshot api 2017-06-13 23:17:14 +02:00
Torkel Ödegaard 9ff4ab1236 Merge branch 'master' into query_troubleshooting 2017-06-13 16:47:04 -04:00
Daniel Lee 1f92e589e8 exporter: query template var keeps refresh value..
on export if the value is not set to never. Otherwise the template
variable will not be populated with any values.""
2017-06-13 22:42:58 +02:00
Torkel Ödegaard 812ac5cb8e Merge branch 'master' of github.com:grafana/grafana 2017-06-13 13:22:08 -04:00
Torkel Ödegaard 7d642546b3 fix: restore dashboard history version did not reload route correctly when slug did not change 2017-06-13 13:21:22 -04:00
Trent White 192c447c2c create new auth icon for grafana.com so it doesn't share the same file as the main logo (#8581) 2017-06-12 17:17:00 +02:00
Martin Molnar d10d897d65 fix: component name of plugin page contains 'undefined' (#8590) 2017-06-12 15:11:00 +02:00
Daniel Lee 6992b484bc docs: improvements to building the docs readme
Explains that you need to clone the grafana repo if you have not done that already.
2017-06-09 14:27:27 +02:00
Torkel Ödegaard cdd5ba6198 fix: influxdb test data source error handling now works better, fixes #8577 2017-06-08 21:41:58 +02:00
Torkel Ödegaard 6c04057285 Merge branch 'master' of github.com:grafana/grafana 2017-06-08 14:39:39 +02:00
Torkel Ödegaard 217c746445 ux: close edit views when opening panel in edit mode 2017-06-08 14:23:51 +02:00
Torkel Ödegaard 95c8a76aa6 ux: minor search style improvements 2017-06-08 13:56:51 +02:00
Daniel Lee a8e9700334 docs: add whitelist option for auth.proxy 2017-06-08 13:38:18 +02:00
Torkel Ödegaard 50b09f4f10 Merge branch 'master' of github.com:grafana/grafana 2017-06-08 11:54:11 +02:00
Torkel Ödegaard 2c75593c1a refactoring: elasticsearch raw doc size limit option PR, #8527 2017-06-08 11:53:12 +02:00
Torkel Ödegaard 3c41d0477a Merge branch 'master' of https://github.com/mk-dhia/grafana into mk-dhia-master 2017-06-08 11:22:48 +02:00
Daniel Lee f7c48c5a5f singlestat: fix ignoring zero value for table data
When table data returns a column with the value 0, it should not ignore
it. This change checks for undefined instead of if the value is truthy.

Fixes #8531
2017-06-08 11:06:37 +02:00
Daniel Lee c5d5d7ac5a docs: instruction on creating dummy awsconfig
To be able to build the docs an awsconfig file must exist for the Dockerfile to copy. This adds an instruction to create an empty, dummy file so that the build will work.
2017-06-08 10:32:57 +02:00
Torkel Ödegaard 71b62f5cf9 Create README.md 2017-06-08 09:15:10 +02:00
Mitsuhiro Tanda 922073a357 (cloudwatch) add new metrics (#8569) 2017-06-08 07:01:33 +02:00
Michael Ambrose aa3a737fea Updated cloudwatch doc to be more clear on ec2_instance_attribute usage and added Tag selection example 2017-06-07 16:58:01 -04:00
Michael Ambrose f0169656ba Added test to for Cloudwatch EC2 tag selection 2017-06-07 16:53:49 -04:00
Michael Ambrose 525da95f49 Updated cloudwatch plugin to allow specific tag selection
Tags come back from AWS as a key value pair inside an array
This array is now converted to an object
Tags can be selected when using the 'ec2_instance_attribute' query
Example: `ec2_instance_attribute(us-east-1, Tags.Name, { "tag:Grafana": [ "true" ] })`
2017-06-07 16:53:49 -04:00
Torkel Ödegaard 01ff3bbe0a ux: mini css position fix 2017-06-07 22:03:10 +02:00
Torkel Ödegaard 61bdc91272 ux: css fix to search position when sidemenu is pinned 2017-06-07 21:54:55 +02:00
Torkel Ödegaard 08b37186a5 fix: fixed failing sql unit test 2017-06-07 15:42:48 +02:00
Torkel Ödegaard 5225e4283f Update CHANGELOG.md 2017-06-07 14:39:44 +02:00
Torkel Ödegaard e7e675e471 Merge branch 'walmartlabs-master' (Dashboard History Feature, #8472) 2017-06-07 14:30:03 +02:00
Torkel Ödegaard 391dc1e225 dasboard_history: fixed sql integration test 2017-06-07 14:25:46 +02:00
Torkel Ödegaard 46412c8475 dasboard_history: security fix, added orgId filter to dashboard version lookup 2017-06-07 14:21:40 +02:00
Torkel Ödegaard 3ba8aeb9a7 dashboard_history: fix for scenario where reverted dashbord has different title and url must change not just route reload 2017-06-07 14:02:45 +02:00
Torkel Ödegaard 64d620c987 dasboard_history: minor style fix change 2017-06-07 13:50:59 +02:00
Peter Mounce f4debbf501 typo (#8565) 2017-06-07 13:47:08 +02:00
Torkel Ödegaard 56b3c4a3a0 dasboard_history: fixed disabled attribute so it works both by disabling and fixing style, no need for disabled class and disabled attribute 2017-06-07 13:46:36 +02:00
Torkel Ödegaard 577dfee086 dasboard_history: fixed json diff so only dashbord is compared and not the whole dashboard revision object (message and restoreFrom etc was showing up in json diff) 2017-06-07 13:36:03 +02:00
Torkel Ödegaard 8f6c9c5946 dasboard_history: some polish around styles & diff colors, and minor fixes 2017-06-07 12:39:06 +02:00
Torkel Ödegaard ef1dfed0d8 dasboard_history: big refactoring of how the compare api looked, now a POST with a model for new & base version, refactored a simplified UI code as well, this was done to lay foundation to make it possible to do diff against current in browser unsaved version 2017-06-07 11:50:09 +02:00
Torkel Ödegaard 948e5ae74d dashboard_history: further css & markup fixes, removing style overrides & resuing existing styles and markup components 2017-06-06 23:04:14 +02:00
Torkel Ödegaard c4e872b9da dashboard_history: minor changes and fixes 2017-06-06 16:27:28 +02:00
Torkel Ödegaard 7b5f7ed553 dashboard_history: SQL did not work when using MySQL, fixes to dashboard version numbering, so inserts start at 1, added migration to fix old dashboards with version 0 2017-06-06 15:40:10 +02:00
Torkel Ödegaard 5409f4c0eb dashboard_history: fixed issue with save as & overwrite 2017-06-06 14:39:57 +02:00
Torkel Ödegaard 9b629cd5a6 dashboard_history: fixed history srv unit tests 2017-06-06 14:28:21 +02:00
Torkel Ödegaard 546d489dd3 dashboard_history: restored unsaved changes modal to simple cancel, discard, save 2017-06-06 14:27:30 +02:00
Torkel Ödegaard 88da3a99e1 refactoring: trying to remove all the css overrides in history tab and make the styles more more inline with best practice css, and if needed use modifier overrides instead 2017-06-06 11:03:56 +02:00
Torkel Ödegaard 689e366f59 refactoring: updated api url routes so they do not conflict with slug route 2017-06-06 09:51:14 +02:00
Torkel Ödegaard e2061312f5 refactoring: moved compare dashboard version command out of sqlstore, the code in this command did not use any sql operations and was more high level, could be moved out and use existing queries to get the versions 2017-06-06 00:15:40 +02:00
Torkel Ödegaard e43d09e15b fix: fixed failing frontend test 2017-06-05 23:31:45 +02:00
Torkel Ödegaard 746d6cdc88 refactoring: changed name on compare command to make properties more explainatory 2017-06-05 23:29:25 +02:00
Torkel Ödegaard 9c1401849e fix: always show dashboard history for now, need a way to make dropdown more dynamic 2017-06-05 23:14:07 +02:00
Torkel Ödegaard 2a52e25d5b refactoring: removed double error alert, backendSrv is already showing an error alert 2017-06-05 23:06:31 +02:00
Torkel Ödegaard cabbfe9adc refactoring: moved dashboard history item formating (message) and fixed dashboard history migration issue, and removed from frontend tests that where no longer needed 2017-06-05 22:59:04 +02:00
Torkel Ödegaard f18ebea03e fix: dashboard save modals had double submit on enter after my refactoring this morning 2017-06-05 18:01:16 +02:00
Torkel Ödegaard 82d4d54dc5 refactoring: fixed broken unit test in last commit 2017-06-05 17:51:51 +02:00
Torkel Ödegaard c87418d060 refactoring: Dashboard history restore operation is now reusing existing
operations instead of duplicating a bunch of get & save logic.
2017-06-05 17:45:27 +02:00
Daniel Lee 12219cffe0 Merge pull request #8538 from yackushevas/master
misspell: Corrected some misspelled words
2017-06-05 17:21:42 +02:00
Torkel Ödegaard c296ae1178 refactoring: fixing unit tests broken in last commit 2017-06-05 16:52:36 +02:00
Torkel Ödegaard e18007153d refactoring: Renamed dashboard version queries that wrongly had Command suffix, added missing OrgId to dashboard history commands and queries 2017-06-05 16:34:32 +02:00
Daniel Lee 1b79e17970 graph: better generation of y-axis ticks for log-scale
If there are too many ticks generated for the y-axis (which can occur
for log scale 2, with a small y-min and a large max), then the ticks
will be regenerated using larger jumps between the ticks.

This also handles the case when y-min is set to 0. Previously, y-min of
0 was ignored as zero is not a valid value for log scale. Now the tick
generator approximates zero by setting min to 0.1.

Ref #8244

Ref #8516
2017-06-05 15:06:22 +02:00
Torkel Ödegaard fdfcd5cbf0 refactoring:: dashboard save modal and save as modal needed an update 2017-06-05 14:56:11 +02:00
Anton Yackushev bab21c9069 misspell: Corrected some misspelled words 2017-06-05 15:20:34 +03:00
Torkel Ödegaard f3980504e2 Merge branch 'master' into walmartlabs-master 2017-06-05 13:43:00 +02:00
Eirik Nygaard 1efdd92ae8 Update oauth2 lib (#8524)
* Update to latest oauth2 library using govendor

* Follow API changes
2017-06-05 10:09:27 +02:00
Dhia MOAKHAR 7c1dc2444d change size in raw_document from text to number
update query builder and specs
2017-06-04 13:20:58 +00:00
Dan Cech f224fd8310 reduce length of dashboard columns used in compound indexes (#8507) 2017-06-04 14:28:03 +02:00
Tom Gardiner 4fe9935321 Add support for AWS/VPN metrics (#8528) 2017-06-04 14:24:04 +02:00
aykim17 d996275f8f Updated the graphTooltip description (#8532)
I added in a description since there was just TODO there originally.
2017-06-04 14:23:52 +02:00
Torkel Ödegaard d2eca2faa1 ux: new navbar fixes, restored delete option in dashboard dropdown, fixes #8521 2017-06-04 14:18:25 +02:00
Dhia MOAKHAR 045f5e11fc [elasticsearch] Fix bug when switching from "Raw Document" metric type
when switch to "raw Document" metric type we do free all "Group by"
however when we switch back to another type we do not reset the default aggregation (date histogram)
Thus all modification will through exception as no "Group by" is defined and panel should be recreated
the fix will reintialize the "Group by" by setting default value
2017-06-03 02:55:26 +00:00
Dhia MOAKHAR d55cc4e2a3 [elasticsearch] Fix add metric that was not working properly
when selecting Raw Documet metric type, the $scope.target.metrics was replaced by [$scope.agg],
 however the pointer to this variables is shared with metricAggs.
 Instead we free the array and add $scope.agg
2017-06-03 02:50:10 +00:00
Dhia MOAKHAR 966c2912fc [elasticsearch] Add option for result set size in raw_dcument
it allows to specify the result set size in raw_document.
 Example: table  panel could show more (or less) than 500 line if needed.
 Added test to spec
2017-06-02 23:56:48 +00:00
Torkel Ödegaard d47c47853a ux: added css annimations for dash edit views 2017-06-02 15:29:25 +02:00
Torkel Ödegaard 3bea304bab ux: made new search more responsive 2017-06-02 14:19:39 +02:00
Torkel Ödegaard e9d5e037e8 ux: merge branch navbarv2, new navbar with dashboard search available on all pages, closes #6475 2017-06-02 14:00:42 +02:00
sanchitraizada 77c046aac6 Implement review feedback 2017-06-01 17:57:09 -04:00
Torkel Ödegaard 1bdf82dca3 Update CHANGELOG.md 2017-05-31 14:04:19 +02:00
Torkel Ödegaard 6783d1000c Update CHANGELOG.md 2017-05-31 14:04:02 +02:00
Torkel Ödegaard 95a4ec8bf2 Merge branch 'v4.3.x' 2017-05-31 10:55:06 +02:00
Torkel Ödegaard ed4d170bcc build: updated version to v4.3.2 2017-05-31 10:48:16 +02:00
Torkel Ödegaard 812958162a revert: removed lazy loading feature, closes #8500 2017-05-31 10:47:04 +02:00
Torkel Ödegaard cd3807055e chrome: an attempt to fix scroll issue with chrome, but this did not fix the problem as it seems to be caused by some interaction between graph rendering and scrolling, #8494 2017-05-30 13:50:38 +02:00
Pranay Kanwar 26ec874fb1 Frontend query changes corresponding #8336 (#8489) 2017-05-30 09:53:11 +02:00
Dan Cech e4cb103966 remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests (#8418)
* remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests

* properly handle X-Forwarded-For
2017-05-29 13:09:15 +02:00
Torkel Ödegaard 5c1833de1f Merge branch 'master' of github.com:grafana/grafana 2017-05-29 12:21:21 +02:00
Torkel Ödegaard f16e3e38ee Merge branch 'v4.3.x' 2017-05-29 12:20:34 +02:00
Daniel Lee d318c9093f graph: Handle data with zeroes for log scale
fixes #8446. Data with all values equal to zero, creates a max with the
value of Infinite. The for loop for creating ticks then gets stuck in an
infinite loop. This fix resets min and max and creates some fake ticks
for the y-axis if the min and max are not finite numbers.
2017-05-29 12:18:54 +02:00
Dan Cech c95162e067 tweak column lengths for utf8mb4 support on older mysql (#8483) 2017-05-29 12:18:27 +02:00
Torkel Ödegaard 0d865a83bc fix: fixed test data fake metric query, fixes #8474 2017-05-29 12:17:51 +02:00
Victor Azevedo 980b9b5ca0 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-29 12:15:51 +02:00
Daniel Lee 371625aeec Merge branch 'v4.3.x' 2017-05-29 11:13:14 +02:00
Daniel Lee beced6f3a6 graph: Handle data with zeroes for log scale
fixes #8446. Data with all values equal to zero, creates a max with the
value of Infinite. The for loop for creating ticks then gets stuck in an
infinite loop. This fix resets min and max and creates some fake ticks
for the y-axis if the min and max are not finite numbers.
2017-05-29 11:12:08 +02:00
Torkel Ödegaard 5e0b03928e Merge branch 'v4.3.x' 2017-05-29 10:49:02 +02:00
Torkel Ödegaard 0d39852ef4 fix: fixed test data fake metric query, fixes #8474 2017-05-29 10:48:38 +02:00
Torkel Ödegaard ab44c7d63e Merge branch 'master' of github.com:grafana/grafana 2017-05-29 08:52:07 +02:00
Torkel Ödegaard ed2092e287 docs: updated alerting docs to make query conditions easier to understand, fixes #8486 2017-05-29 08:51:56 +02:00
Dan Cech c0d5b61403 tweak column lengths for utf8mb4 support on older mysql (#8483) 2017-05-29 08:31:36 +02:00
Dan Cech 7004a84c30 tweak column lengths for utf8mb4 support on older mysql 2017-05-29 08:19:51 +02:00
Anton Yackushev c2885430bd fix "no formatting directive in Fatalf call" (vet) (#8487) 2017-05-29 08:12:54 +02:00
Daniel Lee e65f86147f changelog: note for #8058 2017-05-26 15:56:44 +02:00
Daniel Lee c17d02e496 csv: remove sep metadata as only works for excel 2017-05-26 15:43:09 +02:00
Cédric Reginster ee0d0155a5 Refactor to component based style 2017-05-26 15:43:09 +02:00
Cédric Reginster f484b4c347 Make csv export date time format configurable
- Move export csv options to modal dialog
2017-05-26 15:43:09 +02:00
Daniel Lee 3292a48381 graph: dashes with linewidth fix. Fixes #8469
Adds series override options for dash spaces and dash length.
2017-05-26 15:09:05 +02:00
Dan Cech 8422697199 centralize oauth http calls, validate response status (#8470) 2017-05-26 14:35:32 +02:00
Ricky Moorhouse 665caa8e08 Include triggering metrics to pagerduty alerts
Assist the person receiving the alert in identifying the cause

Based on the slack notifier fields this will include upto 4 triggering
metrics in the custom details section in the pagerduty incident

Fixes #8479
2017-05-26 12:30:56 +01:00
Ben Tranter a927b893ae Use DBSession for getMaxVersion 2017-05-25 23:04:00 -04:00
sanchitraizada e6616cc551 Merge pull request #10 from walmartlabs/version-control
History and Version Control for Dashboard Updates
2017-05-25 14:50:47 -07:00
Torkel Ödegaard 60d5d5fb15 docs: updated changelog 2017-05-25 20:37:01 +02:00
Torkel Ödegaard 68397d342b Merge branch 'patch-1' of https://github.com/goldeelox/grafana into goldeelox-patch-1 2017-05-25 20:34:38 +02:00
Torkel Ödegaard 09267bbfe8 docs: elasticsearch, added info about size property in templating query 2017-05-25 20:11:53 +02:00
Victor Azevedo 0a1c2a7024 use fielddata_fields in elasticsearch 2.x queries
Resolves issue #8467
2017-05-25 11:43:29 -04:00
Ben Tranter b6e46c9eb8 History and Version Control for Dashboard Updates
A simple version control system for dashboards. Closes #1504.

Goals

1. To create a new dashboard version every time a dashboard is saved.
2. To allow users to view all versions of a given dashboard.
3. To allow users to rollback to a previous version of a dashboard.
4. To allow users to compare two versions of a dashboard.

Usage

Navigate to a dashboard, and click the settings cog. From there, click
the "Changelog" button to be brought to the Changelog view. In this
view, a table containing each version of a dashboard can be seen. Each
entry in the table represents a dashboard version. A selectable
checkbox, the version number, date created, name of the user who created
that version, and commit message is shown in the table, along with a
button that allows a user to restore to a previous version of that
dashboard. If a user wants to restore to a previous version of their
dashboard, they can do so by clicking the previously mentioned button.
If a user wants to compare two different versions of a dashboard, they
can do so by clicking the checkbox of two different dashboard versions,
then clicking the "Compare versions" button located below the dashboard.
From there, the user is brought to a view showing a summary of the
dashboard differences. Each summarized change contains a link that can
be clicked to take the user a JSON diff highlighting the changes line by
line.

Overview of Changes

Backend Changes

- A `dashboard_version` table was created to store each dashboard
  version, along with a dashboard version model and structs to represent
  the queries and commands necessary for the dashboard version API
  methods.
- API endpoints were created to support working with dashboard
  versions.
- Methods were added to create, update, read, and destroy dashboard
  versions in the database.
  - Logic was added to compute the diff between two versions, and
  display it to the user.
  - The dashboard migration logic was updated to save a "Version
  1" of each existing dashboard in the database.

Frontend Changes

- New views
- Methods to pull JSON and HTML from endpoints

New API Endpoints

Each endpoint requires the authorization header to be sent in
the format,

```
Authorization: Bearer <jwt>
```

where `<jwt>` is a JSON web token obtained from the Grafana
admin panel.

`GET "/api/dashboards/db/:dashboardId/versions?orderBy=<string>&limit=<int>&start=<int>"`

Get all dashboard versions for the given dashboard ID. Accepts
three URL parameters:

- `orderBy` String to order the results by. Possible values
  are `version`, `created`, `created_by`, `message`. Default
  is `versions`. Ordering is always in descending order.
- `limit` Maximum number of results to return
- `start` Position in results to start from

`GET "/api/dashboards/db/:dashboardId/versions/:id"`

Get an individual dashboard version by ID, for the given
dashboard ID.

`POST "/api/dashboards/db/:dashboardId/restore"`

Restore to the given dashboard version. Post body is of
content-type `application/json`, and must contain.

```json
{
  "dashboardId": <int>,
  "version": <int>
}
```

`GET "/api/dashboards/db/:dashboardId/compare/:versionA...:versionB"`

Compare two dashboard versions by ID for the given
dashboard ID, returning a JSON delta formatted
representation of the diff. The URL format follows
what GitHub does. For example, visiting
[/api/dashboards/db/18/compare/22...33](http://ec2-54-80-139-44.compute-1.amazonaws.com:3000/api/dashboards/db/18/compare/22...33)
will return the diff between versions 22 and 33 for
the dashboard ID 18.

Dependencies Added

- The Go package [gojsondiff](https://github.com/yudai/gojsondiff)
  was added and vendored.
2017-05-24 19:14:39 -04:00
Torkel Ödegaard d1d47b5697 docs: updated changelog with fix for InfluxDB query issue, #8459 2017-05-24 16:49:30 +02:00
Torkel Ödegaard 90871ca12e Merge branch 'v4.3.x' 2017-05-24 16:48:05 +02:00
Torkel Ödegaard 896f849b84 fix: influxdb query editor did no show alias by input field when in text editor mode, fixes #8459 2017-05-24 16:47:38 +02:00
Dhia ac28c4b233 add Referer header to logs. This is useful to link datasource requests to dashboard that originated it (#8399) 2017-05-24 13:47:29 +02:00
Torkel Ödegaard 8b7a0100b1 docs: updated changelog with info on merged PR #8405 2017-05-24 13:46:33 +02:00
Torkel Ödegaard dcf7385cc1 sensu: added input tooltip to source property 2017-05-24 13:44:38 +02:00
joe miller 090594a0bc support setting the source and handler attribute in sensu notifications (#8405)
* support setting the handler attribute in sensu alert notifications

* allow the user to set the source attribute of Sensu notifications
2017-05-24 13:42:24 +02:00
Dan Cech 007c08f2a8 remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests (#8418)
* remove X-Forwarded-* headers added by nginx when proxying data source & plugin requests

* properly handle X-Forwarded-For
2017-05-24 13:39:40 +02:00
Daniel Parks 2d29d7b3d6 Add support for AWS DMS CloudWatch metric (#8458) 2017-05-24 13:24:24 +02:00
Torkel Ödegaard 3133721422 docs: update changelog 2017-05-24 13:23:11 +02:00
Torkel Ödegaard 28bff0c1f3 Merge branch 'v4.3.x' 2017-05-24 13:22:09 +02:00
Torkel Ödegaard b17a1ed557 playlist: fixed dashboard play ordering, fixes #7688 2017-05-24 13:21:43 +02:00
Torkel Ödegaard e6d79dfedf docs: updated changelog 2017-05-24 11:23:41 +02:00
Torkel Ödegaard 5740702cb5 Merge branch 'master' of github.com:grafana/grafana 2017-05-24 11:21:17 +02:00
Torkel Ödegaard a5318def66 Merge branch 'v4.3.x' 2017-05-24 11:20:35 +02:00
Torkel Ödegaard 634ee0f9fa fix: graphg panel logarithmic scale goes blow x-axis, fixes #8244 2017-05-24 11:20:07 +02:00
Prasanna Gautam 6541ffe045 minor change: more accurate variable name (#8449) 2017-05-24 08:38:13 +02:00
Torkel Ödegaard 12c8bf9b18 Update CHANGELOG.md 2017-05-23 16:45:15 +02:00
Torkel Ödegaard d4048e1423 docs: updated download links 2017-05-23 16:18:37 +02:00
Torkel Ödegaard 6257fbced6 docs: updated changelog 2017-05-23 15:54:44 +02:00
Torkel Ödegaard 330cb92b24 Merge branch 'v4.3.x' 2017-05-23 15:52:24 +02:00
Torkel Ödegaard befc15c5a1 fix: s3 image uploads to us-east-1 (us standard) did not return correct image urls so images shared to slack and other services was not correct, fixes #8444 2017-05-23 15:50:22 +02:00
Torkel Ödegaard 3695337980 refactoring: Elasticearch filter label PR #8420 2017-05-23 15:14:23 +02:00
Torkel Ödegaard 648e8a9547 Merge branch 'master' of https://github.com/limefamily/grafana into limefamily-master 2017-05-23 14:48:14 +02:00
Torkel Ödegaard 1e3a42ca68 packaging: added rpm fonts to rpm package dependencies (#8442) 2017-05-23 13:53:03 +02:00
Torkel Ödegaard 21e61319f1 Merge branch 'master' of github.com:grafana/grafana 2017-05-23 13:52:24 +02:00
Torkel Ödegaard 48fdfe721e build: updated master version to 4.4.0-pre1 2017-05-23 13:52:07 +02:00
Torkel Ödegaard 423ad4d36e docs: updated docs 2017-05-23 12:45:15 +02:00
Torkel Ödegaard bd8a0be3aa Update CHANGELOG.md 2017-05-23 12:26:30 +02:00
Torkel Ödegaard d9c6f7a141 release: bumped version to 4.3.0 2017-05-23 11:14:53 +02:00
Torkel Ödegaard 044668a395 login: minor fix to login page 2017-05-23 11:10:16 +02:00
Torkel Ödegaard 90dbd4978b Merge branch 'master' of github.com:grafana/grafana 2017-05-23 10:56:37 +02:00
Torkel Ödegaard 359421b5e8 refactor: sqlstore inTransaction consolidated to one version, fixes #8376 2017-05-23 10:56:23 +02:00
Daniel Lee 73cb035231 mysql: annotation support. Fixes #8382
Simple query editor - a text area with a Show Help section.
Validation for empty query and if the time_sec column is missing.
2017-05-23 09:53:20 +02:00
Matt Toback d47078e27f 2017! 2017-05-22 17:29:24 -04:00
Torkel Ödegaard 5e33b5fcfa docs: updated changelog 2017-05-22 15:39:46 +02:00
Torkel Ödegaard c34db77f04 grafana_com: changed name of oauth grafana_net integration (old settings names still work), and updated login button look, closes #8415 2017-05-22 14:56:50 +02:00
Torkel Ödegaard 7c50563f0f fix: fixed crash when gzip was enabled 2017-05-22 14:09:54 +02:00
Torkel Ödegaard a64c06d02c mysql: add user permission notice mysql config view, closes #8359 2017-05-22 13:53:43 +02:00
Torkel Ödegaard 966cefc8d0 docs: updated changelog 2017-05-22 13:04:59 +02:00
Torkel Ödegaard a0b9dcad4d alert: alerting annotation improvements, fixes #8421 2017-05-22 13:02:49 +02:00
Torkel Ödegaard 370db82238 docs: updated changelog 2017-05-22 10:55:22 +02:00
Torkel Ödegaard 20e631a22d fix: All alert annotations showed up in unsaved/new dashboards graph panels with alert, fixes #8361 2017-05-22 10:49:26 +02:00
Junliang Huang 6d3246e39e docs(readme): remove dev.ini reference (#8419)
remove dev.ini reference as it seems not working anymore.
2017-05-21 10:07:21 +02:00
Joe Handzik d4264cbfc2 Make location for plugins consistent (#8429)
Please let me know if this changed in a more recent version of Grafana, but when using 4.2.0 the manual install directions were off a little (there was no `data/plugins` directory, only a `plugins` directory).

Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
2017-05-21 10:03:57 +02:00
Dave Scott f7215608e9 Update VictorOps notifier w/ auto resolve and image URL (#8431)
* Fixed newline JSON buy in VictorOps integration

* Fixed payload sent to VictorOps so that link displays correctly

* Fixed formatted to resolve go error

* Add auto resolve incidents and image URL to VictorOps notifier
2017-05-21 10:02:48 +02:00
Torkel Ödegaard 7cb6466251 feat: query troubleshooter, improving json explorer 2017-05-20 23:43:59 +02:00
Torkel Ödegaard d840645dd7 feat: metrics tab, minor change 2017-05-20 23:03:04 +02:00
Torkel Ödegaard a8673a2e33 feat: metrics tab 2017-05-20 22:41:34 +02:00
Torkel Ödegaard 4a2c405ac0 feat: metris tab, moved data source selector 2017-05-20 18:35:34 +02:00
Torkel Ödegaard 499e01d832 feat: metrics tab reworking 2017-05-20 18:21:41 +02:00
Torkel Ödegaard 5e090b84ec feat: Copy to clipboard now works in query troubleshooter 2017-05-20 14:52:33 +02:00
Torkel Ödegaard b8aa6a8e47 query: more work on metrics tab changes 2017-05-20 10:48:47 +02:00
Torkel Ödegaard 912301fe24 query: more work on metrics tab changes 2017-05-20 10:14:41 +02:00
Torkel Ödegaard 5909f9ef92 feat: more work on metrics tab reworkings 2017-05-19 21:32:23 +02:00
Torkel Ödegaard 5fcb966297 feat: query troubleshooter progress 2017-05-19 17:35:36 +02:00
Torkel Ödegaard 6ad1a396a5 feat: query troubleshooter 2017-05-19 16:00:01 +02:00
Torkel Ödegaard 5513d3c9d1 feat: moved json-formatter-js into core grafana to be able to make changes 2017-05-19 13:16:05 +02:00
Torkel Ödegaard 878121bb46 fix: templating variable name validation detecting global variable naming wrongly, fixes #8423 2017-05-19 11:14:11 +02:00
Torkel Ödegaard 9045be5689 fix: Prometheus & hidden queries caused no metric query to be issued, fixes #8413 2017-05-19 10:24:47 +02:00
田子宽 9c35d3f87c Add kibana like readable label to elasticsearch query builder 2017-05-19 11:38:28 +08:00
Torkel Ödegaard f7a6c9a1e6 ux: minor change 2017-05-18 17:05:15 +02:00
Torkel Ödegaard f65878c21d ux: working on query troubleshooting 2017-05-18 17:04:31 +02:00
Torkel Ödegaard 78dbb4dc13 config: removed trace level from config comment 2017-05-18 14:19:39 +02:00
Torkel Ödegaard d5481fa0f1 Merge branch 'master' into query_troubleshooting 2017-05-18 14:14:33 +02:00
Torkel Ödegaard 59f3cca135 docs: updated changelog 2017-05-18 14:13:05 +02:00
Torkel Ödegaard 8918922179 alerting: fixed issue with included alerting error & no data reasons, fixes #8412 2017-05-18 14:10:12 +02:00
Torkel Ödegaard 43d5525aaa Merge branch 'master' into alert_state 2017-05-18 13:38:34 +02:00
Torkel Ödegaard fbc3e0371d Merge branch 'master' into query_troubleshooting 2017-05-18 13:38:11 +02:00
Torkel Ödegaard 86ce3d5e45 feat: in app query request & response troubleshooting 2017-05-17 17:02:50 +02:00
Daniel Lee 4182acda58 Merge pull request #8332 from sliceratwork/master
upgrade to Font Awesome 4.7.0
2017-05-17 14:58:14 +02:00
Daniel Lee 16fb7a2e4a Merge pull request #8394 from berghauz/master
Proxy support added to webdav uploader, fixes #7922
2017-05-17 14:49:22 +02:00
Daniel Lee f5118ced4d Merge pull request #8400 from haidaraM/docs-admin
docs: Added requests body for 'Password for User' and 'Permissions'
2017-05-17 14:42:14 +02:00
A78677 ab874cd037 docs: Added requests body for 'Password for User' and 'Permissions' in the admin api documentation 2017-05-17 14:26:27 +02:00
Daniel Lee 540ee35393 timerange: new quick ranges, month and year so far
The new time ranges can also be used for time range overrides in the
override relative time field. E.g. now/M or now/y.
2017-05-17 13:52:39 +02:00
Daniel Lee e61b392916 core: fix linting errors in specs files 2017-05-17 13:47:44 +02:00
Torkel Ödegaard 87f5222907 typescript: fixed issue with tslint in testsW 2017-05-17 13:43:17 +02:00
Torkel Ödegaard d261f33c3d influxdb: influxdb query editor changes 2017-05-17 13:27:56 +02:00
Torkel Ödegaard 972be88569 fix: singlestat gauge sizing issue when panel is very wide, fixes #7773 2017-05-17 11:56:40 +02:00
Torkel Ödegaard fc146fe54e Merge branch 'master' of github.com:grafana/grafana 2017-05-17 11:33:24 +02:00
Torkel Ödegaard 8e03f321eb fix: Elasticsearch table aggregation and support for many aggregations of same type, now uses field name if more than 1 aggregation of same type, fixes #4709 2017-05-17 11:33:08 +02:00
Dan Cech 9dc220b8e2 include error message in email notification (#8392) 2017-05-17 09:51:51 +02:00
berghauz 48cf58e739 Indenting fix 2017-05-17 03:58:18 +03:00
berghauz c713bd9a9a Proxy support added, fixes #7922
Well, i'm really want to see it working in 4.3.0
2017-05-17 02:50:56 +03:00
Torkel Ödegaard 820671d6cc Merge branch 'master' of github.com:grafana/grafana 2017-05-16 16:29:27 +02:00
Torkel Ödegaard 02c79a6389 influxdb: improvements to influxdb query editor, SLIMIT, LIMIT and ORDER BY now added on demand by plus button 2017-05-16 16:28:58 +02:00
Daniel Lee e8b798914d mysql: adds mapping for int/long 2017-05-16 16:07:42 +02:00
Torkel Ödegaard 8b11712f5e fix: Graphite issue with toggle edit mode in query editor, fixes #8377 2017-05-16 14:29:30 +02:00
Torkel Ödegaard f84dc24fcb alerting: improving and fixing alert history, #7257 2017-05-15 16:17:05 +02:00
Torkel Ödegaard f697f81950 sqlite: fixed database table looked handling, now retries up to 5 times, fixes #7992 2017-05-15 12:19:19 +02:00
Torkel Ödegaard fd969bf659 Merge branch 'master' of github.com:grafana/grafana 2017-05-15 10:33:43 +02:00
Konstantin Koniev 9566197620 Internationalise keybindings. (#8311) 2017-05-12 14:59:56 +02:00
Daniel Lee fd5fc0b7ab docs: metadata change for guide post 2017-05-12 14:19:46 +02:00
Daniel Lee fcbe306628 release: version bump for package cloud script 2017-05-12 13:36:42 +02:00
Daniel Lee 88d4fde815 docs: v4.3.0-beta1 updates 2017-05-12 13:36:42 +02:00
Daniel Lee a73f664d54 Update CHANGELOG.md 2017-05-12 13:26:34 +02:00
Daniel Lee 3a892727b3 release version bump 4.3.0-beta1 2017-05-12 11:45:26 +02:00
Daniel Lee a9c535e551 mysql: add some more type mapping
Decimals mapped to floats for now. No mapping for bit or
any of the blob types. Tinyint not mapped to bool.
2017-05-12 11:37:51 +02:00
Torkel Ödegaard 375e60750e docs: updated heatmap docs 2017-05-12 11:14:11 +02:00
Torkel Ödegaard 17198807c9 docs: updated mysql docs 2017-05-12 11:04:54 +02:00
Torkel Ödegaard 910e54d75e Merge branch 'master' of github.com:grafana/grafana 2017-05-11 16:31:31 +02:00
Torkel Ödegaard 5076460254 docs: updated heatmap docs 2017-05-11 16:30:50 +02:00
Torkel Ödegaard 2e7ac8f2da heatmap: fix for unit options width 2017-05-11 15:20:13 +02:00
Mitsuhiro Tanda 5e85558e9e (prometheus) fix graph link (#8349) 2017-05-11 14:24:13 +02:00
Torkel Ödegaard 88672389f3 docs: minor docs fix 2017-05-11 14:16:05 +02:00
Torkel Ödegaard 2c3f3dffa3 docs: updated heatmap panel docs menu name 2017-05-11 13:02:10 +02:00
Torkel Ödegaard 2c5563442f docs: added initial mysql docs 2017-05-11 12:59:49 +02:00
Torkel Ödegaard f976e465c4 mysql: minor improvement for table panel 2017-05-11 11:06:13 +02:00
Torkel Ödegaard 4ce0bf4d16 mysql: improved mysql data source, added test feature when adding data source, fixed cache issue 2017-05-11 10:50:24 +02:00
Torkel Ödegaard ab6740c685 heatmap: Docs and heatmap fixes 2017-05-11 10:19:47 +02:00
Torkel Ödegaard 30b6c3b54a build: fixed heatmap test 2017-05-11 08:56:32 +02:00
Tiantian Gao b2c14b858e Fix http logging time_ms unit is wrong (#8342)
In fact, the unit of `time_ms` int http logging is not "ms", this patch fix it.
2017-05-11 08:53:40 +02:00
Suzana Pescador 8c9cc4fae1 [Bug] Coloring Background on siglestat panel #7242 (#8334)
The bug was happening because the background color was being based on
the rounded value (accounting the user defined decimals). Changed it to
use the pure value (not the rounded) to follow whats being done in the
value color, and also in the table thresholds (they don't consider the
decimals when comparing to thresholds).
2017-05-10 20:02:35 +02:00
Torkel Ödegaard 1d4338ba54 Merge branch 'master' of github.com:grafana/grafana 2017-05-10 17:19:03 +02:00
Torkel Ödegaard 0a68dabb89 heatmap: Fixes & progress on heatmap docs 2017-05-10 17:17:51 +02:00
Suzana Pescador d6eefcb5ce Can't remove default avg column in table #4515 (#8335)
Avg column was being added at every rendering, if the table was empty.
Now the column will be added once as an initialization when selecting a
'timeseries_aggregations' transform.
2017-05-10 15:51:34 +02:00
Pranay Kanwar ee8799de88 Fix dropcounter option, is called dropResets (#8336) 2017-05-10 15:46:19 +02:00
Daniel Lee 4a35126bf6 api: health check returns 503 if db is failing
ref #3302
2017-05-10 15:23:59 +02:00
Daniel Lee f350ae242b Update CHANGELOG.md
ref #7934 
ref #7968
ref #3164
2017-05-10 14:32:18 +02:00
Daniel Lee c21f86f6b4 Update CHANGELOG.md
ref #8277, ref #8250, ref #8262, ref #8165, ref #8093, ref #8056, ref #8043, ref #7970, ref #7914, ref #7864, ref #7750, ref #7740, ref #7697, ref #7619, ref #5619, ref #4030, ref #5278, ref #3302, ref #2524
2017-05-10 13:29:36 +02:00
Torkel Ödegaard d791f902e9 heatmap: more refactoring 2017-05-10 13:05:26 +02:00
Andrei Stefan b054b1faac upgrade to Font Awesome 4.7.0 2017-05-10 09:28:00 +03:00
Torkel Ödegaard acff78d421 Merge branch 'master' into heatmap-refactoring2 2017-05-09 12:41:11 +02:00
Torkel Ödegaard 8bbff2c44e table: refactoring table options, now column styles are in a seperate tab 2017-05-09 12:35:44 +02:00
Torkel Ödegaard e218052a90 fix: fixed slow down issue in table panel by removing the fillter null values feature (#7602), not sure the filter null values is a good table option, should be done in metric query, fixes #8234 2017-05-09 12:07:06 +02:00
Torkel Ödegaard 84141eb14a docs: updated changelog 2017-05-09 08:45:47 +02:00
Torkel Ödegaard 79120a0b1f Merge branch 'master' of github.com:grafana/grafana 2017-05-09 08:33:43 +02:00
Torkel Ödegaard 8d072de556 elasticsearch: changed default terms min_doc_count to 1 and order by to desc, closes #8231 2017-05-09 08:33:37 +02:00
Anton Yackushev fdc97010b4 Rename fielddata_fields to docvalue_fields (#8317)
The parameter fielddata_fields is deprecated and removed in 5.0 https://github.com/elastic/elasticsearch/issues/19027
2017-05-09 07:16:48 +02:00
Torkel Ödegaard 25a267a7ab fix: segment used influxdb naming for variable in options callback, should be more generic 2017-05-08 16:08:53 +02:00
Torkel Ödegaard f168c9e53d table: minor ux options update 2017-05-08 15:57:15 +02:00
Torkel Ödegaard 076a94560b Merge branch 'table-options' 2017-05-08 15:31:29 +02:00
Torkel Ödegaard be284adacc table: more table options refactoring 2017-05-08 15:26:05 +02:00
Torkel Ödegaard 556829eda9 table: began table options redesign 2017-05-08 11:17:29 +02:00
Torkel Ödegaard 823b40a360 docs: added bash and http syntax highlighting 2017-05-08 08:02:08 +02:00
Torkel Ödegaard e2f0b42d90 docs: updated cloudwatch docs, closes #8315 2017-05-08 06:49:55 +02:00
lpavlovi c323d2fc4c Removed panelElemName - appears to not be used anywhere (#8313) 2017-05-07 08:19:08 +02:00
Dan Cech e8fbfce59a remove unneeded import, update docs text 2017-05-05 13:11:44 -04:00
Dan Cech 0f24b45c1a Merge branch 'master' into table-col-alias 2017-05-05 12:41:35 -04:00
Dan Cech 29653d2bec refactor and add column alias tests 2017-05-05 12:40:49 -04:00
Torkel Ödegaard fbf39598b8 heatmp: removed series stats option, lacked tests 2017-05-05 17:33:54 +02:00
Torkel Ödegaard ece21b2d95 heatmap: more refactoring 2017-05-05 17:28:33 +02:00
Torkel Ödegaard dd5a426911 heatmap: refactoring heatmap 2017-05-05 16:15:08 +02:00
Torkel Ödegaard 43c6f74904 heatmap: removed fill background, and highlight card options 2017-05-05 12:33:04 +02:00
Torkel Ödegaard 4412e41738 ux: updated heatmap and alertlist icons 2017-05-05 11:43:42 +02:00
Torkel Ödegaard 5c9810fba4 docs: added in app docs & links to annotation docs 2017-05-05 11:30:44 +02:00
Torkel Ödegaard 2479ad262e ux: updated look of info box 2017-05-05 09:16:28 +02:00
Torkel Ödegaard e75bc5d39a docs: added templating docs link to app 2017-05-05 08:56:19 +02:00
Torkel Ödegaard 6ee11f1172 heatmap: minor update 2017-05-05 07:05:11 +02:00
Torkel Ödegaard f167d459fe Merge branch 'heatmap-refactor' 2017-05-04 19:56:29 +02:00
Torkel Ödegaard 5acabc6ccb heatmap: refactoring 2017-05-04 19:56:20 +02:00
Trent White b4a8678cae remove duplicate paragraph, couple word tweaks 2017-05-04 10:34:19 -04:00
Torkel Ödegaard 61b51c0cbf heatmap: refactoring 2017-05-04 16:03:47 +02:00
Torkel Ödegaard 0390a7c17b docs: fixed docs intro 2017-05-04 12:36:34 +02:00
Torkel Ödegaard 11959f0c4c Merge branch 'master' of github.com:grafana/grafana 2017-05-04 12:13:43 +02:00
Torkel Ödegaard dbcd19bbce docs: minor update to OpenTSDB docs 2017-05-04 12:12:55 +02:00
柯豪 b7a1ff753a update name for AWS credentials (#8287) 2017-05-04 11:44:36 +02:00
Torkel Ödegaard 0bab1fd088 Merge branch 'templating-docs', closes #8243 2017-05-04 11:17:39 +02:00
Torkel Ödegaard cbba692962 docs: influxdb docs update 2017-05-04 11:15:48 +02:00
Torkel Ödegaard e80e0c044b docs: updated elasticsearch docs 2017-05-04 10:19:00 +02:00
Daniel Lee e08188929d docs: update to alert notifications 2017-05-03 22:27:10 +02:00
Daniel Lee b61de0cddc docs: fix API alerting docs 2017-05-03 17:24:27 +02:00
Torkel Ödegaard 287cd83e76 docs: grammarly fixes 2017-05-03 16:34:51 +02:00
Torkel Ödegaard 59fdda6559 docs: minor update to prometheus docs 2017-05-03 15:53:31 +02:00
Torkel Ödegaard ed8d284715 docs: updated prometheus docs 2017-05-03 15:50:38 +02:00
Torkel Ödegaard e6c29391c6 docs: improved Graphite templating docs 2017-05-03 14:20:59 +02:00
Torkel Ödegaard 2304a710bf docs: templating doc wip 2017-05-03 14:09:04 +02:00
Daniel Lee 186a5e9d6f Merge pull request #8274 from sliceratwork/master
Update style guide
2017-05-03 11:04:52 +02:00
Andrei Stefan c57ec23a66 fix broken layout for styleguide icons tab 2017-05-03 11:46:08 +03:00
Torkel Ödegaard b042c53980 ux: updated heatmap icon 2017-05-03 08:56:51 +02:00
Vladimir Gordiychuk deab4a378a bug: MetricSegment lost information about type (#8278)
Fixed #8277
2017-05-03 08:22:30 +02:00
Daniel Lee 44f76fdabc Merge pull request #8275 from jonfreedman/patch-1
chore: add comment to clarify that org_id usage
2017-05-02 17:07:36 +02:00
Jon Freedman 6ebb31bed4 chore: add comment to clarify that org_id usage
As described here: https://community.grafana.com/t/many-to-many-group-dn-org-role-mapping-in-ldap-config/729/2 org_id can be used to allow multiple group_dn's to map to the same org_role provided the org_id differs.
2017-05-02 15:45:48 +01:00
Torkel Ödegaard c1de972eb5 docs: wip templating docs 2017-05-02 16:22:31 +02:00
Andrei Stefan 53ccc6f48f fix theme switching in style guide 2017-05-02 16:45:34 +03:00
Andrei Stefan f43c749422 add plugin authoring tab in style guide 2017-05-02 16:15:28 +03:00
Andrei Stefan ad3da0f47c add icon guide 2017-05-02 15:57:02 +03:00
Dan Cech 665cf55e6e make generic oauth provider flexible enough to handle bitbucket's oauth implementation (#8248) 2017-05-02 14:37:56 +02:00
Daniel Lee b4cfb225cf tech: updates log15 vendor packages
Fixes #8262
2017-05-02 12:47:32 +02:00
Daniel Lee ac6c93b3da docs: add publish bash script 2017-05-02 10:20:09 +02:00
Torkel Ödegaard 0fd96b951a wip: heatmap refactor 2017-05-02 09:55:18 +02:00
Daniel Lee 83c138f575 docs: fix mistake in api docs 2017-05-02 09:39:50 +02:00
rogerswingle 02455753b5 Specify region for s3 (#8251) 2017-05-01 19:22:20 +02:00
Torkel Ödegaard 88dd8af4ce docs: Updates to screencasts & sharing docs 2017-04-28 13:43:00 +02:00
Torkel Ödegaard 4f9f186575 docs: overhauled annotation docs and moved some of the data source specific annotation docs to the respective data source doc pages, closes #1111 2017-04-28 12:51:21 +02:00
Torkel Ödegaard c46b73538c docs: minor update to troubleshooting guide, closes #8242 2017-04-28 11:16:05 +02:00
Torkel Ödegaard 0ac9ec8f7e docs: added restore instructions to backup section in upgrading doc article, closes #5680 2017-04-28 11:05:14 +02:00
Daniel Lee c6d5259c6d changelog: add note for #6564 2017-04-28 11:01:54 +02:00
Torkel Ödegaard 26f4a8e5a4 docs: added links to upgrading article 2017-04-28 10:58:26 +02:00
Torkel Ödegaard a93fa0acde docs: Added general upgrading docs / guide, closes #5905 2017-04-28 10:52:50 +02:00
Torkel Ödegaard b14c3d63e4 docs: added missing white space to config docs, #7073 2017-04-28 09:21:47 +02:00
Dan Cech 2361e2ddd9 fix moment.js deprecation warning when running tests 2017-04-27 15:29:32 -04:00
Dan Cech b1691f1cd1 add support for column aliases in table panel 2017-04-27 15:23:49 -04:00
Torkel Ödegaard 24e3777894 docs: updated make file for docs to support specifying env and version 2017-04-27 12:17:22 +02:00
Torkel Ödegaard f5a6c306a6 docs: worked on supporting doc versions 2017-04-27 09:58:45 +02:00
Mitja Z c92d719a72 added support for listening on unix socket #4030 (#8221) 2017-04-27 08:54:21 +02:00
Yaron de Leeuw d4f7a2bc99 minor code style: use strings.Replace fourth argument in influxdb (#8225)
Remove 5 lines from the codebase and an unecessary function,
by calling `strings.Replace` with -1 for the fourth argument.

A better alternative to what was merged in #8037
2017-04-27 08:51:43 +02:00
Matt Toback b909cfbde4 Refactored Alert Pulse (#8227)
* Moved the animation to the pseudo element which seemed to reduce the CPU usage in an observable way.

* Removed unnecessary style
2017-04-27 08:49:03 +02:00
Torkel Ödegaard a0d8afd435 ux: minor change to styles & heatmap option names 2017-04-26 14:18:58 +02:00
Daniel Lee f23239650e changelog: adds note for #514 2017-04-26 13:25:38 +02:00
Daniel Lee 8f4c797399 docs: update graph docs images + some text changes 2017-04-26 13:19:24 +02:00
Daniel Lee 6707d77af5 graph: dashes option only used in series overrides
Removes dashes option from Display tab so that it is only available
for series overrides. Also removes options for dash space and length
in series overrides and just uses the default values of 10 for both of
them.
2017-04-26 13:19:24 +02:00
smalik 1a3bc60e69 feat(dashed lines): Implementing dashed lines
Adding support for dashed lines using jquery.flot.dashes.js
2017-04-26 13:19:24 +02:00
Torkel Ödegaard 9e13c93379 docs: fixed redirects to panel docs for old location, caused by move in bd414c1793 2017-04-26 13:01:12 +02:00
Daniel Lee dc1178acc8 Merge pull request #8211 from necrolyte2/patch-1
duplicate keys for auth.github for allow_sign_up
2017-04-25 20:26:46 +02:00
Tyghe Vallard 1edeaa5e7e duplicate keys for auth.github for allow_sign_up 2017-04-25 11:11:32 -05:00
Torkel Ödegaard d2a22e7b23 influxdb: fixed template variable interpolation of multi valued variables when using raw query editor mode, fixes #8165 2017-04-25 17:27:57 +02:00
Torkel Ödegaard 19a04b7e4a change: minor change to health check api endpoint 2017-04-25 17:24:36 +02:00
Torkel Ödegaard f6f2d85aa7 change: minor change to health check api endpoint 2017-04-25 17:24:06 +02:00
Daniel Lee 6538e86793 webdav: add tests + path.join for public url param
Fixes #7914. Fixes #7921
2017-04-25 17:22:18 +02:00
fir4 6d9e8bd147 webdav: allow specification of a different public_url than upload url 2017-04-25 17:22:18 +02:00
Torkel Ödegaard 368e847d12 feat: added api health endpoint that does not require auth and never creates sessions, returns db status as well. #3302 2017-04-25 17:17:45 +02:00
Torkel Ödegaard fe64ed424e docs: removed deprecated api #8210 2017-04-25 16:17:05 +02:00
Torkel Ödegaard b780415f25 fix: change to remember me cookie encoding 2017-04-25 15:33:15 +02:00
Daniel Lee aee4af2148 api: omit unused fields for /api/datasources
Fixes #7822
2017-04-25 15:23:36 +02:00
Torkel Ödegaard 4720216e5e tech: upgraded macaron & macaron inject, binding, session 2017-04-25 15:16:32 +02:00
Torkel Ödegaard 9f462c0519 emails: fixed position of logo in emails, fixes #8094 2017-04-25 14:50:53 +02:00
Torkel Ödegaard b08b22192b docs: updated docs with fix info for #7659 2017-04-25 14:29:05 +02:00
Torkel Ödegaard c3bad4701a fix: annotations fix for snapshots, fixes #7659 2017-04-25 14:27:41 +02:00
Torkel Ödegaard 87c978ebc9 fix: better error handling / messsage when testing email notification when stmp is not configured, fixes #8093 2017-04-25 13:16:41 +02:00
Torkel Ödegaard 8beb873db4 docs: updated changelog with #6140 2017-04-25 13:04:22 +02:00
Torkel Ödegaard 8c448d95a1 Merge branch 'master' into mtanda-prometheus_table 2017-04-25 12:59:25 +02:00
Torkel Ödegaard 6ff1144abf refactoring: prometheus PR #6140 2017-04-25 12:57:23 +02:00
Dan Cech b489e93d94 Config Array Syntax (#8204)
* refactor util encryption library so it doesn't have to import log

* add util.SplitString to handle space and/or comma-separated config lines

* go fmt
2017-04-25 09:14:29 +02:00
Torkel Ödegaard d085aaad41 fix: variable srv addVariable function, only used in tests 2017-04-24 17:06:58 +02:00
Torkel Ödegaard 787fea90b9 heatmap: changed name of heatmap data format option, #8054 2017-04-24 15:17:57 +02:00
Torkel Ödegaard ae5e004b69 mysql: time filter macro updated 2017-04-24 14:55:43 +02:00
sbhenderson c485fed744 Fix to issue 2524 by limiting number of returned measurements for display. (#8092) 2017-04-24 11:44:29 +02:00
Daniel Lee 92d723d6f5 docker: remove downloaded temp files from opendata image 2017-04-24 11:40:38 +02:00
Torkel Ödegaard 9e0acdda23 Update ROADMAP.md 2017-04-24 11:28:09 +02:00
Torkel Ödegaard ef36ffb5d0 Update ROADMAP.md 2017-04-24 11:27:59 +02:00
Torkel Ödegaard 48acffe095 Update ROADMAP.md 2017-04-24 11:27:28 +02:00
Torkel Ödegaard 09b7516d47 Update ROADMAP.md 2017-04-24 11:27:05 +02:00
Torkel Ödegaard 16d27a4a8d Update ROADMAP.md 2017-04-24 11:25:44 +02:00
Torkel Ödegaard 663f7ee239 Update ROADMAP.md 2017-04-24 11:24:19 +02:00
Torkel Ödegaard b8259d7583 Create ROADMAP.md 2017-04-24 11:18:34 +02:00
Torkel Ödegaard 2b029912aa mysql: query editor fix 2017-04-24 10:58:53 +02:00
Daniel Lee 7784e4e24b mysql: add datetime type to table data 2017-04-23 21:56:58 +02:00
Daniel Lee 413ee33d5d mysql: fix go vet error 2017-04-23 20:07:20 +02:00
Daniel Lee d1e6f90f92 Merge pull request #8194 from Alexander-N/fix-orgfilter
fix: make organisation filter case insensitive
2017-04-23 19:55:35 +02:00
Torkel Ödegaard 8f17a84f31 mysql: added basic templating support 2017-04-23 14:22:47 +02:00
Torkel Ödegaard 253b8be449 mysql: updated test data 2017-04-23 13:50:49 +02:00
Alexander-N 01fc6da3b2 fix: make organisation filter case insensitive 2017-04-23 12:30:19 +02:00
Daniel Lee fdc68a8baa docker: adds mysqldb with test data
Downloads a large open dataset from NYC Open Data.
Then converts date columns into the mysql format.
2017-04-22 02:01:29 +02:00
Torkel Ödegaard 6ea99540ec Merge branch 'master' of github.com:grafana/grafana 2017-04-21 17:30:37 +02:00
Daniel Lee 6160978019 singlestat: with table data, support string values
If the selected table column is string then show that in the singlestat
2017-04-21 16:54:56 +02:00
Daniel Lee a49ef90a1d singlestat: value mapping for table data
Adds support for value mapping for table data in the single stat panel.
2017-04-21 16:43:14 +02:00
Torkel Ödegaard b22b3e5bb9 mysql: added default query template 2017-04-21 16:28:01 +02:00
Daniel Lee 8874be4c66 singlestat: add support for table data
If data is of type Table, then will return the first row of data. The
user can select which column should be shown in the SingleStat.
2017-04-21 16:17:31 +02:00
Daniel Lee 2c51f11440 singlestat: fix variable spelling 2017-04-21 16:17:31 +02:00
Torkel Ödegaard ea53e7221e mysql: added query help 2017-04-21 15:52:42 +02:00
Torkel Ödegaard 97e2d75f51 mysql: added support for tables in mysql queries 2017-04-21 15:07:43 +02:00
Torkel Ödegaard c78c460f79 mysql: worked on mysql data soruce 2017-04-20 17:10:23 +02:00
Daniel Lee 1bbc149089 docs: document API calls for /auth/keys 2017-04-20 13:59:36 +02:00
Daniel Lee 459d195291 docs: fix link 2017-04-20 13:35:51 +02:00
Daniel Lee 6ec1d16327 fix: cli admin reset-password fixes cmd args
Fixes the homepath and config command line args. This allows the
command to be used even when the homepath is different from the
default.

Fixes #7730
2017-04-20 13:30:17 +02:00
Torkel Ödegaard 50e70cf3db build: fixed unit test 2017-04-20 13:04:42 +02:00
Torkel Ödegaard fc878bc8ad build: fixed order 2017-04-20 11:59:11 +02:00
Torkel Ödegaard 2cb2c4073e build: moved copy node modules ahead of tslint 2017-04-20 11:27:12 +02:00
Torkel Ödegaard 4368c5a896 build: moved copy node modules ahead of tslint 2017-04-20 11:26:30 +02:00
Torkel Ödegaard f1276774a0 typescript: updated tslint and fixed new warnings 2017-04-20 11:16:37 +02:00
raj dutt 98266bd95a Update alerting.md
typo in API URL
2017-04-19 13:19:01 -04:00
Torkel Ödegaard 11806dfa78 mysql: progress 2017-04-19 17:26:37 +02:00
Daniel Lee 1e29d4fcfa docs: adds note in changelog for #8110 2017-04-19 15:07:47 +02:00
Daniel Lee ee3a553800 Merge pull request #8163 from bashgeek/telegram_metrics
Add metrics/matches to Telegram notifications (proposed fix for #8110)
2017-04-19 15:03:03 +02:00
Daniel Schmitz d123b951e9 Fixed parsing error 2017-04-19 17:02:52 +08:00
Torkel Ödegaard e164eba677 mysql: began work on backend macro engine 2017-04-19 10:10:08 +02:00
Daniel Schmitz 7078d5d524 Added metrics/matches to telegram notifications; Added some HTML to beautify 2017-04-19 15:53:23 +08:00
Mitsuhiro Tanda 62d11c147b (cloudwatch) fix dimension value find query (#8159) 2017-04-19 07:12:59 +02:00
Torkel Ödegaard 456b07b766 annotations: removing wip stuff so I can merge to master 2017-04-18 17:28:39 +02:00
Torkel Ödegaard 0bae7212f6 annotations: removed category stuff, my mistake, we need tags 2017-04-18 17:15:22 +02:00
Torkel Ödegaard 73718afb79 annotations: mini fix to event manager 2017-04-18 17:09:06 +02:00
Torkel Ödegaard 809467955a Merge branch 'master' into create-annotations 2017-04-18 17:07:44 +02:00
Torkel Ödegaard db36639ffc fix: #8111 2017-04-18 16:58:34 +02:00
Torkel Ödegaard 3ee886d0fb Merge branch 'query-references' 2017-04-18 16:30:28 +02:00
Torkel Ödegaard 85baa50194 recfactor: added unit test for the new scenario, #8143 2017-04-18 16:30:20 +02:00
Torkel Ödegaard 473006e8cf build: updated grunt watch to explain best usage 2017-04-18 15:36:38 +02:00
Kevin Conaway 5dad324ab7 #8144 Only require root to start/stop grafana (#8145) 2017-04-18 13:49:04 +02:00
Alexander Zobnin 7aa992bde4 initial category types 2017-04-17 18:56:39 +03:00
Alexander Zobnin f0816b37bd rename annotation_category to category 2017-04-17 18:53:10 +03:00
Dan Cech a64e000f1a process this.target separately to fix issues with tests 2017-04-17 11:10:55 -04:00
Dan Cech 715453204e make sure graphite queries containing references are properly updated 2017-04-17 10:47:25 -04:00
Alexander Zobnin 5df82be290 create-annotations: fix missing lodash import 2017-04-17 11:37:23 +03:00
Thomas Szymanski f2dffeb543 Influxdb datasource: fix language in stacking helpful info section (#8134) 2017-04-16 11:56:29 +02:00
Torkel Ödegaard fa2a7db657 ux: create annotations 2017-04-14 23:10:56 +02:00
Torkel Ödegaard 03ef1fd758 refactoring: event / annotation handling in graph panel broken out 2017-04-14 22:56:01 +02:00
Torkel Ödegaard 60ef7d8768 Merge branch 'master' into create-annotations 2017-04-14 22:36:34 +02:00
Torkel Ödegaard aa47b9bf5c refactoring: simplified backend_srv and subUrl handling, #8122 2017-04-14 19:01:08 +02:00
Torkel Ödegaard b77991f69b refactoring: minor changes to #8122 2017-04-14 16:00:52 +02:00
Dan Cech f490c5f12c use X-Grafana-Org-Id header to ensure backend uses correct org (#8122) 2017-04-14 15:47:39 +02:00
Ivan Babrou fb163450a5 Change prometheus semantics from step to min step (#8073)
Previously `Step` parameter would set a hard value for any zoom level.

Now it's renamed to `Min step` and sets the minimal value of `step` parameter
to Prometheus query. User would usually want to set it to the scraping interval
of the target metric to avoid having shap cliffs on graphs and extra load
on Prometheus. Actual `step` value is calculated as the minimum of automatically
selected step (based on zoom level) and user provided minimal step. If user
did not provide the step, then automatic value is used as is.

Example bahavior for `60s` scrape intervals:

* `5s` automatic interval, no user specified min step:
  * Before: `step=5`
  * After: `step=5`
* `5s` automatic interval, `1m` user specified min step:
  * Before: `step=5`
  * After: `step=60`
* `5m` automatic interval, `1m` user specified min step:
  * Before: `step=60` (not really visible, too dense)
  * After: `step=300` (automatic value is picked)

See:

* https://github.com/grafana/grafana/issues/8065
* https://github.com/prometheus/prometheus/issues/2564
2017-04-14 14:51:22 +02:00
Torkel Ödegaard a151de1d37 progess on adding annotations 2017-04-14 14:43:06 +02:00
Torkel Ödegaard 0335c1f368 ux: updated styles a bit 2017-04-14 13:08:03 +02:00
Torkel Ödegaard ea92ddccb3 create annotations progress 2017-04-14 12:46:02 +02:00
Torkel Ödegaard ff426ae9a3 more work on annotations 2017-04-14 12:23:32 +02:00
Torkel Ödegaard dbe5480edc create annotations work 2017-04-14 11:41:02 +02:00
Torkel Ödegaard 2fce88ee62 ux: popover forms 2017-04-14 10:18:49 +02:00
Dan Cech 3a607f96a3 fix bug in log sprintf calls (#8124) 2017-04-14 07:45:36 +02:00
Torkel Ödegaard c68fffcd6d ux: popover forms 2017-04-13 20:28:13 +02:00
Torkel Ödegaard 2f61fc6afe ux: made progress on popover forms 2017-04-13 18:39:49 +02:00
Torkel Ödegaard dbeeb32ab6 Merge branch 'master' into popover-forms 2017-04-13 16:22:08 +02:00
Alexander Zobnin ab99a7c1c7 graph(create annotation): add initial annotation_category table 2017-04-13 16:57:22 +03:00
Torkel Ödegaard dd3e594dd7 fix: scroll issue and positioning of info-popover 2017-04-12 21:20:47 +02:00
Torkel Ödegaard 9c246ba301 docs: fixed http docs for alert notifications, fixes #8105 2017-04-12 20:57:22 +02:00
Alexander Zobnin 2142323da9 graph(create annotation): refactor, AddAnnotationModalCtrl 2017-04-12 21:07:39 +03:00
Alexander Zobnin 17d3970673 graph(create annotation): push one annotation with time from and time to 2017-04-12 21:04:18 +03:00
Alexander Zobnin ef99ff0ad7 graph(create annotation): use single description for range 2017-04-12 20:37:33 +03:00
Alexander Zobnin 8a1c35e1c2 graph(create annotation): refactor, fix two modal after range selection
bind create annotation handler directly to plotclick event, not to global graph-click
2017-04-12 20:27:32 +03:00
Torkel Ödegaard de21be30d2 ux: working on how to show form in popover 2017-04-12 17:28:32 +02:00
Alexander Zobnin eeb998d712 Merge remote-tracking branch 'upstream/create-annotations' into create-annotations 2017-04-12 17:36:40 +03:00
Torkel Ödegaard 593b2ef866 annotation: added region support to annoations 2017-04-12 16:26:34 +02:00
Torkel Ödegaard b867921b3b annotation: cleanup 2017-04-12 15:49:59 +02:00
Torkel Ödegaard 0156a94a49 annotations: you can now read annoations via manually created annoation query 2017-04-12 15:46:41 +02:00
Alexander Zobnin aff6aa081c Merge remote-tracking branch 'upstream/create-annotations' into create-annotations 2017-04-12 16:20:36 +03:00
Alexander Zobnin d2f3d7d138 graph(add annotation): get alerts for all panels 2017-04-12 16:06:48 +03:00
Torkel Ödegaard 78f4bd2de9 Merge branch 'create-annotations' of github.com:grafana/grafana into create-annotations 2017-04-12 15:01:31 +02:00
Torkel Ödegaard 752b42798a annotations: added new options hide toggle, and show option 2017-04-12 15:01:17 +02:00
Alexander Zobnin 232513bb4e graph(add annotation): refactor
pass ctrlKey and metaKey through flot events
2017-04-12 15:26:34 +03:00
Tyndie 20ac8bf83e Set .go tab size to 4 in .editorconfig (#8099)
Tab size was added as 2 in .editorconfig but a tab size of 4 is used
throughout go code base.

This can cause editors such as vscode to automatically reformat open .go
files to tab size 2 from 4.
2017-04-12 10:59:50 +02:00
Torkel Ödegaard 8eb112d119 plugins: refactoring builtIn data source concept, now means data source plugins that you do not need to add via data sources page, that is automatically added as selectable data source, #8095 2017-04-12 08:23:44 +02:00
Torkel Ödegaard e80494390a Merge branch 'always_displayed_datasources' of https://github.com/ctide/grafana into ctide-always_displayed_datasources 2017-04-12 07:44:59 +02:00
Torkel Ödegaard b3df1aa9bd org: fixed issue with orgId query param redirect handling when grafana is under subpath and reverse proxy, fixes #8089 2017-04-12 07:11:08 +02:00
Mitsuhiro Tanda d2bf2e86ed upgrade to aws-sdk-go v1.8.11 (#8091)
* upgrade to aws-sdk-go v1.8.11

* fix test
2017-04-12 06:40:44 +02:00
Torkel Ödegaard 09cec3118f docs: updated go and node version requirements for building, fixes #8097 2017-04-12 06:39:26 +02:00
Chris Burkhart d12dc2bfa7 Add alwaysDisplayed option to datasource plugins, this will allow it to show up as an option to select when adding queries to a panel without actually adding it as a datasource. 2017-04-11 13:47:53 -07:00
Torkel Ödegaard 07466b6725 security: fixed returning info on weither user exists or not in password reset call, fixes #7619 2017-04-11 16:50:16 +02:00
Torkel Ödegaard a109049de4 smpt: Added smtp docker block 2017-04-11 16:41:07 +02:00
Torkel Ödegaard 89a7c2c686 influxdb: validate database exist when saving data source, fixes #7864 2017-04-11 15:05:30 +02:00
Torkel Ödegaard 83e0f69cde Merge branch 'master' of github.com:grafana/grafana 2017-04-11 14:43:40 +02:00
Torkel Ödegaard 9099119f62 grunt: minor watch fix 2017-04-11 14:42:35 +02:00
Torkel Ödegaard 9bdcc4ec5f influxdb: holt winters edits 2017-04-11 14:40:08 +02:00
Torkel Ödegaard e0640487df Update CHANGELOG.md 2017-04-11 13:38:13 +02:00
Daniel Lee 3ca3c96226 profiling: adds profiling and tracing
If grafana-server binary is started with the -profile flag then
tracing will create a trace.out file and pprof data can be accessed
on the 6060 port.

A custom port for pprof profiling can be set with the -profile-port
flag.
2017-04-11 10:32:18 +02:00
Alexander Zobnin f42202e665 Merge branch 'master' into graph-annotations 2017-04-11 10:27:37 +03:00
Alexander Zobnin 70bca219e3 graph(add annotation): Add keybinding for CTRL key 2017-04-11 10:24:21 +03:00
Alexander Zobnin d553498a33 graph(add annotation): initial backend implementation #1286 2017-04-10 20:22:58 +03:00
Torkel Ödegaard 0384eecf5c fix: minor fix for bug when saving alert with empty message, fixes #7927 2017-04-10 15:26:05 +02:00
Daniel Lee 2877ad1a7d docs: manual installation of plugins 2017-04-10 15:01:40 +02:00
Alexander Zobnin 362860f687 graph(add annotation): able to select region (start and stop time) #1286 2017-04-10 12:45:08 +03:00
Davide Setti 997da1b266 fix a typo in the shortcut help modal (#8078)
Collapse all ros -> Collapse all rows
2017-04-10 10:10:32 +02:00
Torkel Ödegaard 337b3295bd docs: updated changelog 2017-04-10 09:45:44 +02:00
Simen Bekkhus 21ae987bcd If earlier dashboard refresh was supressed, force a new one on page becoming visible (#8076) 2017-04-10 09:43:35 +02:00
Alfred Krohmer 41171f8a5c Add a link to a graph image in Pushover notifications (#8075) 2017-04-10 09:17:37 +02:00
Alexander Zobnin 32d34aed7a graph: initial Add Annotation flow #1286 2017-04-08 19:44:40 +03:00
Torkel Ödegaard efca9e904d Merge branch 'mixed_typeahead' of https://github.com/mtanda/grafana into mtanda-mixed_typeahead 2017-04-07 12:17:19 +02:00
Torkel Ödegaard 1cd632cc43 plugins: added state property to plugins 2017-04-07 12:00:03 +02:00
Torkel Ödegaard 26804d630f Merge branch 'master' into sql-proxy 2017-04-07 10:34:51 +02:00
Torkel Ödegaard 3b47efe70e graph: minor change to histogram buckets input field 2017-04-07 10:16:57 +02:00
Torkel Ödegaard 7ec6e84fe8 adhocfilters: minor escape change 2017-04-07 10:08:16 +02:00
Alexander Zobnin 7e14797b10 graph: initial histogram support #600 (#8053)
* graph: initial histogram support #600

* graph histogram mode: add Bars number option

* graph histogram mode: fix X axis ticks calculation

* graph histogram mode: change bar style (align and width)

* refactor(graph): move histogram functions into separate module

* graph histogram mode: rename series to "count"

* graph histogram mode: fix errors if no data

* refactor(graph and heatmap): move shared code into app/core

* graph: add tests for histogram mode
2017-04-07 10:07:30 +02:00
tamayika e6cc5df9d9 Fix restoration of ad-hoc variable value issue (#8057)
* Fix restoration of ad-hoc variable value issue

* Escape delimiters in ad-hoc variable URL

* Remove unnecessary newline
2017-04-07 09:31:36 +02:00
wrp c219498aab Fix typo: "your" -> "your're" (#8064) 2017-04-07 09:29:46 +02:00
Torkel Ödegaard f5f0d94ad4 fix: temp/testing fix for hanging issue, #8033 2017-04-06 13:18:50 +02:00
Calle Pettersson a79102b42d Fix ldap ca_cert example/docs for proper syntax (#8044) 2017-04-06 09:53:11 +02:00
Alexander Zobnin 2b81bfe9bf alerting: fix $timeFilter cannot be used twice (#7969) (#8037) 2017-04-05 17:17:55 +02:00
Alexander Zobnin 308d46e4ef Fix 8013 (#8027)
* Add @ngInject to HeatmapCtrl constructor, issue #8013

* Remove unused loadPluginCss
2017-04-04 11:02:25 +02:00
Torkel Ödegaard 48c4e549f5 Revert "support panel repeat for datasource template variable (#7711)"
This reverts commit 554f972a25.
2017-04-04 09:28:33 +02:00
Torkel Ödegaard dd800fd14d fix: table panel could not show annotations due to bug introduced in 4.2, fixes #8023 2017-04-03 22:07:09 +02:00
Torkel Ödegaard 95e0010a5b fix: sqlite3 and concurrent write requests caused database locked error some times, depending on how many concurrent requests and speed of disk drive. Fixed by reducign the number of concurrent db connections to 1 for sqlite3, fixes #7992 2017-04-03 09:42:11 +02:00
Torkel Ödegaard 4a2efb1007 alerting: removed width restriction on message, fixes #8000 2017-03-31 23:07:57 +02:00
Alexander Zobnin ecd404335e heatmap: fix error with null values in ES converter (#7999) 2017-03-31 17:13:26 +02:00
Torkel Ödegaard f77f8ebfc6 heatmap: changes to color spectrum, inverted some on dark theme 2017-03-31 17:12:50 +02:00
Torkel Ödegaard 3ed1600b90 Merge branch 'master' of github.com:grafana/grafana 2017-03-31 16:09:16 +02:00
Torkel Ödegaard 39e45004cd heatmap: inverted the color schemes 2017-03-31 16:09:00 +02:00
Torkel Ödegaard 4445c9ce60 Merge branch 'heatmap-panel' of https://github.com/alexanderzobnin/grafana into alexanderzobnin-heatmap-panel 2017-03-31 14:26:52 +02:00
Torkel Ödegaard 5af81b974e mysql: graph showing 2017-03-31 13:57:10 +02:00
Torkel Ödegaard a7babfb7cf tech: updated xorm libs 2017-03-31 12:54:39 +02:00
Torkel Ödegaard bd3f825a6e updated go-sql-driver 2017-03-31 12:50:07 +02:00
Torkel Ödegaard e5a5bef200 mysql: minor update 2017-03-31 12:49:05 +02:00
Alexander Zobnin b18ed0b98f heatmap: calculate bucket size automatically for ES histogram 2017-03-31 12:51:43 +03:00
Torkel Ödegaard d6d2080f11 mysql: minor progress on response processing 2017-03-31 11:45:25 +02:00
Alexander Zobnin cb136c07b8 heatmap: add function for bucket size calculation 2017-03-31 11:44:44 +03:00
Torkel Ödegaard af0ecd440f Update CHANGELOG.md 2017-03-31 07:32:44 +02:00
Mitsuhiro Tanda 554f972a25 support panel repeat for datasource template variable (#7711)
* support panel repeat for datasource template variable

* support All option
2017-03-31 07:31:15 +02:00
Alexander Zobnin 9ddfeaa9c2 heatmap: initial ES histogram support 2017-03-30 21:36:36 +03:00
Torkel Ödegaard bd4f073425 mysql: minor update 2017-03-30 20:23:40 +02:00
Torkel Ödegaard 998f04e1e8 mysql: testdata 2017-03-30 20:01:04 +02:00
Alexander Zobnin 3170f0d84a heatmap: add ES histogram converter 2017-03-30 20:55:10 +03:00
Torkel Ödegaard 34d92b0e79 mysql: starting work on test data 2017-03-30 18:03:50 +02:00
Alexander Zobnin 114431beed heatmap: add tests for heatmap_data_converter 2017-03-30 18:21:22 +03:00
timolehto 6e304e6e42 comments: Typos in defaults.ini (#7988) 2017-03-30 17:12:00 +02:00
Torkel Ödegaard 080d2a2054 mysql: reading arbitrary SQL data in go is really strange, data is only in strings? 2017-03-30 13:46:46 +02:00
Kazumasa Kohtaka aada5181fa docs: fix typo in a section describing search API (#7984) 2017-03-30 08:54:32 +02:00
Torkel Ödegaard 00fcaaf171 mysql: commented out old code from old PR 2017-03-29 22:55:37 +02:00
Torkel Ödegaard 8f90c6115d mysql: progress on mysql data source 2017-03-29 22:54:18 +02:00
Torkel Ödegaard 1ecdf34938 sql: wip mysql stuff 2017-03-29 20:43:20 +02:00
Torkel Ödegaard c33fa27ed8 Update latest.json 2017-03-29 17:28:52 +02:00
Torkel Ödegaard 6965064ea9 Merge branch 'master' into sql-proxy 2017-03-29 16:40:14 +02:00
Torkel Ödegaard 91c184d3e0 elasticseach: fixed broken unit test 2017-03-29 16:33:44 +02:00
Torkel Ödegaard 3b235612fd elasticsearch: improve validation and error message when adding/testing elasticsearch ds, #7836 2017-03-29 16:03:28 +02:00
Daniel Lee 5702c57452 panel: remove unneeded options for tooltip 2017-03-29 16:01:27 +02:00
Alexander Zobnin 84b15fc74c Merge branch 'master' into heatmap-panel 2017-03-29 15:46:04 +03:00
Torkel Ödegaard 085c4c56b8 elasticearch: added support for histogram aggregations, closes #3164 2017-03-29 13:44:50 +02:00
Alexander Zobnin 65a829b64d heatmap tests: fix timezone-dependent test error 2017-03-29 13:41:19 +03:00
Alexander Zobnin 7c5b9f8c5b heatmap tooltip: change "values" label to "count" 2017-03-29 12:41:34 +03:00
Seuf 319b8d8fca Configurable signout menu activation (#7968) 2017-03-29 11:33:28 +02:00
Daniel Lee ac39ed4218 panel: fixes #7970. Description tooltip overflow.
This seems to work for the three use cases:

- Overflow on the left
- Overflow on the right
- Elements that are out of view on page load
2017-03-29 11:16:16 +02:00
Alexander Zobnin 7770c38e30 heatmap: test for Y axis rendering 2017-03-29 11:30:30 +03:00
Alexander Zobnin 72e313a3dd heatmap: fix type error on buckets object 2017-03-29 11:29:58 +03:00
Torkel Ödegaard 98554e9fbe docs: added config entry for ldap allow_sign_up option, #7972 2017-03-29 08:42:10 +02:00
Alexander Zobnin ac347fa06a heatmap: fix error while loading panel in editor mode 2017-03-28 18:09:15 +03:00
Alexander Zobnin ece6fd73a1 heatmap: add initial rendering tests 2017-03-28 17:46:10 +03:00
Dan Cech 24d4e50343 utf8mb4 encoding (#7959)
* use utf8mb4 character set for connections to mysql

* use utf8mb4 character set for tables, shorten varchar fields used in unique indexes

* migration type to update table character set

* update table character sets

* set charset for temp_user.status

* gofmt
2017-03-28 14:34:53 +02:00
Jaroslav Hanslík e91a078105 Slack notification should contain fallback text (#7961) 2017-03-28 10:05:44 +02:00
Dan Cech dde8583db8 xorm engine.SetMaxConns is a deprecated alias for engine.SetMaxOpenConns 2017-03-27 18:04:03 -04:00
Alexander Zobnin c9801595e5 heatmap: add heatmap_ctrl tests and fix errors 2017-03-27 19:04:29 +03:00
Daniel Lee 09ec8cdebe Merge pull request #7947 from crmac/docs-whats-new-4.0-fixes
Fix some spelling/grammar/wording problems in What's New in Grafana v4.0
2017-03-27 09:01:09 +02:00
crmacleo 54883e09d5 docs: fix some spelling/grammar/wording issues 2017-03-26 17:27:19 -07:00
Alexander Zobnin 0a56db7745 Add unit tests for heatmap_ctrl. 2017-03-26 18:22:54 +03:00
Alexander Zobnin 0023657701 Fix bucket size calculation if all values are 0; 2017-03-24 15:26:27 +03:00
Alexander Zobnin 96e91b5a0f Move css styles to public/sass/components/_panel_heatmap.scss 2017-03-24 15:15:01 +03:00
Alexander Zobnin 68f5e75eba Move heatmap panel into core grafana. 2017-03-24 14:18:26 +03:00
Daniel Lee 44c9ba2edf docs: add query parameter to api user search
ref #7469
2017-03-23 18:09:14 +01:00
Daniel Lee 08984448d0 Merge pull request #7923 from huydx/patch-1
Update README.md
2017-03-23 17:43:07 +01:00
0x6875790d0a 77ca62b1bc Update README.md 2017-03-24 01:04:18 +09:00
Daniel Lee f45d637025 auth: fix warning in test 2017-03-23 15:52:08 +01:00
Daniel Lee 5773499dba docs: adds note for #6428 2017-03-23 15:33:59 +01:00
Daniel Lee beb85f413a oauth: delete session key instead of set to empty
Adds the Delete function to the Session wrapper so that the Macaron
function for deleting keys from a Session can be used.

https://go-macaron.com/docs/middlewares/session#implement-provider-interface
2017-03-23 15:26:13 +01:00
Daniel Lee 79cef75fed Merge pull request #7426 from Altoros/altoros/authorization-errors
Add common type for oauth authorization errors
2017-03-23 15:25:35 +01:00
Torkel Ödegaard 83d864e7e4 fix: graph and fill below to issue, fixes #7916 2017-03-23 14:23:22 +01:00
Torkel Ödegaard 6828d35480 packaging: build fix 2017-03-23 12:38:42 +01:00
Torkel Ödegaard 887867165c packaging: testing fix 2017-03-23 11:31:47 +01:00
Torkel Ödegaard 7864828e75 packaging: publish nightly builds 2017-03-23 11:10:01 +01:00
Tobias Wolf 68e6700663 Add an After= DB ordering relation to systemd .service (#7903)
In systemd `After=` merely codes an ordering relation and does not start
other units.

Grafana needs to specify that it wants to start up _after_ either of the
supported DB services have started, _if they start_.

Enabling the database services, however, is out of scope for Grafana.
2017-03-22 16:49:35 +01:00
Torkel Ödegaard 8aa00f9227 build: updated publish script 2017-03-22 15:07:24 +01:00
Torkel Ödegaard b404f32a09 docs: updated download links 2017-03-22 14:26:57 +01:00
Daniel Lee 01f646c191 docs: adds 4.2.0 release date 2017-03-22 14:06:53 +01:00
Torkel Ödegaard 7dd09d4185 Update CHANGELOG.md 2017-03-22 10:51:06 +01:00
Matt 578ba9bbd5 Added scientific notation as a unit for #7763 (#7781) 2017-03-22 10:49:31 +01:00
Torkel Ödegaard 362a349d9f cloudwatch: added #7892 to changelog 2017-03-22 07:20:46 +01:00
gomlgs e99137598e Cloudwatch: Correctly obtain IAM roles within ECS container tasks. (#7892)
We now obtain credentials based on the container task's role
rather than just relying on the credentials of the enclosing
container instance.

Fixes #6700.
2017-03-22 07:15:19 +01:00
Trent White 5ed7d65b0e orange grafana.com seemed too much. making it gray 2017-03-21 13:13:35 -04:00
Torkel Ödegaard b21ad3c376 Merge branch 'master' of github.com:grafana/grafana 2017-03-21 17:10:54 +01:00
Trent White a510d85480 format css 2017-03-21 11:17:28 -04:00
Trent White 182a30e22c style tweak 2017-03-21 11:16:42 -04:00
Trent White d4f2f41088 add dashboard and plugin icons to plugin list and dash search 2017-03-21 11:12:58 -04:00
Daniel Lee 69bec98962 chore: update all grafana.org urls to .com 2017-03-21 15:37:55 +01:00
Daniel Lee b9940e618c profile: locks login fields if disable_login_form
If the auth config variable, disable_login_form, is set to true then
the username and email fields are set to read-only on the profile page.

The reason for this is so that the user does not lock themselves out by
changing their email address or username. Or create a new user by
changing both.

ref #7810
2017-03-21 14:42:32 +01:00
Torkel Ödegaard 0c372f0b85 Merge branch 'v4.2.x' 2017-03-21 10:36:40 +01:00
Daniel Lee 3d3357ee41 docs: add note for #7614 2017-03-20 23:14:33 +01:00
Daniel Lee 94498d533b template: fix validation for required selects
Since upgrading to Angular 1.6.1, selects with a default empty option
no longer show a popup with an error on submit. This fix adds an
empty option that is then removed with ng-if. Having the default
option set to null or undefined seems to be the cause of the bug.

The list of changes in 1.6 is here but could not find any obvious
cause for this bug:

https://docs.angularjs.org/guide/migration#migrating-from-1-5-to-1-6
2017-03-20 22:51:55 +01:00
Daniel Lee 65910db991 template: tweak to warning message 2017-03-20 17:14:24 +01:00
Torkel Ödegaard c1c241698a Merge branch 'master' of github.com:grafana/grafana 2017-03-20 16:05:13 +01:00
Torkel Ödegaard adf7645bf5 docs: added alias 2017-03-20 16:04:57 +01:00
Daniel Lee e527aebbf1 Merge pull request #7758 from thuck/template_self_reference_7614
Validate query to avoid self-reference of variable #7614
2017-03-20 15:33:48 +01:00
Torkel Ödegaard be5c4f47a6 s3: support for alternative s3 bucket url syntax, closes #7871 2017-03-20 14:10:44 +01:00
Torkel Ödegaard 3f76d76be6 Merge branch 'v4.2.x' 2017-03-20 13:39:53 +01:00
Torkel Ödegaard 122b4695e7 Update CHANGELOG.md 2017-03-20 13:37:55 +01:00
Torkel Ödegaard 711081950e lib: updated dependency, fixes #7579 2017-03-20 13:30:22 +01:00
Torkel Ödegaard dce63ec1d8 docs: updated changelog 2017-03-20 11:40:06 +01:00
Torkel Ödegaard 970619ed52 Merge branch 'disable-login' 2017-03-20 11:18:41 +01:00
Torkel Ödegaard 6f324cd794 refactor: minor refactorings of #7876 2017-03-20 11:18:29 +01:00
Torkel Ödegaard 4d4e165be7 links: updated links from grafana.net to grafana.com 2017-03-20 10:20:32 +01:00
Mitsuhiro Tanda a67497e679 add new s3 metrics (#7846) 2017-03-20 09:09:08 +01:00
Jens L 5785bfe0cc Add more information for generic oauth2 (#7880)
Add reference to OpenID's userinfo_endpoint (as in #6351)
2017-03-20 08:36:43 +01:00
Denis Doria 87027b0f77 Do not collapse if there is only 1-3 queries #7836 (#7878)
Also has the side effect of new panels having not collapsed queries when
being created
2017-03-18 15:23:40 +01:00
Torkel Ödegaard 50718b592c docs: added aliases 2017-03-18 08:25:26 +01:00
Dan Cech 51bdb60296 fix docs.grafana.org/plugins 2017-03-17 18:41:02 -04:00
Dan Cech 737c29ec8c disable inviting new users to orgs if login form is disabled 2017-03-17 16:35:05 -04:00
Torkel Ödegaard aaf013b360 Merge branch 'master' of github.com:grafana/grafana 2017-03-17 19:33:38 +01:00
Torkel Ödegaard 19516ebcce docs: minor fix 2017-03-17 19:33:31 +01:00
Andrii Skomorokhov 5cb51631db Fixed position of tooltip with description at graph. (#7854) 2017-03-17 11:48:28 +01:00
Daniel Lee 76fa363613 Merge pull request #7867 from pandurang90/opsgenie_typo_fix
Typo fix for OpsGenie
2017-03-17 10:31:47 +01:00
Pandurang Waghulde f3cce7efc9 typo fix for OpsGenie 2017-03-17 12:57:52 +05:30
Daniel Lee 38cab50a0c Merge pull request #7843 from gkman/patch-1
Update alerting.md
2017-03-16 12:41:03 +01:00
Torkel Ödegaard 7856e2f16b fix: metrics_panel and time range issue introduced earlier today, fixes #7849 2017-03-16 12:20:23 +01:00
Torkel Ödegaard 32f89f65da fix: Data source group by time interval did not take effect on initial query after dashboard load, fixes #7839 2017-03-16 09:54:33 +01:00
Gregory Kman e9ad71abed Update alerting.md
Add missing `"`
2017-03-15 12:00:03 -05:00
Torkel Ödegaard 0b73369c4b docs: fixed docs title issue 2017-03-14 12:21:22 +01:00
Torkel Ödegaard b05fca4fd7 Merge branch 'master' of github.com:grafana/grafana 2017-03-14 11:07:37 +01:00
Torkel Ödegaard 23954f775b Update ISSUE_TEMPLATE.md 2017-03-14 09:46:32 +01:00
Torkel Ödegaard f42ef5fe17 Update ISSUE_TEMPLATE.md 2017-03-14 09:44:19 +01:00
Torkel Ödegaard 69ff97305f Update ISSUE_TEMPLATE.md 2017-03-14 09:44:09 +01:00
Torkel Ödegaard 967cdd73e1 Update ISSUE_TEMPLATE.md 2017-03-14 09:43:50 +01:00
Torkel Ödegaard 9e27b8ee47 Update README.md 2017-03-13 23:05:47 +01:00
Torkel Ödegaard 98b65641c3 Update README.md 2017-03-13 23:05:04 +01:00
Torkel Ödegaard 0bb8a920ca Update README.md 2017-03-13 21:32:28 +01:00
Torkel Ödegaard b471e7e448 updated 2017-03-13 20:17:46 +01:00
Torkel Ödegaard e189400f7c Merge branch 'master' into rebrand-docs 2017-03-13 20:14:02 +01:00
Daniel Lee b93a2887a8 docs: add note for #3090 2017-03-13 11:44:02 +01:00
Daniel Lee 84ef6b9d48 Merge branch 'bigbenhur-autologscale'
Closes #5278 and closes #3090
2017-03-13 11:17:45 +01:00
Denis Doria 891df21969 Small fix for the Y-Max/Y-Min inputs on Axes (#7811) 2017-03-13 09:32:36 +01:00
Daniel Lee 77921c4dcd renderpng: fixes invalid image link (#7797)
Closes #7770
2017-03-13 09:31:59 +01:00
Jan Rückert 8637207b55 Change 60-day date range back to 90 days (#7803) 2017-03-11 16:17:35 +01:00
Daniel Lee 2580b61088 docs: adds note for #7663 2017-03-11 14:05:25 +01:00
Daniel Lee 6799b766a4 Merge pull request #7775 from hagen1778/prometheus-textarea-query
Make Prometheus query field a textarea #7663
2017-03-11 14:00:37 +01:00
Torkel Ödegaard 25318f5848 Merge branch 'master' into rebrand-docs 2017-03-11 12:36:58 +01:00
Daniel Lee e19b48840f graph: merge fixes for #5278
This is an old PR so had some problems after merging in master.

- Fix for min and max that were not getting passed into the
applyLogScale function
- Fix for when min/max were undefined rather than null
- Fix for decimal ticks, as this PR populates the ticks itself then
it also needs to calculate the number of decimal places too. Flot
was showing the wrong number of decimal places sometimes otherwise
on the y-axis.
2017-03-10 18:46:36 +01:00
Daniel Lee 28cf229707 Merge branch 'autologscale' of git://github.com/bigbenhur/grafana into bigbenhur-autologscale 2017-03-10 11:57:00 +01:00
Daniel Lee 22553b154a docs: add note for #7799 2017-03-10 10:41:30 +01:00
Daniel Lee 9b806bc209 Merge pull request #7799 from thuck/influxdb_limit_fix_glow
Small fix for the "glow" when focus the field for LIMIT and SLIMIT
2017-03-10 09:12:53 +01:00
thuck 58afb1c7d6 Small fix for the "glow" when focus the field for LIMIT and SLIMIT 2017-03-09 21:22:40 +01:00
Daniel Lee 74c795b294 panel: use meta.soloMode instead of url check
when checking if rendering a png for lazy loading of panels.
2017-03-09 16:55:16 +01:00
Daniel Lee c176de89c9 docs: add notes for #6065 #7232 and #5216 2017-03-09 14:31:27 +01:00
Daniel Lee a30cf204d7 influx: small ux changes to query editor 2017-03-09 14:18:36 +01:00
Torkel Ödegaard 952cc1d883 alerting: fixed width of query component in alert tab 2017-03-09 12:56:49 +01:00
Daniel Lee 2f5814d51c Merge pull request #7735 from thuck/influxdb_limit
Included LIMIT, SLIMIT and ORDER BY time for influxdb. closes #6065 and closes #7232
2017-03-09 09:23:04 +01:00
Torkel Ödegaard 7f8a3a0a2d dashboard: lazy loading panels as they become visible,fix, removed debunce #5216 2017-03-09 09:08:34 +01:00
Torkel Ödegaard aee8f0b75e opentsdb: fix for OpenTSDB and multi value template variable in metric field, fixes #7754 2017-03-09 08:28:31 +01:00
Torkel Ödegaard b272f5144a fix: graphite query ctrl, removed unnesserary check for empty paths, fixes #7740 2017-03-09 07:31:00 +01:00
Torkel Ödegaard 073dec8ba8 Merge branch 'master' of github.com:grafana/grafana 2017-03-09 07:06:04 +01:00
Torkel Ödegaard bb2eb00b0e minor data source edit form improvement 2017-03-09 07:05:49 +01:00
Mitsuhiro Tanda be123a07c5 (prometheus) adjust annotation step (#7768)
* (prometheus) adjust annotation step

* (prometheus) add step option
2017-03-09 06:53:50 +01:00
hagen1778 04d90d7139 Make Prometheus query field a textarea #7663 2017-03-08 21:30:20 +02:00
thuck b8a82827b9 Fix ORDER BY to look like GROUP BY 2017-03-08 20:22:01 +01:00
Daniel Lee 588955c752 Merge branch 'jifwin-load_on_Scroll' 2017-03-08 19:06:59 +01:00
Daniel Lee bd348a47c7 panel: update to #7452 panel loading on scroll
Moves the logic up a level to the panel_ctrl. This cleans up the code
and makes the lazy loading available for all panels.

Removes the config option and making this default behavior. We can
add back the config option if we get feedback that it is needed during
the beta phase of the v4.3.0 release.

Unbind the scroll handler on panel destroy to avoid memory leaks.

Fix for png rendering, it did not match all forms of dashboard-solo.
e.g. /render/dashboard-solo/db...

Fix for when taking a snapshot. All the panels get refreshed then
even the panels that are not visible.

Closes #5216.
2017-03-08 19:02:45 +01:00
Daniel Lee 4f06202e9a build: bumped version to 4.3.0 2017-03-08 17:10:51 +01:00
thuck 1cf569ac8e Fix tabs vs space 2017-03-08 08:25:32 +01:00
thuck 555acacd6d Validate query to avoid self-reference of variable #7614 2017-03-07 23:29:16 +01:00
Daniel Lee 08b2edf98c Merge branch 'load_on_Scroll' of git://github.com/jifwin/grafana into jifwin-load_on_Scroll 2017-03-07 15:58:14 +01:00
thuck c3eb9da160 Finish query builder for LIMIT, SLIMIT and ORDER BY time #6065 2017-03-05 23:41:16 +01:00
thuck f577dd0f38 Including LIMIT, SLIMIT and ORDER BY time on influxdb #6065
Initial work for the query builder interface
2017-03-05 23:13:46 +01:00
jifwin c09cd4ba29 make load on scroll configurable and use debouce 2017-03-01 15:02:59 +00:00
Mitsuhiro Tanda 988ed06970 typeahead support in mixed datasource selection 2017-02-23 00:48:16 +09:00
Torkel Ödegaard 1d9b3871fa Merge branch 'rebrand-docs' of github.com:grafana/grafana into rebrand-docs 2017-02-20 12:12:47 +01:00
Torkel Ödegaard bc9165bdfc Merge branch 'master' into rebrand-docs 2017-02-20 12:11:22 +01:00
Torkel Ödegaard 1e26a8e68a docs(): rebrand updates 2017-02-10 08:58:53 +01:00
Torkel Ödegaard 0d8cdf0ebe docs(): rebrand updates 2017-02-10 08:58:45 +01:00
Torkel Ödegaard c05c6ee7a4 docs(): minor fix 2017-02-08 20:00:39 +01:00
Torkel Ödegaard 0a17217d59 docs(): updating links 2017-02-08 08:23:23 +01:00
Torkel Ödegaard 10e100b080 docs(): updates 2017-02-07 12:27:16 +01:00
Torkel Ödegaard 8a92861133 docs(): fixes for rebranded docs site 2017-02-07 09:09:51 +01:00
Grzegorz Pietrusza a3019a9789 cleanup 2017-02-04 14:30:24 +00:00
Grzegorz Pietrusza 220b65afd2 implement panels loading on scroll 2017-02-04 14:10:40 +00:00
Alexander Menzhinsky 30c334a2b8 Add common type for oauth authorization errors 2017-02-01 16:42:59 +03:00
Torkel Ödegaard 01f1c1b8dc feat(): began refactoring PR #5364 2017-01-31 17:10:27 +01:00
Darrian cdfb24ab85 Added offset interval to specs 2016-12-21 22:58:40 +00:00
Darrian 96f3ee9e4c Added missing category for Predictions 2016-12-21 22:55:18 +00:00
Darrian 27ead53382 Set indentation to tabs 2016-12-21 22:54:56 +00:00
Darrian b8572b69f0 Register new queries available in InfluxDB - Holt Winters fixes #5619
For correct data fill on holt winters predictions, the time function
needed modification to allow a 2nd param for offset, as per
https://docs.influxdata.com/influxdb/v1.0/query_language/data_exploratio
n/#advanced-group-by-time-syntax
2016-12-21 22:30:32 +00:00
Mitsuhiro Tanda d018d2a23f (prometheus) table support 2016-11-23 17:18:37 +09:00
Torkel Ödegaard b65642564a poc for new metric segment 2016-10-08 10:06:47 +02:00
Nozomi Anzai 157435a61c Fix to check white list when the frontend tries to connect DB 2016-08-17 14:33:59 +09:00
Nozomi Anzai bdf68b2183 Fix wrong overwrite of commit:711992c8e2e811abd450cb665008bb0a1b3e29a9 2016-06-30 10:48:39 +09:00
Nozomi Anzai 6586cc4029 Add the datasource of RDBMS (PostgreSQL and MySQL) 2016-06-13 18:24:18 +09:00
bigbenhur ef623846c1 further tests for log-autoscale and log-fixedscale; only generate visible ticks; minor changes to prevent crashes due to bad user input 2016-06-06 10:33:35 +02:00
bigbenhur 29b9d17faa fix crash due to zero or negative data values in graph with log scale 2016-06-03 22:30:38 +02:00
bigbenhur 1e4eb01059 Support auto grid min/max when using log scale, Issue #3090 2016-06-03 15:54:14 +02:00
2022 changed files with 151755 additions and 263141 deletions
-3
View File
@@ -1,3 +0,0 @@
{
"directory": "public/vendor/"
}
+3 -3
View File
@@ -1,7 +1,7 @@
[run]
init_cmds = [
["go", "build", "-o", "./bin/grafana-server", "./pkg/cmd/grafana-server"],
["./bin/grafana-server"]
["./bin/grafana-server", "cfg:app_mode=development"]
]
watch_all = true
watch_dirs = [
@@ -9,9 +9,9 @@ watch_dirs = [
"$WORKDIR/public/views",
"$WORKDIR/conf",
]
watch_exts = [".go", ".ini", ".toml", ".html"]
watch_exts = [".go", ".ini", ".toml"]
build_delay = 1500
cmds = [
["go", "build", "-o", "./bin/grafana-server", "./pkg/cmd/grafana-server"],
["./bin/grafana-server"]
["./bin/grafana-server", "cfg:app_mode=development"]
]
+7 -7
View File
@@ -1,13 +1,6 @@
# http://editorconfig.org
root = true
[*.go]
indent_style = tab
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*]
indent_style = space
indent_size = 2
@@ -15,5 +8,12 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.go]
indent_style = tab
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.md]
trim_trailing_whitespace = false
-3
View File
@@ -1,3 +0,0 @@
{
"url": "https://floobits.com/raintank/grafana"
}
-12
View File
@@ -1,12 +0,0 @@
#*
*.o
*.pyc
*.pyo
*~
extern/
node_modules/
tmp/
data/
vendor/
public_gen/
dist/
+10 -10
View File
@@ -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.
+15 -2
View File
@@ -4,18 +4,19 @@ coverage/
.aws-config.json
awsconfig
/dist
/public/build
/public/views/index.html
/emails/dist
/public_gen
/public/vendor/npm
/tmp
vendor/phantomjs/phantomjs
vendor/phantomjs/phantomjs.exe
docs/AWS_S3_BUCKET
docs/GIT_BRANCH
docs/VERSION
docs/GITCOMMIT
docs/changed-files
docs/changed-files
# locally required config files
public/css/*.min.css
@@ -25,6 +26,8 @@ public/css/*.min.css
*.swp
.idea/
*.iml
*.tmp
.DS_Store
.vscode/
/data/*
@@ -38,4 +41,14 @@ profile.cov
.notouch
/pkg/cmd/grafana-cli/grafana-cli
/pkg/cmd/grafana-server/grafana-server
/pkg/cmd/grafana-server/debug
/examples/*/dist
/packaging/**/*.rpm
/packaging/**/*.deb
/vendor/**/*.py
/vendor/**/*.xml
/vendor/**/*.yml
/vendor/**/*_test.go
/vendor/**/.editorconfig
/vendor/**/appengine*
-21
View File
@@ -1,21 +0,0 @@
{
"preset" : "default",
"lineBreak" : {
"before" : {
"VariableDeclarationWithoutInit" : 0,
},
"after": {
"AssignmentOperator": -1,
"ArgumentListArrayExpression": ">=1"
}
},
"whiteSpace" : {
"before" : {
},
"after" : {
}
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"browser": true,
"esversion": 6,
"bitwise":false,
"curly": true,
"eqnull": true,
+263 -4
View File
@@ -1,8 +1,265 @@
# 4.3.0 (unreleased)
# 5.0.0 (unreleased)
## Minor Enchancements
### WIP (in develop branch currently as its unstable or unfinished)
- Dashboard folders
- User groups
- Dashboard permissions (on folder & dashboard level), permissions can be assigned to groups or individual users
- UX changes to nav & side menu
- New dashboard grid layout system
# 4.2.0-beta2 (unreleased)
# 4.6.0-beta2 (2017-10-17)
## Fixes
* **ColorPicker**: Fix for color picker not showing [#9549](https://github.com/grafana/grafana/issues/9549)
# 4.6.0-beta1 (2017-10-13)
## New Features
* **GCS**: Adds support for Google Cloud Storage [#8370](https://github.com/grafana/grafana/issues/8370) thx [@chuhlomin](https://github.com/chuhlomin)
* **Prometheus**: Adds /metrics endpoint for exposing Grafana metrics. [#9187](https://github.com/grafana/grafana/pull/9187)
* **Graph**: Add support for local formating in axis. [#1395](https://github.com/grafana/grafana/issues/1395), thx [@m0nhawk](https://github.com/m0nhawk)
* **Jaeger**: Add support for open tracing using jaeger in Grafana. [#9213](https://github.com/grafana/grafana/pull/9213)
* **Unit types**: New date & time unit types added, useful in singlestat to show dates & times. [#3678](https://github.com/grafana/grafana/issues/3678), [#6710](https://github.com/grafana/grafana/issues/6710), [#2764](https://github.com/grafana/grafana/issues/2764)
* **CLI**: Make it possible to install plugins from any url [#5873](https://github.com/grafana/grafana/issues/5873)
* **Prometheus**: Add support for instant queries [#5765](https://github.com/grafana/grafana/issues/5765), thx [@mtanda](https://github.com/mtanda)
* **Cloudwatch**: Add support for alerting using the cloudwatch datasource [#8050](https://github.com/grafana/grafana/pull/8050), thx [@mtanda](https://github.com/mtanda)
* **Pagerduty**: Include triggering series in pagerduty notification [#8479](https://github.com/grafana/grafana/issues/8479), thx [@rickymoorhouse](https://github.com/rickymoorhouse)
* **Timezone**: Time ranges like Today & Yesterday now work correctly when timezone setting is set to UTC [#8916](https://github.com/grafana/grafana/issues/8916), thx [@ctide](https://github.com/ctide)
* **Prometheus**: Align $__interval with the step parameters. [#9226](https://github.com/grafana/grafana/pull/9226), thx [@alin-amana](https://github.com/alin-amana)
* **Prometheus**: Autocomplete for label name and label value [#9208](https://github.com/grafana/grafana/pull/9208), thx [@mtanda](https://github.com/mtanda)
* **Postgres**: New Postgres data source [#9209](https://github.com/grafana/grafana/pull/9209), thx [@svenklemm](https://github.com/svenklemm)
* **Datasources**: Make datasource HTTP requests verify TLS by default. closes [#9371](https://github.com/grafana/grafana/issues/9371), [#5334](https://github.com/grafana/grafana/issues/5334), [#8812](https://github.com/grafana/grafana/issues/8812), thx [@mattbostock](https://github.com/mattbostock)
* **OAuth**: Verify TLS during OAuth callback [#9373](https://github.com/grafana/grafana/issues/9373), thx [@mattbostock](https://github.com/mattbostock)
## Minor
* **SMTP**: Make it possible to set specific EHLO for smtp client. [#9319](https://github.com/grafana/grafana/issues/9319)
* **Dataproxy**: Allow grafan to renegotiate tls connection [#9250](https://github.com/grafana/grafana/issues/9250)
* **HTTP**: set net.Dialer.DualStack to true for all http clients [#9367](https://github.com/grafana/grafana/pull/9367)
* **Alerting**: Add diff and percent diff as series reducers [#9386](https://github.com/grafana/grafana/pull/9386), thx [@shanhuhai5739](https://github.com/shanhuhai5739)
* **Slack**: Allow images to be uploaded to slack when Token is precent [#7175](https://github.com/grafana/grafana/issues/7175), thx [@xginn8](https://github.com/xginn8)
* **Opsgenie**: Use their latest API instead of old version [#9399](https://github.com/grafana/grafana/pull/9399), thx [@cglrkn](https://github.com/cglrkn)
* **Table**: Add support for displaying the timestamp with milliseconds [#9429](https://github.com/grafana/grafana/pull/9429), thx [@s1061123](https://github.com/s1061123)
* **Hipchat**: Add metrics, message and image to hipchat notifications [#9110](https://github.com/grafana/grafana/issues/9110), thx [@eloo](https://github.com/eloo)
* **Kafka**: Add support for sending alert notifications to kafka [#7104](https://github.com/grafana/grafana/issues/7104), thx [@utkarshcmu](https://github.com/utkarshcmu)
* **Alerting**: add count_non_null as series reducer [#9516](https://github.com/grafana/grafana/issues/9516)
## Tech
* **Go**: Grafana is now built using golang 1.9
* **Webpack**: Changed from systemjs to webpack (see readme or building from source guide for new build instructions). Systemjs is still used to load plugins but now plugins can only import a limited set of dependencies. See [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) for more details on how this can effect some plugins.
# 4.5.2 (2017-09-22)
## Fixes
* **Graphite**: Fix for issues with jsonData & graphiteVersion null errors [#9258](https://github.com/grafana/grafana/issues/9258)
* **Graphite**: Fix for Grafana internal metrics to Graphite sending NaN values [#9279](https://github.com/grafana/grafana/issues/9279)
* **HTTP API**: Fix for HEAD method requests [#9307](https://github.com/grafana/grafana/issues/9307)
* **Templating**: Fix for duplicate template variable queries when refresh is set to time range change [#9185](https://github.com/grafana/grafana/issues/9185)
* **Metrics**: dont write NaN values to graphite [#9279](https://github.com/grafana/grafana/issues/9279)
# 4.5.1 (2017-09-15)
## Fixes
* **MySQL**: Fixed issue with query editor not showing [#9247](https://github.com/grafana/grafana/issues/9247)
## Breaking changes
* **Metrics**: The metric structure for internal metrics about Grafana published to graphite has changed. This might break dashboards for internal metrics.
# 4.5.0 (2017-09-14)
## Fixes & Enhancements since beta1
* **Security**: Security fix for api vulnerability (in multiple org setups).
* **Shortcuts**: Adds shortcut for creating new dashboard [#8876](https://github.com/grafana/grafana/pull/8876) thx [@mtanda](https://github.com/mtanda)
* **Graph**: Right Y-Axis label position fixed [#9172](https://github.com/grafana/grafana/pull/9172)
* **General**: Improve rounding of time intervals [#9197](https://github.com/grafana/grafana/pull/9197), thx [@alin-amana](https://github.com/alin-amana)
# 4.5.0-beta1 (2017-09-05)
## New Features
* **Table panel**: Render cell values as links that can have an url template that uses variables from current table row. [#3754](https://github.com/grafana/grafana/issues/3754)
* **Elasticsearch**: Add ad hoc filters directly by clicking values in table panel [#8052](https://github.com/grafana/grafana/issues/8052).
* **MySQL**: New rich query editor with syntax highlighting
* **Prometheus**: New rich query editor with syntax highlighting, metric & range auto complete and integrated function docs. [#5117](https://github.com/grafana/grafana/issues/5117)
## Enhancements
* **GitHub OAuth**: Support for GitHub organizations with 100+ teams. [#8846](https://github.com/grafana/grafana/issues/8846), thx [@skwashd](https://github.com/skwashd)
* **Graphite**: Calls to Graphite api /metrics/find now include panel or dashboad time range (from & until) in most cases, [#8055](https://github.com/grafana/grafana/issues/8055)
* **Graphite**: Added new graphite 1.0 functions, available if you set version to 1.0.x in data source settings. New Functions: mapSeries, reduceSeries, isNonNull, groupByNodes, offsetToZero, grep, weightedAverage, removeEmptySeries, aggregateLine, averageOutsidePercentile, delay, exponentialMovingAverage, fallbackSeries, integralByInterval, interpolate, invert, linearRegression, movingMin, movingMax, movingSum, multiplySeriesWithWildcards, pow, powSeries, removeBetweenPercentile, squareRoot, timeSlice, closes [#8261](https://github.com/grafana/grafana/issues/8261)
- **Elasticsearch**: Ad-hoc filters now use query phrase match filters instead of term filters, works on non keyword/raw fields [#9095](https://github.com/grafana/grafana/issues/9095).
### Breaking change
* **InfluxDB/Elasticsearch**: The panel & data source option named "Group by time interval" is now named "Min time interval" and does now always define a lower limit for the auto group by time. Without having to use `>` prefix (that prefix still works). This should in theory have close to zero actual impact on existing dashboards. It does mean that if you used this setting to define a hard group by time interval of, say "1d", if you zoomed to a time range wide enough the time range could increase above the "1d" range as the setting is now always considered a lower limit.
* **Elasticsearch**: Elasticsearch metric queries without date histogram now return table formated data making table panel much easier to use for this use case. Should not break/change existing dashboards with stock panels but external panel plugins can be affected.
## Changes
* **InfluxDB**: Change time range filter for absolute time ranges to be inclusive instead of exclusive [#8319](https://github.com/grafana/grafana/issues/8319), thx [@Oxydros](https://github.com/Oxydros)
* **InfluxDB**: Added paranthesis around tag filters in queries [#9131](https://github.com/grafana/grafana/pull/9131)
## Bug Fixes
* **Modals**: Maintain scroll position after opening/leaving modal [#8800](https://github.com/grafana/grafana/issues/8800)
* **Templating**: You cannot select data source variables as data source for other template variables [#7510](https://github.com/grafana/grafana/issues/7510)
* **MySQL/Postgres**: Fix for max_idle_conn option default which was wrongly set to zero which does not mean unlimited but means zero, which in practice kind of disables connection pooling, which is not good. Fixes [#8513](https://github.com/grafana/grafana/issues/8513)
# 4.4.3 (2017-08-07)
## Bug Fixes
* **Search**: Fix for issue that casued search view to hide when you clicked starred or tags filters, fixes [#8981](https://github.com/grafana/grafana/issues/8981)
* **Modals**: ESC key now closes modal again, fixes [#8981](https://github.com/grafana/grafana/issues/8988), thx [@j-white](https://github.com/j-white)
# 4.4.2 (2017-08-01)
## Bug Fixes
* **GrafanaDB(mysql)**: Fix for dashboard_version.data column type, now changed to MEDIUMTEXT, fixes [#8813](https://github.com/grafana/grafana/issues/8813)
* **Dashboard(settings)**: Closing setting views using ESC key did not update url correctly, fixes [#8869](https://github.com/grafana/grafana/issues/8869)
* **InfluxDB**: Wrong username/password parameter name when using direct access, fixes [#8789](https://github.com/grafana/grafana/issues/8789)
* **Forms(TextArea)**: Bug fix for no scroll in text areas [#8797](https://github.com/grafana/grafana/issues/8797)
* **Png Render API**: Bug fix for timeout url parameter. It now works as it should. Default value was also increased from 30 to 60 seconds [#8710](https://github.com/grafana/grafana/issues/8710)
* **Search**: Fix for not being able to close search by clicking on right side of search result container, [8848](https://github.com/grafana/grafana/issues/8848)
* **Cloudwatch**: Fix for using variables in templating metrics() query, [8965](https://github.com/grafana/grafana/issues/8965)
## Changes
* **Settings(defaults)**: allow_sign_up default changed from true to false [#8743](https://github.com/grafana/grafana/issues/8743)
* **Settings(defaults)**: allow_org_create default changed from true to false
# 4.4.1 (2017-07-05)
## Bug Fixes
* **Migrations**: migration fails where dashboard.created_by is null [#8783](https://github.com/grafana/grafana/issues/8783)
# 4.4.0 (2017-07-04)
## New Features
**Dashboard History**: View dashboard version history, compare any two versions (summary & json diffs), restore to old version. This big feature
was contributed by **Walmart Labs**. Big thanks to them for this massive contribution!
Initial feature request: [#4638](https://github.com/grafana/grafana/issues/4638)
Pull Request: [#8472](https://github.com/grafana/grafana/pull/8472)
## Enhancements
* **Elasticsearch**: Added filter aggregation label [#8420](https://github.com/grafana/grafana/pull/8420), thx [@tianzk](github.com/tianzk)
* **Sensu**: Added option for source and handler [#8405](https://github.com/grafana/grafana/pull/8405), thx [@joemiller](github.com/joemiller)
* **CSV**: Configurable csv export datetime format [#8058](https://github.com/grafana/grafana/issues/8058), thx [@cederigo](github.com/cederigo)
* **Table Panel**: Column style that preserves formatting/indentation (like pre tag) [#6617](https://github.com/grafana/grafana/issues/6617)
* **DingDing**: Add DingDing Alert Notifier [#8473](https://github.com/grafana/grafana/pull/8473) thx [@jiamliang](https://github.com/jiamliang)
## Minor Enhancements
* **Elasticsearch**: Add option for result set size in raw_document [#3426](https://github.com/grafana/grafana/issues/3426) [#8527](https://github.com/grafana/grafana/pull/8527), thx [@mk-dhia](github.com/mk-dhia)
## Bug Fixes
* **Graph**: Bug fix for negative values in histogram mode [#8628](https://github.com/grafana/grafana/issues/8628)
# 4.3.2 (2017-05-31)
## Bug fixes
* **InfluxDB**: Fixed issue with query editor not showing ALIAS BY input field when in text editor mode [#8459](https://github.com/grafana/grafana/issues/8459)
* **Graph Log Scale**: Fixed issue with log scale going below x-axis [#8244](https://github.com/grafana/grafana/issues/8244)
* **Playlist**: Fixed dashboard play order issue [#7688](https://github.com/grafana/grafana/issues/7688)
* **Elasticsearch**: Fixed table query issue with ES 2.x [#8467](https://github.com/grafana/grafana/issues/8467), thx [@goldeelox](https://github.com/goldeelox)
## Changes
* **Lazy Loading Of Panels**: Panels are no longer loaded as they are scrolled into view, this was reverted due to Chrome bug, might be reintroduced when Chrome fixes it's JS blocking behavior on scroll. [#8500](https://github.com/grafana/grafana/issues/8500)
# 4.3.1 (2017-05-23)
## Bug fixes
* **S3 image upload**: Fixed image url issue for us-east-1 (us standard) region. If you were missing slack images for alert notifications this should fix it. [#8444](https://github.com/grafana/grafana/issues/8444)
# 4.3.0-stable (2017-05-23)
## Bug fixes
* **Gzip**: Fixed crash when gzip was enabled [#8380](https://github.com/grafana/grafana/issues/8380)
* **Graphite**: Fixed issue with Toggle edit mode did in query editor [#8377](https://github.com/grafana/grafana/issues/8377)
* **Alerting**: Fixed issue with state history not showing query execution errors [#8412](https://github.com/grafana/grafana/issues/8412)
* **Alerting**: Fixed issue with missing state history events/annotations when using sqlite3 database [#7992](https://github.com/grafana/grafana/issues/7992)
* **Sqlite**: Fixed with database table locked and using sqlite3 database [#7992](https://github.com/grafana/grafana/issues/7992)
* **Alerting**: Fixed issue with annotations showing up in unsaved dashboards, new graph & alert panel. [#8361](https://github.com/grafana/grafana/issues/8361)
* **webdav**: Fixed http proxy env variable support for webdav image upload [#7922](https://github.com/grafana/grafana/issues/79222), thx [@berghauz](https://github.com/berghauz)
* **Prometheus**: Fixed issue with hiding query [#8413](https://github.com/grafana/grafana/issues/8413)
## Enhancements
* **VictorOps**: Now supports panel image & auto resolve [#8431](https://github.com/grafana/grafana/pull/8431), thx [@davidmscott](https://github.com/davidmscott)
* **Alerting**: Alert annotations now provide more info [#8421](https://github.com/grafana/grafana/pull/8421)
# 4.3.0-beta1 (2017-05-12)
## Enhancements
* **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)
* **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)
* **Graph**: Support for histograms [#600](https://github.com/grafana/grafana/issues/600)
* **Prometheus**: Support table response formats (column per label) [#6140](https://github.com/grafana/grafana/issues/6140), thx [@mtanda](https://github.com/mtanda)
* **Single Stat Panel**: support for non time series data [#6564](https://github.com/grafana/grafana/issues/6564)
* **Server**: Monitoring Grafana (health check endpoint) [#3302](https://github.com/grafana/grafana/issues/3302)
* **Heatmap**: Heatmap Panel [#7934](https://github.com/grafana/grafana/pull/7934)
* **Elasticsearch**: histogram aggregation [#3164](https://github.com/grafana/grafana/issues/3164)
## Minor Enhancements
* **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)
* **Prometheus**: Make Prometheus query field a textarea [#7663](https://github.com/grafana/grafana/issues/7663), thx [@hagen1778](https://github.com/hagen1778)
* **Prometheus**: Step parameter changed semantics to min step to reduce the load on Prometheus and rendering in browser [#8073](https://github.com/grafana/grafana/pull/8073), thx [@bobrik](https://github.com/bobrik)
* **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)
* **Templating**: Data source variable now supports multi value and panel repeats [#7030](https://github.com/grafana/grafana/issues/7030) thx [@mtanda](https://github.com/mtanda)
* **Telegram**: Telegram alert is not sending metric and legend. [#8110](https://github.com/grafana/grafana/issues/8110), thx [@bashgeek](https://github.com/bashgeek)
* **Graph**: Support dashed lines [#514](https://github.com/grafana/grafana/issues/514), thx [@smalik03](https://github.com/smalik03)
* **Table**: Support to change column header text [#3551](https://github.com/grafana/grafana/issues/3551)
* **Alerting**: Better error when SMTP is not configured [#8093](https://github.com/grafana/grafana/issues/8093)
* **Pushover**: Add an option to attach graph image link in Pushover notification [#8043](https://github.com/grafana/grafana/issues/8043) thx [@devkid](https://github.com/devkid)
* **WebDAV**: Allow to set different ImageBaseUrl for WebDAV upload and image link [#7914](https://github.com/grafana/grafana/issues/7914)
* **Panels**: type-ahead mixed datasource selection [#7697](https://github.com/grafana/grafana/issues/7697) thx [@mtanda](https://github.com/mtanda)
* **Security**:User enumeration problem [#7619](https://github.com/grafana/grafana/issues/7619)
* **InfluxDB**: Register new queries available in InfluxDB - Holt Winters [#5619](https://github.com/grafana/grafana/issues/5619) thx [@rikkuness](https://github.com/rikkuness)
* **Server**: Support listening on a UNIX socket [#4030](https://github.com/grafana/grafana/issues/4030), thx [@mitjaziv](https://github.com/mitjaziv)
* **Graph**: Support log scaling for values smaller 1 [#5278](https://github.com/grafana/grafana/issues/5278)
* **InfluxDB**: Slow 'select measurement' rendering for InfluxDB [#2524](https://github.com/grafana/grafana/issues/2524), thx [@sbhenderson](https://github.com/sbhenderson)
* **Config**: Configurable signout menu activation [#7968](https://github.com/grafana/grafana/pull/7968), thx [@seuf](https://github.com/seuf)
## Fixes
* **Table Panel**: Fixed annotation display in table panel, [#8023](https://github.com/grafana/grafana/issues/8023)
* **Dashboard**: If refresh is blocked due to tab not visible, then refresh when it becomes visible [#8076](https://github.com/grafana/grafana/issues/8076) thanks [@SimenB](https://github.com/SimenB)
* **Snapshots**: Fixed problem with annotations & snapshots [#7659](https://github.com/grafana/grafana/issues/7659)
* **Graph**: MetricSegment loses type when value is an asterisk [#8277](https://github.com/grafana/grafana/issues/8277), thx [@Gordiychuk](https://github.com/Gordiychuk)
* **Alerting**: Alert notifications do not show charts when using a non public S3 bucket [#8250](https://github.com/grafana/grafana/issues/8250) thx [@rogerswingle](https://github.com/rogerswingle)
* **Graph**: 100% client CPU usage on red alert glow animation [#8222](https://github.com/grafana/grafana/issues/8222)
* **InfluxDB**: Templating: "All" query does match too much [#8165](https://github.com/grafana/grafana/issues/8165)
* **Dashboard**: Description tooltip is not fully displayed [#7970](https://github.com/grafana/grafana/issues/7970)
* **Proxy**: Redirect after switching Org does not obey sub path in root_url (using reverse proxy) [#8089](https://github.com/grafana/grafana/issues/8089)
* **Templating**: Restoration of ad-hoc variable from URL does not work correctly [#8056](https://github.com/grafana/grafana/issues/8056) thx [@tamayika](https://github.com/tamayika)
* **InfluxDB**: timeFilter cannot be used twice in alerts [#7969](https://github.com/grafana/grafana/issues/7969)
* **MySQL**: 4-byte UTF8 not supported when using MySQL database (allows Emojis) [#7958](https://github.com/grafana/grafana/issues/7958)
* **Alerting**: api/alerts and api/alert/:id hold previous data for "message" and "Message" field when field value is changed from "some string" to empty string. [#7927](https://github.com/grafana/grafana/issues/7927)
* **Graph**: Cannot add fill below to series override [#7916](https://github.com/grafana/grafana/issues/7916)
* **InfluxDB**: Influxb Datasource test passes even if the Database doesn't exist [#7864](https://github.com/grafana/grafana/issues/7864)
* **Prometheus**: Displaying Prometheus annotations is incredibly slow [#7750](https://github.com/grafana/grafana/issues/7750), thx [@mtanda](https://github.com/mtanda)
* **Graphite**: grafana generates empty find query to graphite -> 422 Unprocessable Entity [#7740](https://github.com/grafana/grafana/issues/7740)
* **Admin**: make organisation filter case insensitive [#8194](https://github.com/grafana/grafana/issues/8194), thx [@Alexander-N](https://github.com/Alexander-N)
## Changes
* **Elasticsearch**: Changed elasticsearch Terms aggregation to default to Min Doc Count to 1, and sort order to Top [#8321](https://github.com/grafana/grafana/issues/8321)
## Tech
* **Library Upgrade**: inconshreveable/log15 outdated - no support for solaris [#8262](https://github.com/grafana/grafana/issues/8262)
* **Library Upgrade**: Upgrade Macaron [#7600](https://github.com/grafana/grafana/issues/7600)
# 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)
@@ -15,6 +272,7 @@
* **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)
@@ -23,6 +281,7 @@
* **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)
@@ -786,7 +1045,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
+46
View File
@@ -0,0 +1,46 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@grafana.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
+2 -2
View File
@@ -31,7 +31,7 @@ module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
// load task definitions
grunt.loadTasks('tasks');
grunt.loadTasks('./scripts/grunt');
// Utility function to load plugin settings into config
function loadConfig(config,path) {
@@ -46,7 +46,7 @@ module.exports = function (grunt) {
}
// Merge that object with what with whatever we have here
loadConfig(config,'./tasks/options/');
loadConfig(config,'./scripts/grunt/options/');
// pass the config to grunt
grunt.initConfig(config);
};
+1 -1
View File
@@ -1,4 +1,4 @@
Copyright 2014-2016 Torkel Ödegaard, Raintank Inc.
Copyright 2014-2017 Torkel Ödegaard, Raintank Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
+28
View File
@@ -0,0 +1,28 @@
# Plugin Development
This document is not meant as complete guide for developing plugins but more as a changelog for changes in
Grafana that can impact plugin development. When ever you as plugin author encounter an issue with your plugin after
upgrading Grafana please check here before creating an issue.
## Links
- [Datasource plugin written in typescript](https://github.com/grafana/typescript-template-datasource)
- [Simple json dataource plugin](https://github.com/grafana/simple-json-datasource)
- [Plugin development guide](http://docs.grafana.org/plugins/developing/development/)
## Changes in v4.6
This version of Grafana has big changes that will impact a limited set of plugins. We moved from systemjs to webpack
for built-in plugins & everything internal. External plugins still use systemjs but now with a limited
set of Grafana components they can import. Plugins can depend on libs like lodash & moment and internal components
like before using the same import paths. However since everything in Grafana is no longer accessible, a few plugins could encounter issues when importing a Grafana dependency.
[List of exposed components plugins can import/require](https://github.com/grafana/grafana/blob/master/public/app/features/plugins/plugin_loader.ts#L48)
If you think we missed exposing a crucial lib or Grafana component let us know by opening an issue.
### Deprecated components
The angular directive `<spectrum-picker>` is no deprecated (will still work for a version more) but we recommend plugin authors
to upgrade to new `<color-picker color="ctrl.color" onChange="ctrl.onSparklineColorChange"></color-picker>`
+34 -98
View File
@@ -1,72 +1,16 @@
[Grafana](http://grafana.org) [![Circle CI](https://circleci.com/gh/grafana/grafana.svg?style=svg)](https://circleci.com/gh/grafana/grafana)
[Grafana](https://grafana.com) [![Circle CI](https://circleci.com/gh/grafana/grafana.svg?style=svg)](https://circleci.com/gh/grafana/grafana) [![Go Report Card](https://goreportcard.com/badge/github.com/grafana/grafana)](https://goreportcard.com/report/github.com/grafana/grafana)
================
[Website](http://grafana.org) |
[Website](https://grafana.com) |
[Twitter](https://twitter.com/grafana) |
[IRC](https://webchat.freenode.net/?channels=grafana) |
[![Slack](https://brandfolder.com/api/favicon/icon?size=16&domain=www.slack.com)](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.
![](http://grafana.org/assets/img/features/dashboard_ex1.png)
- [Install instructions](http://docs.grafana.org/installation/)
- [What's New in Grafana 2.0](http://docs.grafana.org/guides/whats-new-in-v2/)
- [What's New in Grafana 2.1](http://docs.grafana.org/guides/whats-new-in-v2-1/)
- [What's New in Grafana 2.5](http://docs.grafana.org/guides/whats-new-in-v2-5/)
- [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/)
## Features
### Graphite Target Editor
- Graphite target expression parser
- Feature rich query composer
- Quickly add and edit functions & parameters
- Templated queries
- [See it in action](http://docs.grafana.org/datasources/graphite/)
### Graphing
- Fast rendering, even over large timespans
- Click and drag to zoom
- Multiple Y-axis, logarithmic scales
- Bars, Lines, Points
- Smart Y-axis formatting
- Series toggles & color selector
- Legend values, and formatting options
- Grid thresholds, axis labels
- [Annotations](http://docs.grafana.org/reference/annotations/)
- Any panel can be rendered to PNG (server side using phantomjs)
### Dashboards
- Create, edit, save & search dashboards
- Change column spans and row heights
- Drag and drop panels to rearrange
- [Templating](http://docs.grafana.org/reference/templating/)
- [Scripted dashboards](http://docs.grafana.org/reference/scripting/)
- [Dashboard playlists](http://docs.grafana.org/reference/playlist/)
- [Time range controls](http://docs.grafana.org/reference/timerange/)
- [Share snapshots publicly](http://docs.grafana.org/v2.0/reference/sharing/)
### Elasticsearch
- Feature rich query editor UI
### InfluxDB
- Use InfluxDB as a metric data source, annotation source
- Query editor with series and column typeahead, easy group by and function selection
### OpenTSDB
- Use as metric data source
- Query editor with metric name typeahead and tag filtering
## Requirements
There are no dependencies except an external time series data store. For dashboards and user accounts Grafana can use an embedded
database (sqlite3) or you can use an external SQL data base like MySQL or Postgres.
![](http://docs.grafana.org/assets/img/features/dashboard_ex1.png)
## Installation
Head to [grafana.org](http://docs.grafana.org/installation/) and [download](http://grafana.org/download/)
Head to [docs.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,42 +20,24 @@ 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.8
- NodeJS v4+
### Get Code
```bash
go get github.com/grafana/grafana
```
Since imports of dependencies use the absolute path `github.com/grafana/grafana` within the `$GOPATH`,
you will need to put your version of the code in `$GOPATH/src/github.com/grafana/grafana` to be able
to develop and build grafana on a cloned repository. To do so, you can clone your forked repository
directly to `$GOPATH/src/github.com/grafana` or you can create a symbolic link from your version
of the code to `$GOPATH/src/github.com/grafana/grafana`. The last options makes it possible to change
easily the grafana repository you want to build.
```bash
go get github.com/*your_account*/grafana
mkdir $GOPATH/src/github.com/grafana
ln -s $GOPATH/src/github.com/*your_account*/grafana $GOPATH/src/github.com/grafana/grafana
```
- Go 1.9
- NodeJS LTS
### Building the backend
```bash
cd $GOPATH/src/github.com/grafana/grafana
go get github.com/grafana/grafana
cd ~/go/src/github.com/grafana/grafana
go run build.go setup
go run build.go build
```
### Building frontend assets
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:
For this you need nodejs (v.6+).
```bash
npm install -g yarn
@@ -119,25 +45,30 @@ yarn install --pure-lockfile
npm run build
```
To build the frontend assets only on changes:
To rebuild frontend assets (typescript, sass etc) as you change them start the watcher via.
```bash
sudo npm install -g grunt-cli # to do only once to install grunt command line interface
grunt watch
npm run watch
```
Run tests
```bash
npm run test
```
Run tests in watch mode
```bash
npm run watch-test
```
### Recompile backend on source change
To rebuild on source change.
```bash
go get github.com/Unknwon/bra
bra run
```
### Running
```bash
./bin/grafana-server
```
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
### Dev config
@@ -146,17 +77,22 @@ Create a custom.ini in the conf directory to override default configuration opti
You only need to add the options you want to override. Config files are applied in the order of:
1. grafana.ini
2. dev.ini (if found)
3. custom.ini
1. custom.ini
## Create a pull request
Before or after you create a pull request, sign the [contributor license agreement](http://docs.grafana.org/project/cla/).
In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode = development`.
## Contribute
If you have any idea for an improvement or found a bug do not hesitate to open an issue.
And if you have time clone this repo and submit a pull request and help me make Grafana
the kickass metrics & devops dashboard we all dream about!
## Plugin development
Checkout the [Plugin Development Guide](http://docs.grafana.org/plugins/developing/development/) and checkout the [PLUGIN_DEV.md](https://github.com/grafana/grafana/blob/master/PLUGIN_DEV.md) file for changes in Grafana that relate to
plugin development.
## License
Grafana is distributed under Apache 2.0 License.
Work in progress Grafana 2.0 (with included Grafana backend)
+29
View File
@@ -0,0 +1,29 @@
# Roadmap (2017-08-29)
This roadmap is a tentative plan for the core development team. Things change constantly as PRs come in and priorities change.
But it will give you an idea of our current vision and plan.
### Short term (1-4 months)
- Release Grafana v4.5 with fixes and minor enhancements
- Release Grafana v5
- User groups
- Dashboard folders
- Dashboard permissions (on folders as well), permissions on groups or users
- New Dashboard layout engine
- New sidemenu & nav UX
- Elasticsearch alerting
### Long term
- Backend plugins to support more Auth options, Alerting data sources & notifications
- Universal time series transformations for any data source (meta queries)
- Reporting
- Web socket & live data streams
- Migrate to Angular2 or react
### Outside contributions
We know this is being worked on right now by contributors (and we hope to merge it when it's ready).
- Clustering for alert engine (load distribution)
+2 -1
View File
@@ -7,7 +7,7 @@ clone_folder: c:\gopath\src\github.com\grafana\grafana
environment:
nodejs_version: "6"
GOPATH: c:\gopath
GOVERSION: 1.8
GOVERSION: 1.9.1
install:
- rmdir c:\go /s /q
@@ -32,6 +32,7 @@ build_script:
- grunt release
- go run build.go sha-dist
- cp dist/* .
- go test -v ./pkg/...
artifacts:
- path: grafana-*windows-*.*
-26
View File
@@ -1,26 +0,0 @@
{
"name": "grafana",
"version": "2.0.2",
"homepage": "https://github.com/grafana/grafana",
"authors": [],
"license": "Apache 2.0",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"public/vendor/",
"test",
"tests"
],
"dependencies": {
"jquery": "3.1.0",
"lodash": "4.15.0",
"angular": "1.6.1",
"angular-route": "1.6.1",
"angular-mocks": "1.6.1",
"angular-sanitize": "1.6.1",
"angular-native-dragdrop": "1.2.2",
"angular-bindonce": "0.3.3",
"clipboard": "^1.5.16"
}
}
+12 -6
View File
@@ -95,7 +95,9 @@ func main() {
case "package":
grunt(gruntBuildArg("release")...)
createLinuxPackages()
if runtime.GOOS != "windows" {
createLinuxPackages()
}
case "pkg-rpm":
grunt(gruntBuildArg("release")...)
@@ -235,7 +237,7 @@ func createRpmPackages() {
defaultFileSrc: "packaging/rpm/sysconfig/grafana-server",
systemdFileSrc: "packaging/rpm/systemd/grafana-server.service",
depends: []string{"/sbin/service", "fontconfig"},
depends: []string{"/sbin/service", "fontconfig", "freetype", "urw-fonts"},
})
}
@@ -275,9 +277,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,
@@ -345,13 +347,17 @@ func ChangeWorkingDir(dir string) {
}
func grunt(params ...string) {
runPrint("./node_modules/.bin/grunt", params...)
if runtime.GOOS == "windows" {
runPrint(`.\node_modules\.bin\grunt`, params...)
} else {
runPrint("./node_modules/.bin/grunt", params...)
}
}
func gruntBuildArg(task string) []string {
args := []string{task}
if includeBuildNumber {
args = append(args, fmt.Sprintf("--pkgVer=%v-%v", version, linuxPackageIteration))
args = append(args, fmt.Sprintf("--pkgVer=%v-%v", linuxPackageVersion, linuxPackageIteration))
} else {
args = append(args, fmt.Sprintf("--pkgVer=%v", version))
}
+2 -1
View File
@@ -9,7 +9,7 @@ machine:
GOPATH: "/home/ubuntu/.go_workspace"
ORG_PATH: "github.com/grafana"
REPO_PATH: "${ORG_PATH}/grafana"
GODIST: "go1.8.linux-amd64.tar.gz"
GODIST: "go1.9.1.linux-amd64.tar.gz"
post:
- mkdir -p ~/download
- mkdir -p ~/docker
@@ -45,6 +45,7 @@ deployment:
- aws s3 sync ./dist s3://$BUCKET_NAME/master
- ./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:
+63 -13
View File
@@ -25,7 +25,7 @@ plugins = data/plugins
#################################### Server ##############################
[server]
# Protocol (http or https)
# Protocol (http, https, socket)
protocol = http
# The ip address to bind to, empty will bind to all interfaces
@@ -57,25 +57,29 @@ enable_gzip = false
cert_file =
cert_key =
# Unix socket path
socket = /tmp/grafana.sock
#################################### Database ############################
[database]
# You can configure the database connection by specifying type, host, name, user and password
# as seperate properties or as on string using the url propertie.
# as separate properties or as on string using the url property.
# Either "mysql", "postgres" or "sqlite3", it's your choice
type = sqlite3
host = 127.0.0.1:3306
name = grafana
user = root
# If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;"""
# If the password contains # or ; you have to wrap it with triple quotes. Ex """#password;"""
password =
# Use either URL or the previous fields to configure the database
# Example: mysql://user:secret@host:port/database
url =
# Max idle conn setting default is 2
max_idle_conn = 2
# Max conn setting default is 0 (mean not set)
max_conn =
max_idle_conn =
max_open_conn =
# For "postgres", use either "disable", "require" or "verify-full"
@@ -132,11 +136,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
# for new vesions (grafana itself and plugins), check is used
# Set to false to disable all checks to https://grafana.com
# for new versions (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
@@ -182,10 +186,10 @@ snapshot_TTL_days = 90
#################################### Users ####################################
[users]
# disable user signup / registration
allow_sign_up = true
allow_sign_up = false
# Allow non admin users to create organizations
allow_org_create = true
allow_org_create = false
# Set to true to automatically assign new users to the default organization (id 1)
auto_assign_org = true
@@ -202,10 +206,18 @@ login_hint = email or username
# Default UI theme ("dark" or "light")
default_theme = dark
# External user management
external_manage_link_url =
external_manage_link_name =
external_manage_info =
[auth]
# 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
@@ -243,7 +255,8 @@ api_url = https://www.googleapis.com/oauth2/v1/userinfo
allowed_domains =
hosted_domain =
#################################### Grafana.net Auth ####################
#################################### Grafana.com Auth ####################
# legacy key names (so they work in env variables)
[auth.grafananet]
enabled = false
allow_sign_up = true
@@ -252,6 +265,14 @@ client_secret = some_secret
scopes = user:email
allowed_organizations =
[auth.grafana_com]
enabled = false
allow_sign_up = true
client_id = some_id
client_secret = some_secret
scopes = user:email
allowed_organizations =
#################################### Generic OAuth #######################
[auth.generic_oauth]
name = OAuth
@@ -297,6 +318,7 @@ key_file =
skip_verify = false
from_address = admin@grafana.localhost
from_name = Grafana
ehlo_identity =
[emails]
welcome_email_on_sign_up = false
@@ -426,15 +448,38 @@ address =
prefix = prod.grafana.%(instance_name)s.
[grafana_net]
url = https://grafana.net
url = https://grafana.com
[grafana_com]
url = https://grafana.com
#################################### Distributed tracing ############
[tracing.jaeger]
# jaeger destination (ex localhost:6831)
address =
# tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2)
always_included_tag =
# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
sampler_type = const
# jaeger samplerconfig param
# for "const" sampler, 0 or 1 for always false/true respectively
# for "probabilistic" sampler, a probability between 0 and 1
# for "rateLimiting" sampler, the number of spans per second
# for "remote" sampler, param is the same as for "probabilistic"
# and indicates the initial sampling rate before the actual one
# is received from the mothership
sampler_param = 1
#################################### External Image Storage ##############
[external_image_storage]
# You can choose between (s3, webdav)
# You can choose between (s3, webdav, gcs)
provider =
[external_image_storage.s3]
bucket_url =
bucket =
region =
path =
access_key =
secret_key =
@@ -442,3 +487,8 @@ secret_key =
url =
username =
password =
public_url =
[external_image_storage.gcs]
key_file =
bucket =
+1 -1
View File
@@ -14,7 +14,7 @@ start_tls = false
# set to true if you want to skip ssl cert validation
ssl_skip_verify = false
# set to the path to your root CA certificate or leave unset to use system defaults
# root_ca_cert = /path/to/certificate.crt
# root_ca_cert = "/path/to/certificate.crt"
# Search user bind dn
bind_dn = "cn=admin,dc=grafana,dc=org"
+51 -13
View File
@@ -26,7 +26,7 @@
#
#################################### Server ####################################
[server]
# Protocol (http or https)
# Protocol (http, https, socket)
;protocol = http
# The ip address to bind to, empty will bind to all interfaces
@@ -59,6 +59,9 @@
;cert_file =
;cert_key =
# Unix socket path
;socket =
#################################### Database ####################################
[database]
# You can configure the database connection by specifying type, host, name, user and password
@@ -82,9 +85,10 @@
# For "sqlite3" only, path relative to data_path setting
;path = grafana.db
# Max idle conn setting default is 2
;max_idle_conn = 2
# Max conn setting default is 0 (mean not set)
;max_conn =
;max_idle_conn =
;max_open_conn =
@@ -129,7 +133,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
@@ -189,10 +193,18 @@
# Default UI theme ("dark" or "light")
;default_theme = dark
# External user management, these options affect the organization users view
;external_manage_link_url =
;external_manage_link_name =
;external_manage_info =
[auth]
# 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
@@ -243,8 +255,8 @@
;team_ids =
;allowed_organizations =
#################################### Grafana.net Auth ####################
[auth.grafananet]
#################################### Grafana.com Auth ####################
[auth.grafana_com]
;enabled = false
;allow_sign_up = true
;client_id = some_id
@@ -283,6 +295,8 @@
;skip_verify = false
;from_address = admin@grafana.localhost
;from_name = Grafana
# EHLO identity in SMTP dialog (defaults to instance_name)
;ehlo_identity = dashboard.example.com
[emails]
;welcome_email_on_sign_up = false
@@ -293,7 +307,7 @@
# Use space to separate multiple modes, e.g. "console file"
;mode = console file
# Either "trace", "debug", "info", "warn", "error", "critical", default is "info"
# Either "debug", "info", "warn", "error", "critical", default is "info"
;level = info
# optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug
@@ -379,23 +393,47 @@
;address =
;prefix = prod.grafana.%(instance_name)s.
#################################### Internal Grafana Metrics ##########################
# Url used to to import dashboards directly from Grafana.net
[grafana_net]
;url = https://grafana.net
#################################### Distributed tracing ############
[tracing.jaeger]
# Enable by setting the address sending traces to jaeger (ex localhost:6831)
;address = localhost:6831
# Tag that will always be included in when creating new spans. ex (tag1:value1,tag2:value2)
;always_included_tag = tag1:value1
# Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
;sampler_type = const
# jaeger samplerconfig param
# for "const" sampler, 0 or 1 for always false/true respectively
# for "probabilistic" sampler, a probability between 0 and 1
# for "rateLimiting" sampler, the number of spans per second
# for "remote" sampler, param is the same as for "probabilistic"
# and indicates the initial sampling rate before the actual one
# is received from the mothership
;sampler_param = 1
#################################### Grafana.com integration ##########################
# Url used to to import dashboards directly from Grafana.com
[grafana_com]
;url = https://grafana.com
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav)
# you can choose between (s3, webdav, gcs)
;provider =
[external_image_storage.s3]
;bucket_url =
;bucket =
;region =
;path =
;access_key =
;secret_key =
[external_image_storage.webdav]
;url =
;public_url =
;username =
;password =
[external_image_storage.gcs]
;key_file =
;bucket =
+2
View File
@@ -32,6 +32,7 @@ add ./files/my_htpasswd /etc/nginx/.htpasswd
# Add system service config
add ./files/nginx.conf /etc/nginx/nginx.conf
add ./files/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Nginx
#
# graphite
@@ -39,6 +40,7 @@ expose 80
# Carbon line receiver port
expose 2003
# Carbon cache query port
expose 7002
-1
View File
@@ -4,7 +4,6 @@ graphite:
- "8080:80"
- "2003:2003"
volumes:
- /var/docker/gfdev/graphite:/opt/graphite/storage/whisper
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
+93
View File
@@ -0,0 +1,93 @@
FROM phusion/baseimage:0.9.22
MAINTAINER Denys Zhdanov <denis.zhdanov@gmail.com>
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y --force-yes install vim \
nginx \
python-dev \
python-flup \
python-pip \
python-ldap \
expect \
git \
memcached \
sqlite3 \
libffi-dev \
libcairo2 \
libcairo2-dev \
python-cairo \
python-rrdtool \
pkg-config \
nodejs \
&& rm -rf /var/lib/apt/lists/*
# fix python dependencies (LTS Django and newer memcached/txAMQP)
RUN pip install django==1.8.18 \
python-memcached==1.53 \
txAMQP==0.6.2 \
&& pip install --upgrade pip
# install whisper
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/whisper.git /usr/local/src/whisper
WORKDIR /usr/local/src/whisper
RUN python ./setup.py install
# install carbon
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/carbon.git /usr/local/src/carbon
WORKDIR /usr/local/src/carbon
RUN pip install -r requirements.txt \
&& python ./setup.py install
# install graphite
RUN git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web
WORKDIR /usr/local/src/graphite-web
RUN pip install -r requirements.txt \
&& python ./setup.py install
ADD conf/opt/graphite/conf/*.conf /opt/graphite/conf/
ADD conf/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
ADD conf/opt/graphite/webapp/graphite/app_settings.py /opt/graphite/webapp/graphite/app_settings.py
WORKDIR /opt/graphite/webapp
RUN mkdir -p /var/log/graphite/ \
&& PYTHONPATH=/opt/graphite/webapp django-admin.py collectstatic --noinput --settings=graphite.settings
# install statsd
RUN git clone -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
ADD conf/opt/statsd/config.js /opt/statsd/config.js
# config nginx
RUN rm /etc/nginx/sites-enabled/default
ADD conf/etc/nginx/nginx.conf /etc/nginx/nginx.conf
ADD conf/etc/nginx/sites-enabled/graphite-statsd.conf /etc/nginx/sites-enabled/graphite-statsd.conf
# init django admin
ADD conf/usr/local/bin/django_admin_init.exp /usr/local/bin/django_admin_init.exp
ADD conf/usr/local/bin/manage.sh /usr/local/bin/manage.sh
RUN chmod +x /usr/local/bin/manage.sh \
&& /usr/local/bin/django_admin_init.exp
# logging support
RUN mkdir -p /var/log/carbon /var/log/graphite /var/log/nginx
ADD conf/etc/logrotate.d/graphite-statsd /etc/logrotate.d/graphite-statsd
# daemons
ADD conf/etc/service/carbon/run /etc/service/carbon/run
ADD conf/etc/service/carbon-aggregator/run /etc/service/carbon-aggregator/run
ADD conf/etc/service/graphite/run /etc/service/graphite/run
ADD conf/etc/service/statsd/run /etc/service/statsd/run
ADD conf/etc/service/nginx/run /etc/service/nginx/run
# default conf setup
ADD conf /etc/graphite-statsd/conf
ADD conf/etc/my_init.d/01_conf_init.sh /etc/my_init.d/01_conf_init.sh
# cleanup
RUN apt-get clean\
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# defaults
EXPOSE 80 2003-2004 2023-2024 8125/udp 8126
VOLUME ["/opt/graphite/conf", "/opt/graphite/storage", "/etc/nginx", "/opt/statsd", "/etc/logrotate.d", "/var/log"]
WORKDIR /
ENV HOME /root
CMD ["/sbin/my_init"]
@@ -0,0 +1,11 @@
/var/log/*.log /var/log/*/*.log {
weekly
size 50M
missingok
rotate 10
compress
delaycompress
notifempty
copytruncate
su root syslog
}
+36
View File
@@ -0,0 +1,36 @@
#!/bin/bash
conf_dir=/etc/graphite-statsd/conf
# auto setup graphite with default configs if /opt/graphite is missing
# needed for the use case when a docker host volume is mounted at an of the following:
# - /opt/graphite
# - /opt/graphite/conf
# - /opt/graphite/webapp/graphite
graphite_dir_contents=$(find /opt/graphite -mindepth 1 -print -quit)
graphite_conf_dir_contents=$(find /opt/graphite/conf -mindepth 1 -print -quit)
graphite_webapp_dir_contents=$(find /opt/graphite/webapp/graphite -mindepth 1 -print -quit)
graphite_storage_dir_contents=$(find /opt/graphite/storage -mindepth 1 -print -quit)
if [[ -z $graphite_dir_contents ]]; then
git clone -b 1.0.2 --depth 1 https://github.com/graphite-project/graphite-web.git /usr/local/src/graphite-web
cd /usr/local/src/graphite-web && python ./setup.py install
fi
if [[ -z $graphite_storage_dir_contents ]]; then
/usr/local/bin/django_admin_init.exp
fi
if [[ -z $graphite_conf_dir_contents ]]; then
cp -R $conf_dir/opt/graphite/conf/*.conf /opt/graphite/conf/
fi
if [[ -z $graphite_webapp_dir_contents ]]; then
cp $conf_dir/opt/graphite/webapp/graphite/local_settings.py /opt/graphite/webapp/graphite/local_settings.py
fi
# auto setup statsd with default config if /opt/statsd is missing
# needed for the use case when a docker host volume is mounted at an of the following:
# - /opt/statsd
statsd_dir_contents=$(find /opt/statsd -mindepth 1 -print -quit)
if [[ -z $statsd_dir_contents ]]; then
git clone -b v0.7.2 https://github.com/etsy/statsd.git /opt/statsd
cp $conf_dir/opt/statsd/config.js /opt/statsd/config.js
fi
@@ -0,0 +1,96 @@
user www-data;
worker_processes 4;
pid /run/nginx.pid;
daemon off;
events {
worker_connections 768;
# multi_accept on;
}
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# nginx-naxsi config
##
# Uncomment it if you installed nginx-naxsi
##
#include /etc/nginx/naxsi_core.rules;
##
# nginx-passenger config
##
# Uncomment it if you installed nginx-passenger
##
#passenger_root /usr;
#passenger_ruby /usr/bin/ruby;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
@@ -0,0 +1,31 @@
server {
listen 80;
root /opt/graphite/static;
index index.html;
location /media {
# django admin static files
alias /usr/local/lib/python2.7/dist-packages/django/contrib/admin/media/;
}
location /admin/auth/admin {
alias /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin;
}
location /admin/auth/user/admin {
alias /usr/local/lib/python2.7/dist-packages/django/contrib/admin/static/admin;
}
location / {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'Authorization, Content-Type';
add_header 'Access-Control-Allow-Credentials' 'true';
}
}
@@ -0,0 +1,4 @@
#!/bin/bash
rm -f /opt/graphite/storage/carbon-aggregator-a.pid
exec /usr/bin/python /opt/graphite/bin/carbon-aggregator.py start --debug 2>&1 >> /var/log/carbon-aggregator.log
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
rm -f /opt/graphite/storage/carbon-cache-a.pid
exec /usr/bin/python /opt/graphite/bin/carbon-cache.py start --debug 2>&1 >> /var/log/carbon.log
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
export PYTHONPATH=/opt/graphite/webapp && exec /usr/local/bin/gunicorn wsgi --workers=4 --bind=127.0.0.1:8080 --log-file=/var/log/gunicorn.log --preload --pythonpath=/opt/graphite/webapp/graphite
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
mkdir -p /var/log/nginx
exec /usr/sbin/nginx -c /etc/nginx/nginx.conf
+4
View File
@@ -0,0 +1,4 @@
#!/bin/bash
exec /usr/bin/nodejs /opt/statsd/stats.js /opt/statsd/config.js >> /var/log/statsd.log 2>&1
@@ -0,0 +1,35 @@
# The form of each line in this file should be as follows:
#
# output_template (frequency) = method input_pattern
#
# This will capture any received metrics that match 'input_pattern'
# for calculating an aggregate metric. The calculation will occur
# every 'frequency' seconds and the 'method' can specify 'sum' or
# 'avg'. The name of the aggregate metric will be derived from
# 'output_template' filling in any captured fields from 'input_pattern'.
#
# For example, if you're metric naming scheme is:
#
# <env>.applications.<app>.<server>.<metric>
#
# You could configure some aggregations like so:
#
# <env>.applications.<app>.all.requests (60) = sum <env>.applications.<app>.*.requests
# <env>.applications.<app>.all.latency (60) = avg <env>.applications.<app>.*.latency
#
# As an example, if the following metrics are received:
#
# prod.applications.apache.www01.requests
# prod.applications.apache.www01.requests
#
# They would all go into the same aggregation buffer and after 60 seconds the
# aggregate metric 'prod.applications.apache.all.requests' would be calculated
# by summing their values.
#
# Template components such as <env> will match everything up to the next dot.
# To match metric multiple components including the dots, use <<metric>> in the
# input template:
#
# <env>.applications.<app>.all.<app_metric> (60) = sum <env>.applications.<app>.*.<<app_metric>>
#
# Note that any time this file is modified, it will be re-read automatically.
@@ -0,0 +1,5 @@
# This file takes a single regular expression per line
# If USE_WHITELIST is set to True in carbon.conf, any metrics received which
# match one of these expressions will be dropped
# This file is reloaded automatically when changes are made
^some\.noisy\.metric\.prefix\..*
@@ -0,0 +1,75 @@
# This is a configuration file with AMQP enabled
[cache]
LOCAL_DATA_DIR =
# Specify the user to drop privileges to
# If this is blank carbon runs as the user that invokes it
# This user must have write access to the local data directory
USER =
# Limit the size of the cache to avoid swapping or becoming CPU bound.
# Sorts and serving cache queries gets more expensive as the cache grows.
# Use the value "inf" (infinity) for an unlimited cache size.
MAX_CACHE_SIZE = inf
# Limits the number of whisper update_many() calls per second, which effectively
# means the number of write requests sent to the disk. This is intended to
# prevent over-utilizing the disk and thus starving the rest of the system.
# When the rate of required updates exceeds this, then carbon's caching will
# take effect and increase the overall throughput accordingly.
MAX_UPDATES_PER_SECOND = 1000
# Softly limits the number of whisper files that get created each minute.
# Setting this value low (like at 50) is a good way to ensure your graphite
# system will not be adversely impacted when a bunch of new metrics are
# sent to it. The trade off is that it will take much longer for those metrics'
# database files to all get created and thus longer until the data becomes usable.
# Setting this value high (like "inf" for infinity) will cause graphite to create
# the files quickly but at the risk of slowing I/O down considerably for a while.
MAX_CREATES_PER_MINUTE = inf
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
UDP_RECEIVER_INTERFACE = 0.0.0.0
UDP_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
CACHE_QUERY_INTERFACE = 0.0.0.0
CACHE_QUERY_PORT = 7002
# Enable AMQP if you want to receve metrics using you amqp broker
ENABLE_AMQP = True
# Verbose means a line will be logged for every metric received
# useful for testing
AMQP_VERBOSE = True
# your credentials for the amqp server
# AMQP_USER = guest
# AMQP_PASSWORD = guest
# the network settings for the amqp server
# AMQP_HOST = localhost
# AMQP_PORT = 5672
# if you want to include the metric name as part of the message body
# instead of as the routing key, set this to True
# AMQP_METRIC_NAME_IN_BODY = False
# NOTE: you cannot run both a cache and a relay on the same server
# with the default configuration, you have to specify a distinict
# interfaces and ports for the listeners.
[relay]
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
CACHE_SERVERS = server1, server2, server3
MAX_QUEUE_SIZE = 10000
@@ -0,0 +1,359 @@
[cache]
# Configure carbon directories.
#
# OS environment variables can be used to tell carbon where graphite is
# installed, where to read configuration from and where to write data.
#
# GRAPHITE_ROOT - Root directory of the graphite installation.
# Defaults to ../
# GRAPHITE_CONF_DIR - Configuration directory (where this file lives).
# Defaults to $GRAPHITE_ROOT/conf/
# GRAPHITE_STORAGE_DIR - Storage directory for whipser/rrd/log/pid files.
# Defaults to $GRAPHITE_ROOT/storage/
#
# To change other directory paths, add settings to this file. The following
# configuration variables are available with these default values:
#
# STORAGE_DIR = $GRAPHITE_STORAGE_DIR
# LOCAL_DATA_DIR = STORAGE_DIR/whisper/
# WHITELISTS_DIR = STORAGE_DIR/lists/
# CONF_DIR = STORAGE_DIR/conf/
# LOG_DIR = STORAGE_DIR/log/
# PID_DIR = STORAGE_DIR/
#
# For FHS style directory structures, use:
#
# STORAGE_DIR = /var/lib/carbon/
# CONF_DIR = /etc/carbon/
# LOG_DIR = /var/log/carbon/
# PID_DIR = /var/run/
#
#LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
# Enable daily log rotation. If disabled, a kill -HUP can be used after a manual rotate
ENABLE_LOGROTATION = True
# Specify the user to drop privileges to
# If this is blank carbon runs as the user that invokes it
# This user must have write access to the local data directory
USER =
#
# NOTE: The above settings must be set under [relay] and [aggregator]
# to take effect for those daemons as well
# Limit the size of the cache to avoid swapping or becoming CPU bound.
# Sorts and serving cache queries gets more expensive as the cache grows.
# Use the value "inf" (infinity) for an unlimited cache size.
MAX_CACHE_SIZE = inf
# Limits the number of whisper update_many() calls per second, which effectively
# means the number of write requests sent to the disk. This is intended to
# prevent over-utilizing the disk and thus starving the rest of the system.
# When the rate of required updates exceeds this, then carbon's caching will
# take effect and increase the overall throughput accordingly.
MAX_UPDATES_PER_SECOND = 500
# If defined, this changes the MAX_UPDATES_PER_SECOND in Carbon when a
# stop/shutdown is initiated. This helps when MAX_UPDATES_PER_SECOND is
# relatively low and carbon has cached a lot of updates; it enables the carbon
# daemon to shutdown more quickly.
# MAX_UPDATES_PER_SECOND_ON_SHUTDOWN = 1000
# Softly limits the number of whisper files that get created each minute.
# Setting this value low (like at 50) is a good way to ensure your graphite
# system will not be adversely impacted when a bunch of new metrics are
# sent to it. The trade off is that it will take much longer for those metrics'
# database files to all get created and thus longer until the data becomes usable.
# Setting this value high (like "inf" for infinity) will cause graphite to create
# the files quickly but at the risk of slowing I/O down considerably for a while.
MAX_CREATES_PER_MINUTE = 50
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
# Set this to True to enable the UDP listener. By default this is off
# because it is very common to run multiple carbon daemons and managing
# another (rarely used) port for every carbon instance is not fun.
ENABLE_UDP_LISTENER = False
UDP_RECEIVER_INTERFACE = 0.0.0.0
UDP_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
# Set to false to disable logging of successful connections
LOG_LISTENER_CONNECTIONS = True
# Per security concerns outlined in Bug #817247 the pickle receiver
# will use a more secure and slightly less efficient unpickler.
# Set this to True to revert to the old-fashioned insecure unpickler.
USE_INSECURE_UNPICKLER = False
CACHE_QUERY_INTERFACE = 0.0.0.0
CACHE_QUERY_PORT = 7002
# Set this to False to drop datapoints received after the cache
# reaches MAX_CACHE_SIZE. If this is True (the default) then sockets
# over which metrics are received will temporarily stop accepting
# data until the cache size falls below 95% MAX_CACHE_SIZE.
USE_FLOW_CONTROL = True
# By default, carbon-cache will log every whisper update and cache hit. This can be excessive and
# degrade performance if logging on the same volume as the whisper data is stored.
LOG_UPDATES = False
LOG_CACHE_HITS = False
LOG_CACHE_QUEUE_SORTS = True
# The thread that writes metrics to disk can use on of the following strategies
# determining the order in which metrics are removed from cache and flushed to
# disk. The default option preserves the same behavior as has been historically
# available in version 0.9.10.
#
# sorted - All metrics in the cache will be counted and an ordered list of
# them will be sorted according to the number of datapoints in the cache at the
# moment of the list's creation. Metrics will then be flushed from the cache to
# disk in that order.
#
# max - The writer thread will always pop and flush the metric from cache
# that has the most datapoints. This will give a strong flush preference to
# frequently updated metrics and will also reduce random file-io. Infrequently
# updated metrics may only ever be persisted to disk at daemon shutdown if
# there are a large number of metrics which receive very frequent updates OR if
# disk i/o is very slow.
#
# naive - Metrics will be flushed from the cache to disk in an unordered
# fashion. This strategy may be desirable in situations where the storage for
# whisper files is solid state, CPU resources are very limited or deference to
# the OS's i/o scheduler is expected to compensate for the random write
# pattern.
#
CACHE_WRITE_STRATEGY = sorted
# On some systems it is desirable for whisper to write synchronously.
# Set this option to True if you'd like to try this. Basically it will
# shift the onus of buffering writes from the kernel into carbon's cache.
WHISPER_AUTOFLUSH = False
# By default new Whisper files are created pre-allocated with the data region
# filled with zeros to prevent fragmentation and speed up contiguous reads and
# writes (which are common). Enabling this option will cause Whisper to create
# the file sparsely instead. Enabling this option may allow a large increase of
# MAX_CREATES_PER_MINUTE but may have longer term performance implications
# depending on the underlying storage configuration.
# WHISPER_SPARSE_CREATE = False
# Only beneficial on linux filesystems that support the fallocate system call.
# It maintains the benefits of contiguous reads/writes, but with a potentially
# much faster creation speed, by allowing the kernel to handle the block
# allocation and zero-ing. Enabling this option may allow a large increase of
# MAX_CREATES_PER_MINUTE. If enabled on an OS or filesystem that is unsupported
# this option will gracefully fallback to standard POSIX file access methods.
WHISPER_FALLOCATE_CREATE = True
# Enabling this option will cause Whisper to lock each Whisper file it writes
# to with an exclusive lock (LOCK_EX, see: man 2 flock). This is useful when
# multiple carbon-cache daemons are writing to the same files
# WHISPER_LOCK_WRITES = False
# Set this to True to enable whitelisting and blacklisting of metrics in
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
# empty, all metrics will pass through
# USE_WHITELIST = False
# By default, carbon itself will log statistics (such as a count,
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
# CARBON_METRIC_PREFIX = carbon
# CARBON_METRIC_INTERVAL = 60
# Enable AMQP if you want to receve metrics using an amqp broker
# ENABLE_AMQP = False
# Verbose means a line will be logged for every metric received
# useful for testing
# AMQP_VERBOSE = False
# AMQP_HOST = localhost
# AMQP_PORT = 5672
# AMQP_VHOST = /
# AMQP_USER = guest
# AMQP_PASSWORD = guest
# AMQP_EXCHANGE = graphite
# AMQP_METRIC_NAME_IN_BODY = False
# The manhole interface allows you to SSH into the carbon daemon
# and get a python interpreter. BE CAREFUL WITH THIS! If you do
# something like time.sleep() in the interpreter, the whole process
# will sleep! This is *extremely* helpful in debugging, assuming
# you are familiar with the code. If you are not, please don't
# mess with this, you are asking for trouble :)
#
# ENABLE_MANHOLE = False
# MANHOLE_INTERFACE = 127.0.0.1
# MANHOLE_PORT = 7222
# MANHOLE_USER = admin
# MANHOLE_PUBLIC_KEY = ssh-rsa AAAAB3NzaC1yc2EAAAABiwAaAIEAoxN0sv/e4eZCPpi3N3KYvyzRaBaMeS2RsOQ/cDuKv11dlNzVeiyc3RFmCv5Rjwn/lQ79y0zyHxw67qLyhQ/kDzINc4cY41ivuQXm2tPmgvexdrBv5nsfEpjs3gLZfJnyvlcVyWK/lId8WUvEWSWHTzsbtmXAF2raJMdgLTbQ8wE=
# Patterns for all of the metrics this machine will store. Read more at
# http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
#
# Example: store all sales, linux servers, and utilization metrics
# BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
#
# Example: store everything
# BIND_PATTERNS = #
# To configure special settings for the carbon-cache instance 'b', uncomment this:
#[cache:b]
#LINE_RECEIVER_PORT = 2103
#PICKLE_RECEIVER_PORT = 2104
#CACHE_QUERY_PORT = 7102
# and any other settings you want to customize, defaults are inherited
# from [carbon] section.
# You can then specify the --instance=b option to manage this instance
[relay]
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2013
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2014
# Set to false to disable logging of successful connections
LOG_LISTENER_CONNECTIONS = True
# Carbon-relay has several options for metric routing controlled by RELAY_METHOD
#
# Use relay-rules.conf to route metrics to destinations based on pattern rules
#RELAY_METHOD = rules
#
# Use consistent-hashing for even distribution of metrics between destinations
#RELAY_METHOD = consistent-hashing
#
# Use consistent-hashing but take into account an aggregation-rules.conf shared
# by downstream carbon-aggregator daemons. This will ensure that all metrics
# that map to a given aggregation rule are sent to the same carbon-aggregator
# instance.
# Enable this for carbon-relays that send to a group of carbon-aggregators
#RELAY_METHOD = aggregated-consistent-hashing
RELAY_METHOD = rules
# If you use consistent-hashing you can add redundancy by replicating every
# datapoint to more than one machine.
REPLICATION_FACTOR = 1
# This is a list of carbon daemons we will send any relayed or
# generated metrics to. The default provided would send to a single
# carbon-cache instance on the default port. However if you
# use multiple carbon-cache instances then it would look like this:
#
# DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
#
# The general form is IP:PORT:INSTANCE where the :INSTANCE part is
# optional and refers to the "None" instance if omitted.
#
# Note that if the destinations are all carbon-caches then this should
# exactly match the webapp's CARBONLINK_HOSTS setting in terms of
# instances listed (order matters!).
#
# If using RELAY_METHOD = rules, all destinations used in relay-rules.conf
# must be defined in this list
DESTINATIONS = 127.0.0.1:2004
# This defines the maximum "message size" between carbon daemons.
# You shouldn't need to tune this unless you really know what you're doing.
MAX_DATAPOINTS_PER_MESSAGE = 500
MAX_QUEUE_SIZE = 10000
# Set this to False to drop datapoints when any send queue (sending datapoints
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
# default) then sockets over which metrics are received will temporarily stop accepting
# data until the send queues fall below 80% MAX_QUEUE_SIZE.
USE_FLOW_CONTROL = True
# Set this to True to enable whitelisting and blacklisting of metrics in
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
# empty, all metrics will pass through
# USE_WHITELIST = False
# By default, carbon itself will log statistics (such as a count,
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
# CARBON_METRIC_PREFIX = carbon
# CARBON_METRIC_INTERVAL = 60
[aggregator]
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2023
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2024
# Set to false to disable logging of successful connections
LOG_LISTENER_CONNECTIONS = True
# If set true, metric received will be forwarded to DESTINATIONS in addition to
# the output of the aggregation rules. If set false the carbon-aggregator will
# only ever send the output of aggregation.
FORWARD_ALL = True
# This is a list of carbon daemons we will send any relayed or
# generated metrics to. The default provided would send to a single
# carbon-cache instance on the default port. However if you
# use multiple carbon-cache instances then it would look like this:
#
# DESTINATIONS = 127.0.0.1:2004:a, 127.0.0.1:2104:b
#
# The format is comma-delimited IP:PORT:INSTANCE where the :INSTANCE part is
# optional and refers to the "None" instance if omitted.
#
# Note that if the destinations are all carbon-caches then this should
# exactly match the webapp's CARBONLINK_HOSTS setting in terms of
# instances listed (order matters!).
DESTINATIONS = 127.0.0.1:2004
# If you want to add redundancy to your data by replicating every
# datapoint to more than one machine, increase this.
REPLICATION_FACTOR = 1
# This is the maximum number of datapoints that can be queued up
# for a single destination. Once this limit is hit, we will
# stop accepting new data if USE_FLOW_CONTROL is True, otherwise
# we will drop any subsequently received datapoints.
MAX_QUEUE_SIZE = 10000
# Set this to False to drop datapoints when any send queue (sending datapoints
# to a downstream carbon daemon) hits MAX_QUEUE_SIZE. If this is True (the
# default) then sockets over which metrics are received will temporarily stop accepting
# data until the send queues fall below 80% MAX_QUEUE_SIZE.
USE_FLOW_CONTROL = True
# This defines the maximum "message size" between carbon daemons.
# You shouldn't need to tune this unless you really know what you're doing.
MAX_DATAPOINTS_PER_MESSAGE = 500
# This defines how many datapoints the aggregator remembers for
# each metric. Aggregation only happens for datapoints that fall in
# the past MAX_AGGREGATION_INTERVALS * intervalSize seconds.
MAX_AGGREGATION_INTERVALS = 5
# By default (WRITE_BACK_FREQUENCY = 0), carbon-aggregator will write back
# aggregated data points once every rule.frequency seconds, on a per-rule basis.
# Set this (WRITE_BACK_FREQUENCY = N) to write back all aggregated data points
# every N seconds, independent of rule frequency. This is useful, for example,
# to be able to query partially aggregated metrics from carbon-cache without
# having to first wait rule.frequency seconds.
# WRITE_BACK_FREQUENCY = 0
# Set this to True to enable whitelisting and blacklisting of metrics in
# CONF_DIR/whitelist and CONF_DIR/blacklist. If the whitelist is missing or
# empty, all metrics will pass through
# USE_WHITELIST = False
# By default, carbon itself will log statistics (such as a count,
# metricsReceived) with the top level prefix of 'carbon' at an interval of 60
# seconds. Set CARBON_METRIC_INTERVAL to 0 to disable instrumentation
# CARBON_METRIC_PREFIX = carbon
# CARBON_METRIC_INTERVAL = 60
@@ -0,0 +1,57 @@
# This configuration file controls the behavior of the Dashboard UI, available
# at http://my-graphite-server/dashboard/.
#
# This file must contain a [ui] section that defines values for all of the
# following settings.
[ui]
default_graph_width = 400
default_graph_height = 250
automatic_variants = true
refresh_interval = 60
autocomplete_delay = 375
merge_hover_delay = 750
# You can set this 'default', 'white', or a custom theme name.
# To create a custom theme, copy the dashboard-default.css file
# to dashboard-myThemeName.css in the content/css directory and
# modify it to your liking.
theme = default
[keyboard-shortcuts]
toggle_toolbar = ctrl-z
toggle_metrics_panel = ctrl-space
erase_all_graphs = alt-x
save_dashboard = alt-s
completer_add_metrics = alt-enter
completer_del_metrics = alt-backspace
give_completer_focus = shift-space
# These settings apply to the UI as a whole, all other sections in this file
# pertain only to specific metric types.
#
# The dashboard presents only metrics that fall into specified naming schemes
# defined in this file. This creates a simpler, more targetted view of the
# data. The general form for defining a naming scheme is as follows:
#
#[Metric Type]
#scheme = basis.path.<field1>.<field2>.<fieldN>
#field1.label = Foo
#field2.label = Bar
#
#
# Where each <field> will be displayed as a dropdown box
# in the UI and the remaining portion of the namespace
# shown in the Metric Selector panel. The .label options set the labels
# displayed for each dropdown.
#
# For example:
#
#[Sales]
#scheme = sales.<channel>.<type>.<brand>
#channel.label = Channel
#type.label = Product Type
#brand.label = Brand
#
# This defines a 'Sales' metric type that uses 3 dropdowns in the Context Selector
# (the upper-left panel) while any deeper metrics (per-product counts or revenue, etc)
# will be available in the Metric Selector (upper-right panel).
@@ -0,0 +1,38 @@
[default]
background = black
foreground = white
majorLine = white
minorLine = grey
lineColors = blue,green,red,purple,brown,yellow,aqua,grey,magenta,pink,gold,rose
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
[noc]
background = black
foreground = white
majorLine = white
minorLine = grey
lineColors = blue,green,red,yellow,purple,brown,aqua,grey,magenta,pink,gold,rose
fontName = Sans
fontSize = 10
fontBold = False
fontItalic = False
[plain]
background = white
foreground = black
minorLine = grey
majorLine = rose
[summary]
background = black
lineColors = #6666ff, #66ff66, #ff6666
[alphas]
background = white
foreground = black
majorLine = grey
minorLine = rose
lineColors = 00ff00aa,ff000077,00337799
@@ -0,0 +1,21 @@
# Relay destination rules for carbon-relay. Entries are scanned in order,
# and the first pattern a metric matches will cause processing to cease after sending
# unless `continue` is set to true
#
# [name]
# pattern = <regex>
# destinations = <list of destination addresses>
# continue = <boolean> # default: False
#
# name: Arbitrary unique name to identify the rule
# pattern: Regex pattern to match against the metric name
# destinations: Comma-separated list of destinations.
# ex: 127.0.0.1, 10.1.2.3:2004, 10.1.2.4:2004:a, myserver.mydomain.com
# continue: Continue processing rules if this rule matches (default: False)
# You must have exactly one section with 'default = true'
# Note that all destinations listed must also exist in carbon.conf
# in the DESTINATIONS setting in the [relay] section
[default]
default = true
destinations = 127.0.0.1:2004:a, 127.0.0.1:2104:b
@@ -0,0 +1,18 @@
# This file defines regular expression patterns that can be used to
# rewrite metric names in a search & replace fashion. It consists of two
# sections, [pre] and [post]. The rules in the pre section are applied to
# metric names as soon as they are received. The post rules are applied
# after aggregation has taken place.
#
# The general form of each rule is as follows:
#
# regex-pattern = replacement-text
#
# For example:
#
# [post]
# _sum$ =
# _avg$ =
#
# These rules would strip off a suffix of _sum or _avg from any metric names
# after aggregation.
@@ -0,0 +1,43 @@
# Aggregation methods for whisper files. Entries are scanned in order,
# and first match wins. This file is scanned for changes every 60 seconds
#
# [name]
# pattern = <regex>
# xFilesFactor = <float between 0 and 1>
# aggregationMethod = <average|sum|last|max|min>
#
# name: Arbitrary unique name for the rule
# pattern: Regex pattern to match against the metric name
# xFilesFactor: Ratio of valid data points required for aggregation to the next retention to occur
# aggregationMethod: function to apply to data points for aggregation
#
[min]
pattern = \.lower$
xFilesFactor = 0.1
aggregationMethod = min
[max]
pattern = \.upper(_\d+)?$
xFilesFactor = 0.1
aggregationMethod = max
[sum]
pattern = \.sum$
xFilesFactor = 0
aggregationMethod = sum
[count]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum
[count_legacy]
pattern = ^stats_counts.*
xFilesFactor = 0
aggregationMethod = sum
[default_average]
pattern = .*
xFilesFactor = 0.3
aggregationMethod = average
@@ -0,0 +1,17 @@
# Schema definitions for Whisper files. Entries are scanned in order,
[carbon]
pattern = ^carbon\..*
retentions = 1m:31d,10m:1y,1h:5y
[highres]
pattern = ^highres.*
retentions = 1s:1d,1m:7d
[statsd]
pattern = ^statsd.*
retentions = 1m:7d,10m:1y
[default]
pattern = .*
retentions = 10s:1d,1m:7d,10m:1y
@@ -0,0 +1,6 @@
# This file takes a single regular expression per line
# If USE_WHITELIST is set to True in carbon.conf, only metrics received which
# match one of these expressions will be persisted. If this file is empty or
# missing, all metrics will pass through.
# This file is reloaded automatically when changes are made
.*
@@ -0,0 +1,94 @@
"""Copyright 2008 Orbitz WorldWide
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License."""
# Django settings for graphite project.
# DO NOT MODIFY THIS FILE DIRECTLY - use local_settings.py instead
from os.path import dirname, join, abspath
#Django settings below, do not touch!
APPEND_SLASH = False
TEMPLATE_DEBUG = False
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
join(dirname( abspath(__file__) ), 'templates')
],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PROCESSORS here or use this
# list if you haven't customized them:
'django.contrib.auth.context_processors.auth',
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.contrib.messages.context_processors.messages',
],
},
},
]
# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
# http://blogs.law.harvard.edu/tech/stories/storyReader$15
LANGUAGE_CODE = 'en-us'
# Absolute path to the directory that holds media.
MEDIA_ROOT = ''
# URL that handles the media served from MEDIA_ROOT.
# Example: "http://media.lawrence.com"
MEDIA_URL = ''
MIDDLEWARE_CLASSES = (
'graphite.middleware.LogExceptionsMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.gzip.GZipMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
)
ROOT_URLCONF = 'graphite.urls'
INSTALLED_APPS = (
'graphite.metrics',
'graphite.render',
'graphite.browser',
'graphite.composer',
'graphite.account',
'graphite.dashboard',
'graphite.whitelist',
'graphite.events',
'graphite.url_shortener',
'django.contrib.auth',
'django.contrib.sessions',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.staticfiles',
'tagging',
)
AUTHENTICATION_BACKENDS = ['django.contrib.auth.backends.ModelBackend']
GRAPHITE_WEB_APP_SETTINGS_LOADED = True
STATIC_URL = '/static/'
STATIC_ROOT = '/opt/graphite/static/'
@@ -0,0 +1,215 @@
## Graphite local_settings.py
# Edit this file to customize the default Graphite webapp settings
#
# Additional customizations to Django settings can be added to this file as well
#####################################
# General Configuration #
#####################################
# Set this to a long, random unique string to use as a secret key for this
# install. This key is used for salting of hashes used in auth tokens,
# CRSF middleware, cookie storage, etc. This should be set identically among
# instances if used behind a load balancer.
#SECRET_KEY = 'UNSAFE_DEFAULT'
# In Django 1.5+ set this to the list of hosts your graphite instances is
# accessible as. See:
# https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-ALLOWED_HOSTS
#ALLOWED_HOSTS = [ '*' ]
# Set your local timezone (Django's default is America/Chicago)
# If your graphs appear to be offset by a couple hours then this probably
# needs to be explicitly set to your local timezone.
#TIME_ZONE = 'America/Los_Angeles'
# Override this to provide documentation specific to your Graphite deployment
#DOCUMENTATION_URL = "http://graphite.readthedocs.org/"
# Logging
#LOG_RENDERING_PERFORMANCE = True
#LOG_CACHE_PERFORMANCE = True
#LOG_METRIC_ACCESS = True
# Enable full debug page display on exceptions (Internal Server Error pages)
#DEBUG = True
# If using RRD files and rrdcached, set to the address or socket of the daemon
#FLUSHRRDCACHED = 'unix:/var/run/rrdcached.sock'
# This lists the memcached servers that will be used by this webapp.
# If you have a cluster of webapps you should ensure all of them
# have the *exact* same value for this setting. That will maximize cache
# efficiency. Setting MEMCACHE_HOSTS to be empty will turn off use of
# memcached entirely.
#
# You should not use the loopback address (127.0.0.1) here if using clustering
# as every webapp in the cluster should use the exact same values to prevent
# unneeded cache misses. Set to [] to disable caching of images and fetched data
#MEMCACHE_HOSTS = ['10.10.10.10:11211', '10.10.10.11:11211', '10.10.10.12:11211']
#DEFAULT_CACHE_DURATION = 60 # Cache images and data for 1 minute
#####################################
# Filesystem Paths #
#####################################
# Change only GRAPHITE_ROOT if your install is merely shifted from /opt/graphite
# to somewhere else
#GRAPHITE_ROOT = '/opt/graphite'
# Most installs done outside of a separate tree such as /opt/graphite will only
# need to change these three settings. Note that the default settings for each
# of these is relative to GRAPHITE_ROOT
#CONF_DIR = '/opt/graphite/conf'
#STORAGE_DIR = '/opt/graphite/storage'
#CONTENT_DIR = '/opt/graphite/webapp/content'
# To further or fully customize the paths, modify the following. Note that the
# default settings for each of these are relative to CONF_DIR and STORAGE_DIR
#
## Webapp config files
#DASHBOARD_CONF = '/opt/graphite/conf/dashboard.conf'
#GRAPHTEMPLATES_CONF = '/opt/graphite/conf/graphTemplates.conf'
## Data directories
# NOTE: If any directory is unreadable in DATA_DIRS it will break metric browsing
#WHISPER_DIR = '/opt/graphite/storage/whisper'
#RRD_DIR = '/opt/graphite/storage/rrd'
#DATA_DIRS = [WHISPER_DIR, RRD_DIR] # Default: set from the above variables
#LOG_DIR = '/opt/graphite/storage/log/webapp'
#INDEX_FILE = '/opt/graphite/storage/index' # Search index file
#####################################
# Email Configuration #
#####################################
# This is used for emailing rendered Graphs
# Default backend is SMTP
#EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
#EMAIL_HOST = 'localhost'
#EMAIL_PORT = 25
#EMAIL_HOST_USER = ''
#EMAIL_HOST_PASSWORD = ''
#EMAIL_USE_TLS = False
# To drop emails on the floor, enable the Dummy backend:
#EMAIL_BACKEND = 'django.core.mail.backends.dummy.EmailBackend'
#####################################
# Authentication Configuration #
#####################################
## LDAP / ActiveDirectory authentication setup
#USE_LDAP_AUTH = True
#LDAP_SERVER = "ldap.mycompany.com"
#LDAP_PORT = 389
# OR
#LDAP_URI = "ldaps://ldap.mycompany.com:636"
#LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com"
#LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com"
#LDAP_BASE_PASS = "readonly_account_password"
#LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%s)"
#
# If you want to further customize the ldap connection options you should
# directly use ldap.set_option to set the ldap module's global options.
# For example:
#
#import ldap
#ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_ALLOW)
#ldap.set_option(ldap.OPT_X_TLS_CACERTDIR, "/etc/ssl/ca")
#ldap.set_option(ldap.OPT_X_TLS_CERTFILE, "/etc/ssl/mycert.pem")
#ldap.set_option(ldap.OPT_X_TLS_KEYFILE, "/etc/ssl/mykey.pem")
# See http://www.python-ldap.org/ for further details on these options.
## REMOTE_USER authentication. See: https://docs.djangoproject.com/en/dev/howto/auth-remote-user/
#USE_REMOTE_USER_AUTHENTICATION = True
# Override the URL for the login link (e.g. for django_openid_auth)
#LOGIN_URL = '/account/login'
##########################
# Database Configuration #
##########################
# By default sqlite is used. If you cluster multiple webapps you will need
# to setup an external database (such as MySQL) and configure all of the webapp
# instances to use the same database. Note that this database is only used to store
# Django models such as saved graphs, dashboards, user preferences, etc.
# Metric data is not stored here.
#
# DO NOT FORGET TO RUN 'manage.py syncdb' AFTER SETTING UP A NEW DATABASE
#
# The following built-in database engines are available:
# django.db.backends.postgresql # Removed in Django 1.4
# django.db.backends.postgresql_psycopg2
# django.db.backends.mysql
# django.db.backends.sqlite3
# django.db.backends.oracle
#
# The default is 'django.db.backends.sqlite3' with file 'graphite.db'
# located in STORAGE_DIR
#
#DATABASES = {
# 'default': {
# 'NAME': '/opt/graphite/storage/graphite.db',
# 'ENGINE': 'django.db.backends.sqlite3',
# 'USER': '',
# 'PASSWORD': '',
# 'HOST': '',
# 'PORT': ''
# }
#}
#
#########################
# Cluster Configuration #
#########################
# (To avoid excessive DNS lookups you want to stick to using IP addresses only in this entire section)
#
# This should list the IP address (and optionally port) of the webapp on each
# remote server in the cluster. These servers must each have local access to
# metric data. Note that the first server to return a match for a query will be
# used.
#CLUSTER_SERVERS = ["10.0.2.2:80", "10.0.2.3:80"]
## These are timeout values (in seconds) for requests to remote webapps
#REMOTE_STORE_FETCH_TIMEOUT = 6 # Timeout to fetch series data
#REMOTE_STORE_FIND_TIMEOUT = 2.5 # Timeout for metric find requests
#REMOTE_STORE_RETRY_DELAY = 60 # Time before retrying a failed remote webapp
#REMOTE_FIND_CACHE_DURATION = 300 # Time to cache remote metric find results
## Remote rendering settings
# Set to True to enable rendering of Graphs on a remote webapp
#REMOTE_RENDERING = True
# List of IP (and optionally port) of the webapp on each remote server that
# will be used for rendering. Note that each rendering host should have local
# access to metric data or should have CLUSTER_SERVERS configured
#RENDERING_HOSTS = []
#REMOTE_RENDER_CONNECT_TIMEOUT = 1.0
# If you are running multiple carbon-caches on this machine (typically behind a relay using
# consistent hashing), you'll need to list the ip address, cache query port, and instance name of each carbon-cache
# instance on the local machine (NOT every carbon-cache in the entire cluster). The default cache query port is 7002
# and a common scheme is to use 7102 for instance b, 7202 for instance c, etc.
#
# You *should* use 127.0.0.1 here in most cases
#CARBONLINK_HOSTS = ["127.0.0.1:7002:a", "127.0.0.1:7102:b", "127.0.0.1:7202:c"]
#CARBONLINK_TIMEOUT = 1.0
#####################################
# Additional Django Settings #
#####################################
# Uncomment the following line for direct access to Django settings such as
# MIDDLEWARE_CLASSES or APPS
#from graphite.app_settings import *
import os
LOG_DIR = '/var/log/graphite'
SECRET_KEY = '$(date +%s | sha256sum | base64 | head -c 64)'
if (os.getenv("MEMCACHE_HOST") is not None):
MEMCACHE_HOSTS = os.getenv("MEMCACHE_HOST").split(",")
if (os.getenv("DEFAULT_CACHE_DURATION") is not None):
DEFAULT_CACHE_DURATION = int(os.getenv("CACHE_DURATION"))
@@ -0,0 +1,6 @@
{
"graphiteHost": "127.0.0.1",
"graphitePort": 2003,
"port": 8125,
"flushInterval": 10000
}
@@ -0,0 +1,26 @@
#!/usr/bin/env expect
set timeout -1
spawn /usr/local/bin/manage.sh
expect "Would you like to create one now" {
send "yes\r"
}
expect "Username" {
send "root\r"
}
expect "Email address:" {
send "root.graphite@mailinator.com\r"
}
expect "Password:" {
send "root\r"
}
expect "Password *:" {
send "root\r"
}
expect "Superuser created successfully"
@@ -0,0 +1,3 @@
#!/bin/bash
PYTHONPATH=/opt/graphite/webapp django-admin.py syncdb --settings=graphite.settings
PYTHONPATH=/opt/graphite/webapp django-admin.py update_users --settings=graphite.settings
+16
View File
@@ -0,0 +1,16 @@
graphite:
build: blocks/graphite1
ports:
- "8080:80"
- "2003:2003"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
fake-graphite-data:
image: grafana/fake-data-gen
net: bridge
environment:
FD_DATASOURCE: graphite
FD_PORT: 2003
+76
View File
@@ -0,0 +1,76 @@
[cache]
LOCAL_DATA_DIR = /opt/graphite/storage/whisper/
# Specify the user to drop privileges to
# If this is blank carbon runs as the user that invokes it
# This user must have write access to the local data directory
USER =
# Limit the size of the cache to avoid swapping or becoming CPU bound.
# Sorts and serving cache queries gets more expensive as the cache grows.
# Use the value "inf" (infinity) for an unlimited cache size.
MAX_CACHE_SIZE = inf
# Limits the number of whisper update_many() calls per second, which effectively
# means the number of write requests sent to the disk. This is intended to
# prevent over-utilizing the disk and thus starving the rest of the system.
# When the rate of required updates exceeds this, then carbon's caching will
# take effect and increase the overall throughput accordingly.
MAX_UPDATES_PER_SECOND = 1000
# Softly limits the number of whisper files that get created each minute.
# Setting this value low (like at 50) is a good way to ensure your graphite
# system will not be adversely impacted when a bunch of new metrics are
# sent to it. The trade off is that it will take much longer for those metrics'
# database files to all get created and thus longer until the data becomes usable.
# Setting this value high (like "inf" for infinity) will cause graphite to create
# the files quickly but at the risk of slowing I/O down considerably for a while.
MAX_CREATES_PER_MINUTE = inf
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
CACHE_QUERY_INTERFACE = 0.0.0.0
CACHE_QUERY_PORT = 7002
LOG_UPDATES = False
# Enable AMQP if you want to receve metrics using an amqp broker
# ENABLE_AMQP = False
# Verbose means a line will be logged for every metric received
# useful for testing
# AMQP_VERBOSE = False
# AMQP_HOST = localhost
# AMQP_PORT = 5672
# AMQP_VHOST = /
# AMQP_USER = guest
# AMQP_PASSWORD = guest
# AMQP_EXCHANGE = graphite
# Patterns for all of the metrics this machine will store. Read more at
# http://en.wikipedia.org/wiki/Advanced_Message_Queuing_Protocol#Bindings
#
# Example: store all sales, linux servers, and utilization metrics
# BIND_PATTERNS = sales.#, servers.linux.#, #.utilization
#
# Example: store everything
# BIND_PATTERNS = #
# NOTE: you cannot run both a cache and a relay on the same server
# with the default configuration, you have to specify a distinict
# interfaces and ports for the listeners.
[relay]
LINE_RECEIVER_INTERFACE = 0.0.0.0
LINE_RECEIVER_PORT = 2003
PICKLE_RECEIVER_INTERFACE = 0.0.0.0
PICKLE_RECEIVER_PORT = 2004
CACHE_SERVERS = server1, server2, server3
MAX_QUEUE_SIZE = 10000
@@ -0,0 +1,102 @@
import datetime
import time
from django.utils.timezone import get_current_timezone
from django.core.urlresolvers import get_script_prefix
from django.http import HttpResponse
from django.shortcuts import render_to_response, get_object_or_404
from pytz import timezone
from graphite.util import json
from graphite.events import models
from graphite.render.attime import parseATTime
def to_timestamp(dt):
return time.mktime(dt.timetuple())
class EventEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, datetime.datetime):
return to_timestamp(obj)
return json.JSONEncoder.default(self, obj)
def view_events(request):
if request.method == "GET":
context = { 'events' : fetch(request),
'slash' : get_script_prefix()
}
return render_to_response("events.html", context)
else:
return post_event(request)
def detail(request, event_id):
e = get_object_or_404(models.Event, pk=event_id)
context = { 'event' : e,
'slash' : get_script_prefix()
}
return render_to_response("event.html", context)
def post_event(request):
if request.method == 'POST':
event = json.loads(request.body)
assert isinstance(event, dict)
values = {}
values["what"] = event["what"]
values["tags"] = event.get("tags", None)
values["when"] = datetime.datetime.fromtimestamp(
event.get("when", time.time()))
if "data" in event:
values["data"] = event["data"]
e = models.Event(**values)
e.save()
return HttpResponse(status=200)
else:
return HttpResponse(status=405)
def get_data(request):
if 'jsonp' in request.REQUEST:
response = HttpResponse(
"%s(%s)" % (request.REQUEST.get('jsonp'),
json.dumps(fetch(request), cls=EventEncoder)),
mimetype='text/javascript')
else:
response = HttpResponse(
json.dumps(fetch(request), cls=EventEncoder),
mimetype="application/json")
return response
def fetch(request):
#XXX we need to move to USE_TZ=True to get rid of naive-time conversions
def make_naive(dt):
if 'tz' in request.GET:
tz = timezone(request.GET['tz'])
else:
tz = get_current_timezone()
local_dt = dt.astimezone(tz)
if hasattr(local_dt, 'normalize'):
local_dt = local_dt.normalize()
return local_dt.replace(tzinfo=None)
if request.GET.get("from", None) is not None:
time_from = make_naive(parseATTime(request.GET["from"]))
else:
time_from = datetime.datetime.fromtimestamp(0)
if request.GET.get("until", None) is not None:
time_until = make_naive(parseATTime(request.GET["until"]))
else:
time_until = datetime.datetime.now()
tags = request.GET.get("tags", None)
if tags is not None:
tags = request.GET.get("tags").split(" ")
return [x.as_dict() for x in
models.Event.find_events(time_from, time_until, tags=tags)]
@@ -0,0 +1,20 @@
[
{
"pk": 1,
"model": "auth.user",
"fields": {
"username": "admin",
"first_name": "",
"last_name": "",
"is_active": true,
"is_superuser": true,
"is_staff": true,
"last_login": "2011-09-20 17:02:14",
"groups": [],
"user_permissions": [],
"password": "sha1$1b11b$edeb0a67a9622f1f2cfeabf9188a711f5ac7d236",
"email": "root@example.com",
"date_joined": "2011-09-20 17:02:14"
}
}
]
@@ -0,0 +1,42 @@
# Edit this file to override the default graphite settings, do not edit settings.py
# Turn on debugging and restart apache if you ever see an "Internal Server Error" page
#DEBUG = True
# Set your local timezone (django will try to figure this out automatically)
TIME_ZONE = 'UTC'
# Setting MEMCACHE_HOSTS to be empty will turn off use of memcached entirely
#MEMCACHE_HOSTS = ['127.0.0.1:11211']
# Sometimes you need to do a lot of rendering work but cannot share your storage mount
#REMOTE_RENDERING = True
#RENDERING_HOSTS = ['fastserver01','fastserver02']
#LOG_RENDERING_PERFORMANCE = True
#LOG_CACHE_PERFORMANCE = True
# If you've got more than one backend server they should all be listed here
#CLUSTER_SERVERS = []
# Override this if you need to provide documentation specific to your graphite deployment
#DOCUMENTATION_URL = "http://wiki.mycompany.com/graphite"
# Enable email-related features
#SMTP_SERVER = "mail.mycompany.com"
# LDAP / ActiveDirectory authentication setup
#USE_LDAP_AUTH = True
#LDAP_SERVER = "ldap.mycompany.com"
#LDAP_PORT = 389
#LDAP_SEARCH_BASE = "OU=users,DC=mycompany,DC=com"
#LDAP_BASE_USER = "CN=some_readonly_account,DC=mycompany,DC=com"
#LDAP_BASE_PASS = "readonly_account_password"
#LDAP_USER_QUERY = "(username=%s)" #For Active Directory use "(sAMAccountName=%s)"
# If sqlite won't cut it, configure your real database here (don't forget to run manage.py syncdb!)
#DATABASE_ENGINE = 'mysql' # or 'postgres'
#DATABASE_NAME = 'graphite'
#DATABASE_USER = 'graphite'
#DATABASE_PASSWORD = 'graphite-is-awesome'
#DATABASE_HOST = 'mysql.mycompany.com'
#DATABASE_PORT = '3306'
@@ -0,0 +1 @@
grafana:$apr1$4R/20xhC$8t37jPP5dbcLr48btdkU//
+70
View File
@@ -0,0 +1,70 @@
daemon off;
user www-data;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 32;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 80 default_server;
server_name _;
open_log_file_cache max=1000 inactive=20s min_uses=2 valid=1m;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header Host $host;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
add_header Access-Control-Allow-Origin "*";
add_header Access-Control-Allow-Methods "GET, OPTIONS";
add_header Access-Control-Allow-Headers "origin, authorization, accept";
location /content {
alias /opt/graphite/webapp/content;
}
location /media {
alias /usr/share/pyshared/django/contrib/admin/media;
}
}
}
@@ -0,0 +1,8 @@
{
graphitePort: 2003,
graphiteHost: "127.0.0.1",
port: 8125,
mgmt_port: 8126,
backends: ['./backends/graphite'],
debug: true
}
@@ -0,0 +1,19 @@
[min]
pattern = \.min$
xFilesFactor = 0.1
aggregationMethod = min
[max]
pattern = \.max$
xFilesFactor = 0.1
aggregationMethod = max
[sum]
pattern = \.count$
xFilesFactor = 0
aggregationMethod = sum
[default_average]
pattern = .*
xFilesFactor = 0.5
aggregationMethod = average
@@ -0,0 +1,16 @@
[carbon]
pattern = ^carbon\..*
retentions = 1m:31d,10m:1y,1h:5y
[highres]
pattern = ^highres.*
retentions = 1s:1d,1m:7d
[statsd]
pattern = ^statsd.*
retentions = 1m:7d,10m:1y
[default]
pattern = .*
retentions = 10s:1d,1m:7d,10m:1y
@@ -0,0 +1,26 @@
[supervisord]
nodaemon = true
environment = GRAPHITE_STORAGE_DIR='/opt/graphite/storage',GRAPHITE_CONF_DIR='/opt/graphite/conf'
[program:nginx]
command = /usr/sbin/nginx
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
[program:carbon-cache]
;user = www-data
command = /opt/graphite/bin/carbon-cache.py --debug start
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
[program:graphite-webapp]
;user = www-data
directory = /opt/graphite/webapp
environment = PYTHONPATH='/opt/graphite/webapp'
command = /usr/bin/gunicorn_django -b127.0.0.1:8000 -w2 graphite/settings.py
stdout_logfile = /var/log/supervisor/%(program_name)s.log
stderr_logfile = /var/log/supervisor/%(program_name)s.log
autorestart = true
+6
View File
@@ -0,0 +1,6 @@
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "localhost:6831:6831/udp"
- "16686:16686"
+5
View File
@@ -7,3 +7,8 @@ mysql:
MYSQL_PASSWORD: password
ports:
- "3306:3306"
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --innodb_monitor_enable=all]
+20
View File
@@ -0,0 +1,20 @@
## MySQL with Open Data Set from NYC Open Data (https://data.cityofnewyork.us)
FROM mysql:latest
ENV MYSQL_DATABASE="testdata" \
MYSQL_ROOT_PASSWORD="rootpass" \
MYSQL_USER="grafana" \
MYSQL_PASSWORD="password"
# Install requirement (wget)
RUN apt-get update && apt-get install -y wget && apt-get install unzip
# Fetch NYC Data Set
RUN wget https://data.cityofnewyork.us/download/57g5-etyj/application%2Fzip -O /tmp/data.zip && \
unzip -j /tmp/data.zip 311_Service_Requests_from_2015.csv -d /var/lib/mysql-files && \
rm /tmp/data.zip
ADD import_csv.sql /docker-entrypoint-initdb.d/
EXPOSE 3306
+9
View File
@@ -0,0 +1,9 @@
mysql_opendata:
build: blocks/mysql_opendata
environment:
MYSQL_ROOT_PASSWORD: rootpass
MYSQL_DATABASE: testdata
MYSQL_USER: grafana
MYSQL_PASSWORD: password
ports:
- "3307:3306"
@@ -0,0 +1,80 @@
use testdata;
DROP TABLE IF EXISTS `nyc_open_data`;
CREATE TABLE IF NOT EXISTS `nyc_open_data` (
UniqueKey bigint(255),
`CreatedDate` varchar(255),
`ClosedDate` varchar(255),
Agency varchar(255),
AgencyName varchar(255),
ComplaintType varchar(255),
Descriptor varchar(255),
LocationType varchar(255),
IncidentZip varchar(255),
IncidentAddress varchar(255),
StreetName varchar(255),
CrossStreet1 varchar(255),
CrossStreet2 varchar(255),
IntersectionStreet1 varchar(255),
IntersectionStreet2 varchar(255),
AddressType varchar(255),
City varchar(255),
Landmark varchar(255),
FacilityType varchar(255),
Status varchar(255),
`DueDate` varchar(255),
ResolutionDescription varchar(2048),
`ResolutionActionUpdatedDate` varchar(255),
CommunityBoard varchar(255),
Borough varchar(255),
XCoordinateStatePlane varchar(255),
YCoordinateStatePlane varchar(255),
ParkFacilityName varchar(255),
ParkBorough varchar(255),
SchoolName varchar(255),
SchoolNumber varchar(255),
SchoolRegion varchar(255),
SchoolCode varchar(255),
SchoolPhoneNumber varchar(255),
SchoolAddress varchar(255),
SchoolCity varchar(255),
SchoolState varchar(255),
SchoolZip varchar(255),
SchoolNotFound varchar(255),
SchoolOrCitywideComplaint varchar(255),
VehicleType varchar(255),
TaxiCompanyBorough varchar(255),
TaxiPickUpLocation varchar(255),
BridgeHighwayName varchar(255),
BridgeHighwayDirection varchar(255),
RoadRamp varchar(255),
BridgeHighwaySegment varchar(255),
GarageLotName varchar(255),
FerryDirection varchar(255),
FerryTerminalName varchar(255),
Latitude varchar(255),
Longitude varchar(255),
Location varchar(255)
);
LOAD DATA INFILE '/var/lib/mysql-files/311_Service_Requests_from_2015.csv' INTO TABLE nyc_open_data FIELDS OPTIONALLY ENCLOSED BY '"' TERMINATED BY ',' IGNORE 1 LINES;
UPDATE nyc_open_data SET CreatedDate = STR_TO_DATE(CreatedDate, '%m/%d/%Y %r') WHERE CreatedDate <> '';
UPDATE nyc_open_data SET ClosedDate = STR_TO_DATE(ClosedDate, '%m/%d/%Y %r') WHERE ClosedDate <> '';
UPDATE nyc_open_data SET DueDate = STR_TO_DATE(DueDate, '%m/%d/%Y %r') WHERE DueDate <> '';
UPDATE nyc_open_data SET ResolutionActionUpdatedDate = STR_TO_DATE(ResolutionActionUpdatedDate, '%m/%d/%Y %r') WHERE ResolutionActionUpdatedDate <> '';
UPDATE nyc_open_data SET CreatedDate=null WHERE CreatedDate = '';
UPDATE nyc_open_data SET ClosedDate=null WHERE ClosedDate = '';
UPDATE nyc_open_data SET DueDate=null WHERE DueDate = '';
UPDATE nyc_open_data SET ResolutionActionUpdatedDate=null WHERE ResolutionActionUpdatedDate = '';
ALTER TABLE nyc_open_data modify CreatedDate datetime NULL;
ALTER TABLE nyc_open_data modify ClosedDate datetime NULL;
ALTER TABLE nyc_open_data modify DueDate datetime NULL;
ALTER TABLE nyc_open_data modify ResolutionActionUpdatedDate datetime NULL;
ALTER TABLE `nyc_open_data` ADD INDEX `IX_ComplaintType` (`ComplaintType`);
ALTER TABLE `nyc_open_data` ADD INDEX `IX_CreatedDate` (`CreatedDate`);
ALTER TABLE `nyc_open_data` ADD INDEX `IX_LocationType` (`LocationType`);
ALTER TABLE `nyc_open_data` ADD INDEX `IX_AgencyName` (`AgencyName`);
ALTER TABLE `nyc_open_data` ADD INDEX `IX_City` (`City`);
SYSTEM rm /var/lib/mysql-files/311_Service_Requests_from_2015.csv
+1
View File
@@ -6,3 +6,4 @@ postgrestest:
POSTGRES_DATABASE: grafana
ports:
- "5432:5432"
command: postgres -c log_connections=on -c logging_collector=on -c log_destination=stderr -c log_directory=/var/log/postgresql
+1
View File
@@ -1,2 +1,3 @@
FROM prom/prometheus
ADD prometheus.yml /etc/prometheus/
ADD alert.rules /etc/prometheus/
+10
View File
@@ -0,0 +1,10 @@
# Alert Rules
ALERT AppCrash
IF process_open_fds > 0
FOR 15s
LABELS { severity="critical" }
ANNOTATIONS {
summary = "Number of open fds > 0",
description = "Just testing"
}
+5 -2
View File
@@ -3,8 +3,6 @@ prometheus:
net: host
ports:
- "9090:9090"
volumes:
- /var/docker/prometheus:/prometheus-data
node_exporter:
image: prom/node-exporter
@@ -20,3 +18,8 @@ fake-prometheus-data:
environment:
FD_DATASOURCE: prom
alertmanager:
image: quay.io/prometheus/alertmanager
net: host
ports:
- "9093:9093"
+23 -15
View File
@@ -6,22 +6,30 @@ global:
# Load and evaluate rules in this file every 'evaluation_interval' seconds.
rule_files:
- "alert.rules"
# - "first.rules"
# - "second.rules"
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 10s
scrape_timeout: 10s
# metrics_path defaults to '/metrics'
# scheme defaults to 'http'.
alerting:
alertmanagers:
- scheme: http
static_configs:
#- targets: ['localhost:9090', '172.17.0.1:9091', '172.17.0.1:9100', '172.17.0.1:9150']
- targets: ['localhost:9090', '127.0.0.1:9091', '127.0.0.1:9100', '127.0.0.1:9150']
- targets:
- "127.0.0.1:9093"
scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'node_exporter'
static_configs:
- targets: ['127.0.0.1:9100']
- job_name: 'fake-data-gen'
static_configs:
- targets: ['127.0.0.1:9091']
- job_name: 'grafana'
static_configs:
- targets: ['127.0.0.1:3000']
+2 -2
View File
@@ -1,4 +1,4 @@
snmpd:
build: blocks/snmpd
image: namshi/smtp
ports:
- "161:161"
- "25:25"
+3 -2
View File
@@ -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"]
+18 -34
View File
@@ -1,50 +1,34 @@
.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/)
.PHONY: all default docs docs-build docs-shell shell checkvars
# 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
VERSION := $(shell head -n 1 VERSION)
default: docs
checkvars:
ifndef ENV
$(error ENV is undefined set via ENV=staging or ENV=prod as argument to make)
endif
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"
$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "grunt --env=dev-docs && 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"
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"
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
test: docs-build
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)"
publish: checkvars docs-build
$(info Publishing ENV=${ENV} and VERSION=${VERSION})
$(DOCKER_RUN_DOCS) $(DOCS_MOUNT) -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" /bin/bash -c "./publish.sh ${ENV}-docs ${VERSION}"
docs-build:
docker build -t "$(DOCKER_DOCS_IMAGE)" .
docker build -t "$(DOCKER_DOCS_IMAGE)" --no-cache .
+45 -8
View File
@@ -1,8 +1,7 @@
# Building The Docs
To build the docs locally, you need to have docker installed. The
docs are built using a custom [docker](https://www.docker.com/) image
and the [mkdocs](http://www.mkdocs.org/) tool.
docs are built using [Hugo](http://gohugo.io/) - a static site generator.
**Prepare the Docker Image**:
@@ -11,19 +10,40 @@ when running ``make docs-build`` depending on how your system's docker
service is configured):
```
$ git clone https://github.com/grafana/grafana.org
$ cd grafana.org
$ make docs-build
git clone https://github.com/grafana/grafana.org
cd grafana.org
make docs-build
```
**Build the Documentation**:
Now that the docker image has been prepared we can build the
docs. Switch your working directory back to the directory this file
(README.md) is in and run (possibly with ``sudo``):
grafana docs and start a docs server.
If you have not cloned the Grafana repository already then:
```
$ make docs
cd ..
git clone https://github.com/grafana/grafana
```
Switch your working directory to the directory this file
(README.md) is in.
```
cd grafana/docs
```
An AWS config file is required to build the docs Docker image and to publish the site to AWS. If you are building locally only and do not have any AWS credentials for docs.grafana.org then create an empty file named `awsconfig` in the current directory.
```
touch awsconfig
```
Then run (possibly with ``sudo``):
```
make watch
```
This command will not return control of the shell to the user. Instead
@@ -32,4 +52,21 @@ we created in the previous step.
Open [localhost:3004](http://localhost:3004) to view the docs.
### Images & Content
All markdown files are located in this repo (main grafana repo). But all images are added to the https://github.com/grafana/grafana.org repo. So the process of adding images is a bit complicated.
First you need create a feature (PR) branch of https://github.com/grafana/grafana.org so you can make change. Then add the image to the `/static/img/docs` directory. Then make a commit that adds the image.
Then run:
```
make docs-build
```
This will rebuild the docs docker container.
To be able to use the image your have to quit (CTRL-C) the `make watch` command (that you run in the same directory as this README). Then simply rerun `make watch`, it will restart the docs server but now with access to your image.
### Editing content
Changes to the markdown files should automatically cause a docs rebuild and live reload should reload the page in your browser.
+1 -1
View File
@@ -1 +1 @@
3.1.0
v4.3
+11 -61
View File
@@ -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/"
+3
View File
@@ -0,0 +1,3 @@
#!/bin/bash
make publish ENV=prod VERSION=root
+19 -1
View File
@@ -27,6 +27,24 @@ To show all admin commands:
### Reset admin password
You can reset the password for the admin user using the CLI.
You can reset the password for the admin user using the CLI. The use case for this command is when you have lost the admin password.
`grafana-cli admin reset-admin-password ...`
If running the command returns this error:
> Could not find config defaults, make sure homepath command line parameter is set or working directory is homepath
then there are two flags that can be used to set homepath and the config file path.
`grafana-cli admin reset-admin-password --homepath "/usr/share/grafana" newpass`
If you have not lost the admin password then it is better to set in the Grafana UI. If you need to set the password in a script then the [Grafana API](http://docs.grafana.org/http_api/user/#change-password) can be used. Here is an example with curl using basic auth:
```bash
curl -X PUT -H "Content-Type: application/json" -d '{
"oldPassword": "admin",
"newPassword": "newpass",
"confirmNew": "newpass"
}' http://admin:admin@<your_grafana_host>:3000/api/user/password
```
+15
View File
@@ -0,0 +1,15 @@
+++
title = "Internal metrics"
description = "Internal metrics exposed by Grafana"
keywords = ["grafana", "metrics", "internal metrics"]
type = "docs"
[menu.docs]
parent = "admin"
weight = 8
+++
# Internal metrics
Grafana collects some metrics about it self internally. Currently Grafana supports pushing metrics to graphite and exposing them to be scraped by Prometheus.
To enabled internal metrics you have to enable it under the [metrics] section in your [grafana.ini](http://docs.grafana.org/installation/configuration/#enabled-6) config file.If you want to push metrics to graphite you have also have to configure the [metrics.graphite](http://docs.grafana.org/installation/configuration/#metrics-graphite) section.
+81 -29
View File
@@ -12,18 +12,18 @@ weight = 2
# Alert Notifications
{{< imgbox max-width="40%" img="/img/docs/v4/alert_notifications_menu.png" caption="Alerting notifications" >}}
> Alerting is only available in Grafana v4.0 and above.
When an alert changes state it sends out notifications. Each alert rule can have
multiple notifications. But in order to add a notification to an alert rule you first need
to add and configure a `notification` object. This is done from the Alerting/Notifications page.
to add and configure a `notification` channel (can be email, Pagerduty or other integration). This is done from the Notification Channels page.
## Notification Setup
## Notification Channel Setup
On the notifications list page hit the `New Notification` button to go the the page where you
can configure and setup a new notification.
{{< imgbox max-width="40%" img="/img/docs/v43/alert_notifications_menu.png" caption="Alerting Notification Channels" >}}
On the Notification Channels page hit the `New Channel` button to go the page where you
can configure and setup a new Notification Channel.
You specify name and type, and type specific options. You can also test the notification to make
sure it's working and setup correctly.
@@ -32,15 +32,15 @@ sure it's working and setup correctly.
When checked this option will make this notification used for all alert rules, existing and new.
## Supported notification types
## Supported Notification Types
Grafana ships with a set of notification types. More will be added in future releases.
Grafana ships with the following set of notification types:
### Email
To enable email notification you have to setup [SMTP settings](/installation/configuration/#smtp)
in the Grafana config. Email notification will upload an image of the alert graph to an
external image destination if available or fallback on attaching the image in the email.
external image destination if available or fallback to attaching the image in the email.
### Slack
@@ -48,26 +48,39 @@ external image destination if available or fallback on attaching the image in th
To set up slack you need to configure an incoming webhook url at slack. You can follow their guide for how
to do that https://api.slack.com/incoming-webhooks If you want to include screenshots of the firing alerts
in the slack messages you have to configure the [external image destination](#external-image-store) in Grafana.
in the slack messages you have to configure either the [external image destination](#external-image-store) in Grafana,
or a bot integration via Slack Apps. Follow Slack's guide to set up a bot integration and use the token provided
https://api.slack.com/bot-users, which starts with "xoxb".
Setting | Description
---------- | -----------
Recipient | allows you to override the slack recipient.
Mention | make it possible to include a mention in the slack notification sent by Grafana. Ex @here or @channel
Token | If provided, Grafana will upload the generated image via Slack's file.upload API method, not the external image destination.
### PagerDuty
To set up PagerDuty, all you have to do is to provide an api key.
Setting | Description
---------- | -----------
Integration Key | Integration key for pagerduty.
Auto resolve incidents | Resolve incidents in pagerduty once the alert goes back to ok
### Webhook
The webhook notification is a simple way to send information about an state change over HTTP to a custom endpoint.
Using this notification you could integrated Grafana into any system you choose, by yourself.
Using this notification you could integrate Grafana into any system you choose, by yourself.
Example json body:
```json
{
"title": "My alert",
"ruleId": 1,
"ruleName": "Load peaking!",
"ruleUrl": "http://url.to.grafana/db/dashboard/my_dashboard?panelId=2",
"state": "Alerting",
"state": "alerting",
"imageUrl": "http://s3.image.url",
"message": "Load is peaking. Make sure the traffic is real and spin up more webfronts",
"evalMatches": [
@@ -80,30 +93,69 @@ Example json body:
}
```
### PagerDuty
- **state** - The possible values for alert state are: `ok`, `paused`, `alerting`, `pending`, `no_data`.
To set up PagerDuty, all you have to do is to provide an api key.
### DingDing/DingTalk
Setting | Description
---------- | -----------
Integration Key | Integration key for pagerduty.
Auto resolve incidents | Resolve incidents in pagerduty once the alert goes back to ok
[Instructions in Chinese](https://open-doc.dingtalk.com/docs/doc.htm?spm=a219a.7629140.0.0.p2lr6t&treeId=257&articleId=105733&docType=1).
In DingTalk PC Client:
1. Click "more" icon on left bottom of the panel.
2. Click "Robot Manage" item in the pop menu, there will be a new panel call "Robot Manage".
3. In the "Robot Manage" panel, select "customised: customised robot with Webhook".
4. In the next new panel named "robot detail", click "Add" button.
5. In "Add Robot" panel, input a nickname for the robot and select a "message group" which the robot will join in. click "next".
6. There will be a Webhook URL in the panel, looks like this: https://oapi.dingtalk.com/robot/send?access_token=xxxxxxxxx. Copy this URL to the grafana Dingtalk setting page and then click "finish".
Dingtalk supports the following "message type": `text`, `link` and `markdown`. Only the `text` message type is supported.
### Kafka
Notifications can be sent to a Kafka topic from Grafana using [Kafka REST Proxy](https://docs.confluent.io/1.0/kafka-rest/docs/index.html).
There are couple of configurations options which need to be set in Grafana UI under Kafka Settings:
1. Kafka REST Proxy endpoint.
2. Kafka Topic.
Once these two properties are set, you can send the alerts to Kafka for further processing or throttling them.
### Other Supported Notification Channels
Grafana also supports the following Notification Channels:
- HipChat
- VictorOps
- Sensu
- OpsGenie
- Threema
- Pushover
- Telegram
- LINE
# Enable images in notifications {#external-image-store}
Grafana can render the panel associated with the alert rule and include that in the notification. Some types
of notifications require that this image be publicly accessable (Slack for example). In order to support
images in notifications like Slack Grafana can upload the image to an image store. It currently supports
Amazon S3 for this and Webdav. So to set that up you need to configure the
[external image uploader](/installation/configuration/#external-image-storage) in your grafana-server ini
config file.
Grafana can render the panel associated with the alert rule and include that in the notification. Most Notification Channels require that this image be publicly accessible (Slack and PagerDuty for example). In order to include images in alert notifications, Grafana can upload the image to an image store. It currently supports
Amazon S3 and Webdav for this. So to set that up you need to configure the [external image uploader](/installation/configuration/#external-image-storage) in your grafana-server ini config file.
This is an optional requirement, you can get slack and email notifications without setting this up.
Currently only the Email Channels attaches images if no external image store is specified. To include images in alert notifications for other channels then you need to set up an external image store.
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.
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.
+25 -18
View File
@@ -27,14 +27,12 @@ and the conditions that need to be met for the alert to change state and trigger
## Execution
The alert rules are evaluated in the Grafana backend in a scheduler and query execution engine that is part
of core Grafana. Only some data soures are supported right now. They include `Graphite`, `Prometheus`,
of core Grafana. Only some data sources are supported right now. They include `Graphite`, `Prometheus`,
`InfluxDB` and `OpenTSDB`.
### 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" >}})
is true on only one instance or otherwise you will get duplicated notifications.
Currently alerting supports a limited form of high availability. Since v4.2.0 of Grafana, alert notifications are deduped when running multiple servers. This means all alerts are executed on every server but no duplicate alert notifications are sent due to the deduping logic. Proper load balancing of alerts will be introduced in the future.
<div class="clearfix"></div>
@@ -52,12 +50,22 @@ Here you can specify the name of the alert rule and how often the scheduler shou
### Conditions
Currently the only condition type that exists is a `Query` condition that allows you to
specify a query letter, time range and an aggregation function. The letter refers to
a query you already have added in the **Metrics** tab. The result from the query and the aggregation function is
a single value that is then used in the threshold check. The query used in an alert rule cannot
contain any template variables. Currently we only support `AND` and `OR` operators between conditions and they are executed serially.
specify a query letter, time range and an aggregation function.
### Query condition example
```sql
avg() OF query(A, 5m, now) IS BELOW 14
```
- `avg()` Controls how the values for **each** series should be reduced to a value that can be compared against the threshold. Click on the function to change it to another aggregation function.
- `query(A, 5m, now)` The letter defines what query to execute from the **Metrics** tab. The second two parameters define the time range, `5m, now` means 5 minutes from now to now. You can also do `10m, now-2m` to define a time range that will be 10 minutes from now to 2 minutes from now. This is useful if you want to ignore the last 2 minutes of data.
- `IS BELOW 14` Defines the type of threshold and the threshold value. You can click on `IS BELOW` to change the type of threshold.
The query used in an alert rule cannot contain any template variables. Currently we only support `AND` and `OR` operators between conditions and they are executed serially.
For example, we have 3 conditions in the following order:
`condition:A(evaluates to: TRUE) OR condition:B(evaluates to: FALSE) AND condition:C(evaluates to: TRUE)`
*condition:A(evaluates to: TRUE) OR condition:B(evaluates to: FALSE) AND condition:C(evaluates to: TRUE)*
so the result will be calculated as ((TRUE OR FALSE) AND TRUE) = TRUE.
We plan to add other condition types in the future, like `Other Alert`, where you can include the state
@@ -66,7 +74,7 @@ of another alert in your conditions, and `Time Of Day`.
#### Multiple Series
If a query returns multiple series then the aggregation function and threshold check will be evaluated for each series.
What Grafana does not do currently is track alert rule state **per series**. This has implications that is exemplified
What Grafana does not do currently is track alert rule state **per series**. This has implications that are detailed
in the scenario below.
- Alert condition with query that returns 2 series: **server1** and **server2**
@@ -81,8 +89,7 @@ we plan to track state **per series** in a future release.
### No Data / Null values
Below you condition you can configure how the rule evaluation engine should handle queries that return no data or only null valued
data.
Below your conditions you can configure how the rule evaluation engine should handle queries that return no data or only null values.
No Data Option | Description
------------ | -------------
@@ -92,23 +99,23 @@ Keep Last State | Keep the current alert rule state, what ever it is.
### Execution errors or timeouts
The last option is how to handle execution or timeout errors.
The last option tells how to handle execution or timeout errors.
Error or timeout option | Description
------------ | -------------
Alerting | Set alert rule state to `Alerting`
Keep Last State | Keep the current alert rule state, what ever it is.
If you an unreliable time series store that where queries sometime timeout or fail randomly you can set this option
t `Keep Last State` to basically ignore them.
If you have an unreliable time series store from which queries sometime timeout or fail randomly you can set this option
to `Keep Last State` in order to basically ignore them.
## Notifications
In alert tab you can also specify alert rule notifications along with a detailed messsage about the alert rule.
The message can contain anything, information about how you might solve the issue, link to runbook etc.
The message can contain anything, information about how you might solve the issue, link to runbook, etc.
The actual notifications are configured and shared between multiple alerts. Read the
[Notifications]({{< relref "notifications.md" >}}) guide for how to configure and setup notifications.
[notifications]({{< relref "notifications.md" >}}) guide for how to configure and setup notifications.
## Alert State History & Annotations
@@ -121,7 +128,7 @@ submenu in the alert tab to view & clear state history.
{{< imgbox max-width="40%" img="/img/docs/v4/alert_test_rule.png" caption="Test Rule" >}}
First level of troubleshooting you can do is hit the **Test Rule** button. You will get result back that you can expand
to the point where you can see the raw data that was returned form your query.
to the point where you can see the raw data that was returned from your query.
Further troubleshooting can also be done by inspecting the grafana-server log. If it's not an error or for some reason
the log does not say anything you can enable debug logging for some relevant components. This is done
+8 -7
View File
@@ -12,10 +12,11 @@ weight = 200
Here you can find links to older versions of the documentation that might be better suited for your version
of Grafana.
- [Latest](/)
- [Version 3.1](/v3.1)
- [Version 3.0](/v3.0)
- [Version 2.6](/v2.6)
- [Version 2.5](/v2.5)
- [Version 2.1](/v2.1)
- [Version 2.0](/v2.0)
- [Latest](http://docs.grafana.org)
- [Version 4.4](http://docs.grafana.org/v4.4)
- [Version 4.3](http://docs.grafana.org/v4.3)
- [Version 4.2](http://docs.grafana.org/v4.2)
- [Version 4.1](http://docs.grafana.org/v4.1)
- [Version 4.0](http://docs.grafana.org/v4.0)
- [Version 3.1](http://docs.grafana.org/v3.1)
- [Version 3.0](http://docs.grafana.org/v3.0)
+1 -1
View File
@@ -2,7 +2,7 @@
title = "Contributor Licence Agreement (CLA)"
description = "Contributer Licence Agreement (CLA)"
type = "docs"
aliases = ["/project/cla"]
aliases = ["/project/cla", "docs/contributing/cla.html"]
[menu.docs]
parent = "contribute"
weight = 1
+101 -42
View File
@@ -13,29 +13,26 @@ weight = 10
# Using AWS CloudWatch in Grafana
Grafana ships with built in support for CloudWatch. You just have to add it as a data source and you will
be ready to build dashboards for you CloudWatch metrics.
Grafana ships with built in support for CloudWatch. You just have to add it as a data source and you will be ready to build dashboards for you CloudWatch metrics.
## Adding the data source
![](/img/docs/cloudwatch/cloudwatch_add.png)
## Adding the data source to Grafana
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select `Cloudwatch` from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `CloudWatch` from the dropdown.
> NOTE: If at any moment you have issues with getting this datasource to work and grafana is giving you undescriptive errors then dont forget to check your log file (try looking in /var/log/grafana/).
> NOTE: If at any moment you have issues with getting this datasource to work and Grafana is giving you undescriptive errors then don't
forget to check your log file (try looking in /var/log/grafana/grafana.log).
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Credentials profile name | Specify the name of the profile to use (if you use `~/aws/credentials` file), leave blank for default. This option was introduced in Grafana 2.5.1
Default Region | Used in query editor to set region (can be changed on per query basis)
Custom Metrics namespace | Specify the CloudWatch namespace of Custom metrics
Assume Role Arn | Specify the ARN of the role to assume
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Credentials* profile name | Specify the name of the profile to use (if you use `~/aws/credentials` file), leave blank for default.
*Default Region* | Used in query editor to set region (can be changed on per query basis)
*Custom Metrics namespace* | Specify the CloudWatch namespace of Custom metrics
*Assume Role Arn* | Specify the ARN of the role to assume
## Authentication
@@ -53,56 +50,118 @@ Create a file at `~/.aws/credentials`. That is the `HOME` path for user running
Example content:
[default]
aws_access_key_id = asdsadasdasdasd
aws_secret_access_key = dasdasdsadasdasdasdsa
region = us-west-2
```bash
[default]
aws_access_key_id = asdsadasdasdasd
aws_secret_access_key = dasdasdsadasdasdasdsa
region = us-west-2
```
## Metric Query Editor
![](/img/docs/cloudwatch/query_editor.png)
![](/img/docs/v43/cloudwatch_editor.png)
You need to specify a namespace, metric, at least one stat, and at least one dimension.
## Templated queries
CloudWatch Datasource Plugin provides the following functions in `Variables values query` field in Templating Editor to query `region`, `namespaces`, `metric names` and `dimension keys/values` on the CloudWatch.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query variable
CloudWatch Datasource Plugin provides the following queries you can specify in the `Query` field in the Variable
edit view. They allow you to fill a variable's options list with things like `region`, `namespaces`, `metric names`
and `dimension keys/values`.
Name | Description
------- | --------
`regions()` | Returns a list of regions AWS provides their service.
`namespaces()` | Returns a list of namespaces CloudWatch support.
`metrics(namespace, [region])` | Returns a list of metrics in the namespace. (specify region for custom metrics)
`dimension_keys(namespace)` | Returns a list of dimension keys in the namespace.
`dimension_values(region, namespace, metric, dimension_key)` | Returns a list of dimension values matching the specified `region`, `namespace`, `metric` and `dimension_key`.
`ebs_volume_ids(region, instance_id)` | Returns a list of volume id matching the specified `region`, `instance_id`.
`ec2_instance_attribute(region, attribute_name, filters)` | Returns a list of attribute matching the specified `region`, `attribute_name`, `filters`.
*regions()* | Returns a list of regions AWS provides their service.
*namespaces()* | Returns a list of namespaces CloudWatch support.
*metrics(namespace, [region])* | Returns a list of metrics in the namespace. (specify region for custom metrics)
*dimension_keys(namespace)* | Returns a list of dimension keys in the namespace.
*dimension_values(region, namespace, metric, dimension_key)* | Returns a list of dimension values matching the specified `region`, `namespace`, `metric` and `dimension_key`.
*ebs_volume_ids(region, instance_id)* | Returns a list of volume ids matching the specified `region`, `instance_id`.
*ec2_instance_attribute(region, attribute_name, filters)* | Returns a list of attributes matching the specified `region`, `attribute_name`, `filters`.
For details about the metrics CloudWatch provides, please refer to the [CloudWatch documentation](https://docs.aws.amazon.com/AmazonCloudWatch/latest/DeveloperGuide/CW_Support_For_AWS.html).
## Example templated Queries
#### Examples templated Queries
Example dimension queries which will return list of resources for individual AWS Services:
Service | Query
Query | Service
------- | -----
ELB | `dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)`
ElastiCache | `dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)`
RedShift | `dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)`
RDS | `dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)`
S3 | `dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)`
*dimension_values(us-east-1,AWS/ELB,RequestCount,LoadBalancerName)* | ELB
*dimension_values(us-east-1,AWS/ElastiCache,CPUUtilization,CacheClusterId)* | ElastiCache
*dimension_values(us-east-1,AWS/Redshift,CPUUtilization,ClusterIdentifier)* | RedShift
*dimension_values(us-east-1,AWS/RDS,CPUUtilization,DBInstanceIdentifier)* | RDS
*dimension_values(us-east-1,AWS/S3,BucketSizeBytes,BucketName)* | S3
## ec2_instance_attribute JSON filters
## ec2_instance_attribute examples
The `ec2_instance_attribute` query take `filters` in JSON format.
### JSON filters
The `ec2_instance_attribute` query takes `filters` in JSON format.
You can specify [pre-defined filters of ec2:DescribeInstances](http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html).
Specify like `{ filter_name1: [ filter_value1 ], filter_name2: [ filter_value2 ] }`
Note that the actual filtering takes place on Amazon's servers, not in Grafana.
Filters syntax:
```javascript
{ filter_name1: [ filter_value1 ], filter_name2: [ filter_value2 ] }
```
Example `ec2_instance_attribute()` query
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": [ "production" ] })
```javascript
ec2_instance_attribute(us-east-1, InstanceId, { "tag:Environment": [ "production" ] })
```
![](/img/docs/v2/cloudwatch_templating.png)
### Selecting Attributes
Only 1 attribute per instance can be returned. Any flat attribute can be selected (i.e. if the attribute has a single value and isn't an object or array). Below is a list of available flat attributes:
* `AmiLaunchIndex`
* `Architecture`
* `ClientToken`
* `EbsOptimized`
* `EnaSupport`
* `Hypervisor`
* `IamInstanceProfile`
* `ImageId`
* `InstanceId`
* `InstanceLifecycle`
* `InstanceType`
* `KernelId`
* `KeyName`
* `LaunchTime`
* `Platform`
* `PrivateDnsName`
* `PrivateIpAddress`
* `PublicDnsName`
* `PublicIpAddress`
* `RamdiskId`
* `RootDeviceName`
* `RootDeviceType`
* `SourceDestCheck`
* `SpotInstanceRequestId`
* `SriovNetSupport`
* `SubnetId`
* `VirtualizationType`
* `VpcId`
Tags can be selected by prepending the tag name with `Tags.`
Example `ec2_instance_attribute()` query
```javascript
ec2_instance_attribute(us-east-1, Tags.Name, { "tag:Team": [ "sysops" ] })
```
## Cost
@@ -12,84 +12,128 @@ weight = 3
# Using Elasticsearch in Grafana
Grafana ships with advanced support for Elasticsearch. You can do many types of
simple or complex elasticsearch queries to visualize logs or metrics stored in elasticsearch. You can
also annotate your graphs with log events stored in elasticsearch.
Grafana ships with advanced support for Elasticsearch. You can do many types of simple or complex Elasticsearch queries to
visualize logs or metrics stored in Elasticsearch. You can also annotate your graphs with log events stored in Elasticsearch.
## Adding the data source
![](/img/docs/v2/add_Graphite.jpg)
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *Elasticsearch* from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `Elasticsearch` from the dropdown.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of you elasticsearch server.
Access | Proxy = access via Grafana backend, Direct = access directly from browser.
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The HTTP protocol, IP, and port of your Elasticsearch server.
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the browser.
Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication to the browser.
### Direct access
If you select direct access you must update your Elasticsearch configuration to allow other domains to access
Elasticsearch from the browser. You do this by specifying these to options in your **elasticsearch.yml** config file.
http.cors.enabled: true
http.cors.allow-origin: "*"
```bash
http.cors.enabled: true
http.cors.allow-origin: "*"
```
### Index settings
![](/img/docs/elasticsearch/elasticsearch_ds_details.png)
Here you can specify a default for the `time field` and specify the name of your elasticsearch index. You can use
Here you can specify a default for the `time field` and specify the name of your Elasticsearch index. You can use
a time pattern for the index name or a wildcard.
### Elasticsearch version
Be sure to specify your Elasticsearch version in the version selection dropdown. This is very important as there are differences how queries are composed. Currently only 2.x and 5.x
are supported.
## Metric Query editor
![](/img/docs/elasticsearch/query_editor.png)
The Elasticsearch query editor allows you to select multiple metrics and group by multiple terms or filters. Use the plus and minus icons to the right to add / remove
metrics or group bys. Some metrics and group by have options, click the option text to expand the the row to view and edit metric or group by options.
The Elasticsearch query editor allows you to select multiple metrics and group by multiple terms or filters. Use the plus and minus icons to the right to add/remove
metrics or group by clauses. Some metrics and group by clauses haves options, click the option text to expand the row to view and edit metric or group by options.
## Series naming & alias patterns
You can control the name for time series via the `Alias` input field.
Pattern | Description
------------ | -------------
*{{term fieldname}}* | replaced with value of a term group by
*{{metric}}* | replaced with metric name (ex. Average, Min, Max)
*{{field}}* | replaced with the metric field name
## Pipeline metrics
If you have Elasticsearch 2.x and Grafana 2.6 or above then you can use pipeline metric aggregations like
**Moving Average** and **Derivative**. Elasticsearch pipeline metrics require another metric to be based on. Use the eye icon next to the metric
to hide metrics from appearing in the graph. This is useful for metrics you only have in the query to be used
in a pipeline metric.
Some metric aggregations are called Pipeline aggregations, for example, *Moving Average* and *Derivative*. Elasticsearch pipeline metrics require another metric to be based on. Use the eye icon next to the metric to hide metrics from appearing in the graph. This is useful for metrics you only have in the query for use in a pipeline metric.
![](/img/docs/elasticsearch/pipeline_metrics_editor.png)
## Templating
The Elasticsearch datasource supports two types of queries you can use to fill template variables with values.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
### Possible values for a field
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
```json
{"find": "terms", "field": "@hostname"}
### Query variable
The Elasticsearch data source supports two types of queries you can use in the *Query* field of *Query* variables. The query is written using a custom JSON string.
Query | Description
------------ | -------------
*{"find": "fields", "type": "keyword"} | Returns a list of field names with the index type `keyword`.
*{"find": "terms", "field": "@hostname", "size": 1000}* | Returns a list of values for a field using term aggregation. Query will user current dashboard time range as time range for query.
*{"find": "terms", "field": "@hostname", "query": '<lucene query>'}* | Returns a list of values for a field using term aggregation & and a specified lucene query filter. Query will use current dashboard time range as time range for query.
There is a default size limit of 500 on terms queries. Set the size property in your query to set a custom limit.
You can use other variables inside the query. Example query definition for a variable named `$host`.
```
{"find": "terms", "field": "@hostname", "query": "@source:$source"}
```
### Fields filtered by type
```json
{"find": "fields", "type": "string"}
```
In the above example, we use another variable named `$source` inside the query definition. Whenever you change, via the dropdown, the current value of the ` $source` variable, it will trigger an update of the `$host` variable so it now only contains hostnames filtered by in this case the
`@source` document property.
### Fields filtered by type, with filter
```json
{"find": "fields", "type": "string", "query": <lucene query>}
```
### Using variables in queries
### Multi format / All format
Use lucene format.
There are two syntaxes:
- `$<varname>` Example: @hostname:$hostname
- `[[varname]]` Example: @hostname:[[hostname]]
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value*
options are enabled, Grafana converts the labels from plain text to a lucene compatible condition.
![](/img/docs/v43/elastic_templating_query.png)
In the above example, we have a lucene query that filters documents based on the `@hostname` property using a variable named `$hostname`. It is also using
a variable in the *Terms* group by field input box. This allows you to use a variable to quickly change how the data is grouped.
Example dashboard:
[Elasticsearch Templated Dashboard](http://play.grafana.org/dashboard/db/elasticsearch-templated)
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view. Grafana can query any Elasticsearch index
for annotation events.
Name | Description
------------ | -------------
Query | You can leave the search query blank or specify a lucene query
Time | The name of the time field, needs to be date field.
Text | Event description field.
Tags | Optional field name to use for event tags (can be an array or a CSV string).
+59 -25
View File
@@ -18,28 +18,22 @@ change function parameters and much more. The editor can handle all types of gra
queries through the use of query references.
## Adding the data source
![](/img/docs/v2/add_Graphite.jpg)
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select `Graphite` from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `Graphite` from the dropdown.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of your graphite-web or graphite-api install.
Access | Proxy = access via Grafana backend, Direct = access directly from browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the browser.
Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The HTTP protocol, IP, and port of your graphite-web or graphite-api install.
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the browser.
## Metric editor
@@ -47,42 +41,82 @@ Direct access is still supported because in some cases it may be useful to acces
Click the ``Select metric`` link to start navigating the metric space. One you start you can continue using the mouse
or keyboard arrow keys. You can select a wildcard and still continue.
![](/img/docs/animated_gifs/graphite_query1.gif)
{{< docs-imagebox img="/img/docs/v45/graphite_query1_still.png"
animated-gif="/img/docs/v45/graphite_query1.gif" >}}
### Functions
Click the plus icon to the right to add a function. You can search for the function or select it from the menu. Once
a function is selected it will be added and your focus will be in the text box of the first parameter. To later change
a parameter just click on it and it will turn into a text box. To delete a function click the function name followed
by the x icon.
![](/img/docs/animated_gifs/graphite_query2.gif)
{{< docs-imagebox img="/img/docs/v45/graphite_query2_still.png"
animated-gif="/img/docs/v45/graphite_query2.gif" >}}
### Optional parameters
Some functions like aliasByNode support an optional second argument. To add this parameter specify for example 3,-2 as the first parameter and the function editor will adapt and move the -2 to a second parameter. To remove the second optional parameter just click on it and leave it blank and the editor will remove it.
![](/img/docs/animated_gifs/func_editor_optional_params.gif)
{{< docs-imagebox img="/img/docs/v45/graphite_query3_still.png"
animated-gif="/img/docs/v45/graphite_query3.gif" >}}
### Nested Queries
You can reference queries by the row “letter” that theyre on (similar to Microsoft Excel). If you add a second query to a graph, you can reference the first query simply by typing in #A. This provides an easy and convenient way to build compounded queries.
{{< docs-imagebox img="/img/docs/v45/graphite_nested_queries_still.png"
animated-gif="/img/docs/v45/graphite_nested_queries.gif" >}}
## Point consolidation
All Graphite metrics are consolidated so that Graphite doesn't return more data points than there are pixels in the graph. By default
All Graphite metrics are consolidated so that Graphite doesn't return more data points than there are pixels in the graph. By default,
this consolidation is done using `avg` function. You can how Graphite consolidates metrics by adding the Graphite consolidateBy function.
> *Notice* This means that legend summary values (max, min, total) cannot be all correct at the same time. They are calculated
> client side by Grafana. And depending on your consolidation function only one or two can be correct at the same time.
## Templating
You can create a template variable in Grafana and have that variable filled with values from any Graphite metric exploration query.
You can then use this variable in your Graphite queries, either as part of a metric path or as arguments to functions.
For example a query like `prod.servers.*` will fill the variable with all possible
values that exists in the wildcard position.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query variable
The query you specify in the query field should be a metric find type of query. For example, a query like `prod.servers.*` will fill the
variable with all possible values that exist in the wildcard position.
You can also create nested variables that use other variables in their definition. For example
`apps.$app.servers.*` uses the variable `$app` in its query definition.
### Variable usage
You can use a variable in a metric node path or as a parameter to a function.
![](/img/docs/v2/templated_variable_parameter.png)
There are two syntaxes:
## Query Reference
You can reference queries by the row “letter” that theyre on (similar to Microsoft Excel). If you add a second query to graph, you can reference the first query simply by typing in #A. This provides an easy and convenient way to build compounded queries.
- `$<varname>` Example: apps.frontend.$server.requests.count
- `[[varname]]` Example: apps.frontend.[[server]].requests.count
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. Use
the second syntax in expressions like `my.server[[serverNumber]].count`.
Example:
[Graphite Templated Dashboard](http://play.grafana.org/dashboard/db/graphite-templated-nested)
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view.
Graphite supports two ways to query annotations. A regular metric query, for this you use the `Graphite query` textbox. A Graphite events query, use the `Graphite event tags` textbox,
specify a tag or wildcard (leave empty should also work)
+1 -1
View File
@@ -30,5 +30,5 @@ The following datasources are officially supported:
## Data source plugins
Since grafana 3.0 you can install data sources as plugins. Checkout [Grafana.net](https://grafana.net/plugins) for more data sources.
Since grafana 3.0 you can install data sources as plugins. Checkout [Grafana.net](https://grafana.com/plugins) for more data sources.
+75 -29
View File
@@ -15,33 +15,33 @@ weight = 3
Grafana ships with very feature rich data source plugin for InfluxDB. Supporting a feature rich query editor, annotation and templating queries.
## Adding the data source
![](/img/docs/v2/add_Influx.jpg)
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *InfluxDB* from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of you influxdb api (influxdb api port is by default 8086)
Access | Proxy = access via Grafana backend, Direct = access directly from browser.
Database | Name of your influxdb database
User | Name of your database user
Password | Database user's password
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you influxdb api (influxdb api port is by default 8086)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Database* | Name of your influxdb database
*User* | Name of your database user
*Password* | Database user's password
> Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the browser.
> Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
### Proxy vs Direct access
Proxy access means that the Grafana backend will proxy all requests from the browser. So requests to InfluxDB will be channeled through
`grafana-server`. This means that the URL you specify needs to be accessible from the server you are running Grafana on. Proxy access
mode is also more secure as the username & password will never reach the browser.
## Query Editor
![](/assets/img/blog/v2.6/influxdb_editor_v3.gif)
{{< docs-imagebox img="/img/docs/v45/influxdb_query_still.png" class="docs-image--no-shadow" animated-gif="/img/docs/v45/influxdb_query.gif" >}}
You find the InfluxDB editor in the metrics tab in Graph or Singlestat panel's edit mode. You enter edit mode by clicking the
panel title, then edit. The editor allows you to select metrics and tags.
@@ -57,10 +57,8 @@ will automatically adjust the filter tag condition to use the InfluxDB regex mat
### Field & Aggregation functions
In the `SELECT` row you can specify what fields and functions you want to use. If you have a
group by time you need an aggregation function. Some functions like derivative require an aggregation function.
The editor tries simplify and unify this part of the query. For example:
![](/img/docs/influxdb/select_editor.png)
group by time you need an aggregation function. Some functions like derivative require an aggregation function. The editor tries simplify and unify this part of the query. For example:<br>
![](/img/docs/influxdb/select_editor.png)<br>
The above will generate the following InfluxDB `SELECT` clause:
@@ -88,8 +86,8 @@ You can switch to raw query mode by clicking hamburger icon and then `Switch edi
- $m = replaced with measurement name
- $measurement = replaced with measurement name
- $col = replaced with column name
- $tag_hostname = replaced with the value of the hostname tag
- You can also use [[tag_hostname]] pattern replacement syntax
- $tag_exampletag = replaced with the value of the `exampletag` tag. The syntax is `$tag_yourTagName` (must start with `$tag_`). To use your tag as an alias in the ALIAS BY field then the tag must be used to group by in the query.
- You can also use [[tag_hostname]] pattern replacement syntax. For example, in the ALIAS BY field using this text `Host: [[tag_hostname]]` would substitute in the `hostname` tag value for each legend value and an example legend value would be: `Host: server1`.
### Table query / raw data
@@ -100,11 +98,21 @@ change the option `Format As` to `Table` if you want to show raw data in the `Ta
## Templating
You can create a template variable in Grafana and have that variable filled with values from any InfluxDB metric exploration query.
You can then use this variable in your InfluxDB metric queries.
For example you can have a variable that contains all values for tag `hostname` if you specify a query like this
in the templating edit view.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query variable
If you add a template variable of the type `Query` you can write a InfluxDB exploration (meta data) query. These queries can
return things like measurement names, key names or key values.
For example you can have a variable that contains all values for tag `hostname` if you specify a query like this in the templating variable *Query* setting.
```sql
SHOW TAG VALUES WITH KEY = "hostname"
```
@@ -116,12 +124,46 @@ the hosts variable only show hosts from the current selected region with a query
SHOW TAG VALUES WITH KEY = "hostname" WHERE region =~ /$region/
```
> Always use `regex values` or `regex wildcard` for All format or multi select format.
You can fetch key names for a given measurement.
![](/img/docs/influxdb/templating_simple_ex1.png)
```sql
SHOW TAG KEYS [FROM <measurement_name>]
```
If you have a variable with key names you can use this variable in a group by clause. This will allow you to change group by using the variable dropdown at the top
of the dashboard.
### Using variables in queries
There are two syntaxes:
`$<varname>` Example:
```sql
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^$host$/ AND $timeFilter GROUP BY time($__interval), "hostname"
```
`[[varname]]` Example:
```sql
SELECT mean("value") FROM "logins" WHERE "hostname" =~ /^[[host]]$/ AND $timeFilter GROUP BY time($__interval), "hostname"
```
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value*
options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
Example Dashboard:
[InfluxDB Templated Dashboard](http://play.grafana.org/dashboard/db/influxdb-templated-queries)
### Ad hoc filters variable
InfluxDB supports the special `Ad hoc filters` variable type. This variable allows you to specify any number of key/value filters on the fly. These filters will automatically
be applied to all your InfluxDB queries.
## Annotations
Annotations allows you to overlay rich event information on top of graphs.
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view.
An example query:
@@ -129,4 +171,8 @@ An example query:
SELECT title, description from events WHERE $timeFilter order asc
```
For InfluxDB you need to enter a query like in the above example. You need to have the ```where $timeFilter```
part. If you only select one column you will not need to enter anything in the column mapping fields. The
Tags field can be a comma seperated string.
+176
View File
@@ -0,0 +1,176 @@
+++
title = "Using MySQL in Grafana"
description = "Guide for using MySQL in Grafana"
keywords = ["grafana", "mysql", "guide"]
type = "docs"
[menu.docs]
name = "MySQL"
parent = "datasources"
weight = 7
+++
# Using MySQL in Grafana
> Only available in Grafana v4.3+.
Grafana ships with a built-in MySQL data source plugin that allow you to query any visualize
data from a MySQL compatible database.
## Adding the data source
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *MySQL* from the *Type* dropdown.
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
the specified database & tables you want to query. Grafana does not validate that the query is safe. The query
could include any SQL statement. For example, statements like `USE otherdb;` and `DROP TABLE user;` would be
executed. To protect against this we **Highly** recommmend you create a specific mysql user with restricted permissions.
Example:
```sql
CREATE USER 'grafanaReader' IDENTIFIED BY 'password';
GRANT SELECT ON mydatabase.mytable TO 'grafanaReader';
```
You can use wildcards (`*`) in place of database or table if you want to grant access to more databases and tables.
## Macros
To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.
Macro example | Description
------------ | -------------
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn > FROM_UNIXTIME(1494410783) AND dateColumn < FROM_UNIXTIME(1494497183)*
We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo.
The query editor has a link named `Generated SQL` that show up after a query as been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
## Table queries
If the `Format as` query option is set to `Table` then you can basically do any type of SQL query. The table panel will automatically show the results of whatever columns & rows your query returns.
Query editor with example query:
{{< docs-imagebox img="/img/docs/v45/mysql_table_query.png" >}}
The query:
```sql
SELECT
title as 'Title',
user.login as 'Created By' ,
dashboard.created as 'Created On'
FROM dashboard
INNER JOIN user on user.id = dashboard.created_by
WHERE $__timeFilter(dashboard.created)
```
You can control the name of the Table panel columns by using regular `as ` SQL column selection syntax.
The resulting table panel:
![](/img/docs/v43/mysql_table.png)
### Time series queries
If you set `Format as` to `Time series`, for use in Graph panel for example, then there are some requirements for
what your query returns.
- Must be a column named `time_sec` representing a unix epoch in seconds.
- Must be a column named `value` representing the time series value.
- Must be a column named `metric` representing the time series name.
Example:
```sql
SELECT
min(UNIX_TIMESTAMP(time_date_time)) as time_sec,
max(value_double) as value,
metric1 as metric
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY metric1, UNIX_TIMESTAMP(time_date_time) DIV 300
ORDER BY time_sec asc
```
Currently, there is no support for a dynamic group by time based on time range & panel width.
This is something we plan to add.
## Templating
This feature is currently available in the nightly builds and will be included in the 5.0.0 release.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
### Query Variable
If you add a template variable of the type `Query`, you can write a MySQL query that can
return things like measurement names, key names or key values that are shown as a dropdown select box.
For example, you can have a variable that contains all values for the `hostname` column in a table if you specify a query like this in the templating variable *Query* setting.
```sql
SELECT hostname FROM my_host
```
A query can returns multiple columns and Grafana will automatically create a list from them. For example, the query below will return a list with values from `hostname` and `hostname2`.
```sql
SELECT my_host.hostname, my_other_host.hostname2 FROM my_host JOIN my_other_host ON my_host.city = my_other_host.city
```
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
```sql
SELECT hostname AS __text, id AS __value FROM my_host
```
You can also create nested variables. For example if you had another variable named `region`. Then you could have
the hosts variable only show hosts from the current selected region with a query like this (if `region` is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values):
```sql
SELECT hostname FROM my_host WHERE region IN($region)
```
### Using Variables in Queries
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
There are two syntaxes:
`$<varname>` Example with a template variable named `hostname`:
```sql
SELECT
UNIX_TIMESTAMP(atimestamp) as time_sec,
aint as value,
avarchar as metric
FROM my_table
WHERE $__timeFilter(atimestamp) and hostname in($hostname)
ORDER BY atimestamp ASC
```
`[[varname]]` Example with a template variable named `hostname`:
```sql
SELECT
UNIX_TIMESTAMP(atimestamp) as time_sec,
aint as value,
avarchar as metric
FROM my_table
WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp ASC
```
## Alerting
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
conditions.
+52 -32
View File
@@ -3,7 +3,7 @@ title = "Using OpenTSDB in Grafana"
description = "Guide for using OpenTSDB in Grafana"
keywords = ["grafana", "opentsdb", "guide"]
type = "docs"
aliases = ["/datasources/opentsdb"]
aliases = ["/datasources/opentsdb", "docs/features/opentsdb"]
[menu.docs]
name = "OpenTSDB"
parent = "datasources"
@@ -12,59 +12,79 @@ weight = 5
# Using OpenTSDB in Grafana
{{< docs-imagebox img="/img/docs/v2/add_OpenTSDB.png" max-width="14rem" >}}
Grafana ships with advanced support for OpenTSDB.
The newest release of Grafana adds additional functionality when using an OpenTSDB Data source.
## Adding the data source
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *OpenTSDB* from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `OpenTSDB` from the dropdown.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of you opentsdb server (default port is usually 4242)
Access | Proxy = access via Grafana backend, Direct = access directly from browser.
Version | Version = opentsdb version, either <=2.1 or 2.2
Resolution | Metrics from opentsdb may have datapoints with either second or millisecond resolution.
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you opentsdb server (default port is usually 4242)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Version* | Version = opentsdb version, either <=2.1 or 2.2
*Resolution* | Metrics from opentsdb may have datapoints with either second or millisecond resolution.
## Query editor
Open a graph in edit mode by click the title. Query editor will differ if the datasource has version <=2.1 or = 2.2. In the former version, only tags can be used to query opentsdb. But in the latter version, filters as well as tags can be used to query opentsdb. Fill Policy is also introduced in opentsdb 2.2.
> Note: While using Opentsdb 2.2 datasource, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
Open a graph in edit mode by click the title. Query editor will differ if the datasource has version <=2.1 or = 2.2.
In the former version, only tags can be used to query OpenTSDB. But in the latter version, filters as well as tags
can be used to query opentsdb. Fill Policy is also introduced in OpenTSDB 2.2.
![](/img/docs/v2/opentsdb_query_editor.png)
![](/img/docs/v43/opentsdb_query_editor.png)
> Note: While using OpenTSDB 2.2 datasource, make sure you use either Filters or Tags as they are mutually exclusive. If used together, might give you weird results.
### Auto complete suggestions
As soon as you start typing metric names, tag names and tag values , you should see highlighted auto complete suggestions for them.
> Note: This is required for the OpenTSDB `suggest` api to work.
As soon as you start typing metric names, tag names and tag values , you should see highlighted auto complete suggestions for them.
The autocomplete only works if the OpenTSDB suggest api is enabled.
## Templating queries
Grafana's OpenTSDB data source now supports template variable values queries. This means you can create template variables that fetch the values from OpenTSDB (for example metric names, tag names, or tag values). The query editor is also enhanced to limiting tags by metric.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
### Query variable
Grafana's OpenTSDB data source supports template variable queries. This means you can create template variables
that fetch the values from OpenTSDB. For example, metric names, tag names, or tag values.
When using OpenTSDB with a template variable of `query` type you can use following syntax for lookup.
metrics(prefix) // returns metric names with specific prefix (can be empty)
tag_names(cpu) // return tag names (i.e. keys) for a specific cpu metric
tag_values(cpu, hostname) // return tag values for metric cpu and tag key hostname
suggest_tagk(prefix) // return tag names (i.e. keys) for all metrics with specific prefix (can be empty)
suggest_tagv(prefix) // return tag values for all metrics with specific prefix (can be empty)
Query | Description
------------ | -------------
*metrics(prefix)* | Returns metric names with specific prefix (can be empty)
*tag_names(cpu)* | Return tag names (i.e. keys) for a specific cpu metric
*tag_values(cpu, hostname)* | Return tag values for metric cpu and tag key hostname
*suggest_tagk(prefix)* | Return tag names (i.e. keys) for all metrics with specific prefix (can be empty)
*suggest_tagv(prefix)* | Return tag values for all metrics with specific prefix (can be empty)
If you do not see template variables being populated in `Preview of values` section, you need to enable `tsd.core.meta.enable_realtime_ts` in the OpenTSDB server settings. Also, to populate metadata of the existing time series data in OpenTSDB, you need to run `tsdb uid metasync` on the OpenTSDB server.
If you do not see template variables being populated in `Preview of values` section, you need to enable
`tsd.core.meta.enable_realtime_ts` in the OpenTSDB server settings. Also, to populate metadata of
the existing time series data in OpenTSDB, you need to run `tsdb uid metasync` on the OpenTSDB server.
### Nested Templating
One template variable can be used to filter tag values for another template varible. Very importantly, the order of the parameters matter in tag_values function. First parameter is the metric name, second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables. Some examples are mentioned below to make nested template queries work successfully.
One template variable can be used to filter tag values for another template varible. First parameter is the metric name,
second parameter is the tag key for which you need to find tag values, and after that all other dependent template variables.
Some examples are mentioned below to make nested template queries work successfully.
tag_values(cpu, hostname, env=$env) // return tag values for cpu metric, selected env tag value and tag key hostname
tag_values(cpu, hostanme, env=$env, region=$region) // return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
Query | Description
------------ | -------------
*tag_values(cpu, hostname, env=$env)* | Return tag values for cpu metric, selected env tag value and tag key hostname
*tag_values(cpu, hostanme, env=$env, region=$region)* | Return tag values for cpu metric, selected env tag value, selected region tag value and tag key hostname
> Note: This is required for the OpenTSDB `lookup` api to work.
For details on opentsdb metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
For details on OpenTSDB metric queries checkout the official [OpenTSDB documentation](http://opentsdb.net/docs/build/html/index.html)
@@ -0,0 +1,186 @@
+++
title = "Using PostgreSQL in Grafana"
description = "Guide for using PostgreSQL in Grafana"
keywords = ["grafana", "postgresql", "guide"]
type = "docs"
[menu.docs]
name = "PostgreSQL"
parent = "datasources"
weight = 7
+++
# Using PostgreSQL in Grafana
Grafana ships with a built-in PostgreSQL data source plugin that allows you to query and visualize data from a PostgreSQL compatible database.
## Adding the data source
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select *PostgreSQL* from the *Type* dropdown.
### Database User Permissions (Important!)
The database user you specify when you add the data source should only be granted SELECT permissions on
the specified database & tables you want to query. Grafana does not validate that the query is safe. The query
could include any SQL statement. For example, statements like `DELETE FROM user;` and `DROP TABLE user;` would be
executed. To protect against this we **Highly** recommmend you create a specific postgresql user with restricted permissions.
Example:
```sql
CREATE USER grafanareader WITH PASSWORD 'password';
GRANT USAGE ON SCHEMA schema TO grafanareader;
GRANT SELECT ON schema.table TO grafanareader;
```
Make sure the user does not get any unwanted privileges from the public role.
## Macros
To simplify syntax and to allow for dynamic parts, like date range filters, the query can contain macros.
Macro example | Description
------------ | -------------
*$__time(dateColumn)* | Will be replaced by an expression to rename the column to `time`. For example, *dateColumn as time*
*$__timeSec(dateColumn)* | Will be replaced by an expression to rename the column to `time` and converting the value to unix timestamp. For example, *extract(epoch from dateColumn) as time*
*$__timeFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name. For example, *dateColumn > to_timestamp(1494410783) AND dateColumn < to_timestamp(1494497183)*
*$__timeFrom()* | Will be replaced by the start of the currently active time selection. For example, *to_timestamp(1494410783)*
*$__timeTo()* | Will be replaced by the end of the currently active time selection. For example, *to_timestamp(1494497183)*
*$__timeGroup(dateColumn,'5m')* | Will be replaced by an expression usable in GROUP BY clause. For example, *(extract(epoch from "dateColumn")/extract(epoch from '5m'::interval))::int*
*$__unixEpochFilter(dateColumn)* | Will be replaced by a time range filter using the specified column name with times represented as unix timestamp. For example, *dateColumn > 1494410783 AND dateColumn < 1494497183*
*$__unixEpochFrom()* | Will be replaced by the start of the currently active time selection as unix timestamp. For example, *1494410783*
*$__unixEpochTo()* | Will be replaced by the end of the currently active time selection as unix timestamp. For example, *1494497183*
We plan to add many more macros. If you have suggestions for what macros you would like to see, please [open an issue](https://github.com/grafana/grafana) in our GitHub repo.
The query editor has a link named `Generated SQL` that shows up after a query as been executed, while in panel edit mode. Click on it and it will expand and show the raw interpolated SQL string that was executed.
## Table queries
If the `Format as` query option is set to `Table` then you can basically do any type of SQL query. The table panel will automatically show the results of whatever columns & rows your query returns.
Query editor with example query:
![](/img/docs/v46/postgres_table_query.png)
The query:
```sql
SELECT
title as "Title",
"user".login as "Created By",
dashboard.created as "Created On"
FROM dashboard
INNER JOIN "user" on "user".id = dashboard.created_by
WHERE $__timeFilter(dashboard.created)
```
You can control the name of the Table panel columns by using regular `as ` SQL column selection syntax.
The resulting table panel:
![](/img/docs/v46/postgres_table.png)
### Time series queries
If you set `Format as` to `Time series`, for use in Graph panel for example, then the query must return a column named `time` that returns either a sql datetime or any numeric datatype representing unix epoch in seconds.
Any column except `time` and `metric` is treated as a value column.
You may return a column named `metric` that is used as metric name for the value column.
Example with `metric` column
```sql
SELECT
min(time_date_time) as time,
min(value_double),
'min' as metric
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY metric1, (extract(epoch from time_date_time)/extract(epoch from $__interval::interval))::int
ORDER BY time asc
```
Example with multiple columns:
```sql
SELECT
min(time_date_time) as time,
min(value_double) as min_value,
max(value_double) as max_value
FROM test_data
WHERE $__timeFilter(time_date_time)
GROUP BY metric1, (extract(epoch from time_date_time)/extract(epoch from $__interval::interval))::int
ORDER BY time asc
```
## Templating
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place. Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data being displayed in your dashboard.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different types of template variables.
### Query Variable
If you add a template variable of the type `Query`, you can write a PostgreSQL query that can
return things like measurement names, key names or key values that are shown as a dropdown select box.
For example, you can have a variable that contains all values for the `hostname` column in a table if you specify a query like this in the templating variable *Query* setting.
```sql
SELECT hostname FROM host
```
A query can return multiple columns and Grafana will automatically create a list from them. For example, the query below will return a list with values from `hostname` and `hostname2`.
```sql
SELECT host.hostname, other_host.hostname2 FROM host JOIN other_host ON host.city = other_host.city
```
Another option is a query that can create a key/value variable. The query should return two columns that are named `__text` and `__value`. The `__text` column value should be unique (if it is not unique then the first value is used). The options in the dropdown will have a text and value that allows you to have a friendly name as text and an id as the value. An example query with `hostname` as the text and `id` as the value:
```sql
SELECT hostname AS __text, id AS __value FROM host
```
You can also create nested variables. For example if you had another variable named `region`. Then you could have
the hosts variable only show hosts from the current selected region with a query like this (if `region` is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values):
```sql
SELECT hostname FROM host WHERE region IN($region)
```
### Using Variables in Queries
Template variables are quoted automatically so if it is a string value do not wrap them in quotes in where clauses. If the variable is a multi-value variable then use the `IN` comparison operator rather than `=` to match against multiple values.
There are two syntaxes:
`$<varname>` Example with a template variable named `hostname`:
```sql
SELECT
atimestamp as time,
aint as value
FROM table
WHERE $__timeFilter(atimestamp) and hostname in($hostname)
ORDER BY atimestamp ASC
```
`[[varname]]` Example with a template variable named `hostname`:
```sql
SELECT
atimestamp as time,
aint as value
FROM table
WHERE $__timeFilter(atimestamp) and hostname in([[hostname]])
ORDER BY atimestamp ASC
```
## Alerting
Time series queries should work in alerting conditions. Table formatted queries is not yet supported in alert rule
conditions.
+58 -44
View File
@@ -10,74 +10,88 @@ parent = "datasources"
weight = 2
+++
# Using Prometheus in Grafana
Grafana includes support for Prometheus Datasources. While the process of adding the datasource is similar to adding a Graphite or OpenTSDB datasource type, Prometheus does have a few different options for building queries.
Grafana includes built-in support for Prometheus.
## Adding the data source to Grafana
![](/img/docs/v2/add_Prometheus.png)
1. Open the side menu by clicking the the Grafana icon in the top header.
1. Open the side menu by clicking the Grafana icon in the top header.
2. In the side menu under the `Dashboards` link you should find a link named `Data Sources`.
3. Click the `+ Add data source` button in the top header.
4. Select `Prometheus` from the *Type* dropdown.
> NOTE: If this link is missing in the side menu it means that your current user does not have the `Admin` role for the current organization.
> NOTE: If you're not seeing the `Data Sources` link in your side menu it means that your current user does not have the `Admin` role for the current organization.
3. Click the `Add new` link in the top header.
4. Select `Prometheus` from the dropdown.
## Data source options
Name | Description
------------ | -------------
Name | The data source name, important that this is the same as in Grafana v1.x if you plan to import old dashboards.
Default | Default data source means that it will be pre-selected for new panels.
Url | The http protocol, ip and port of you Prometheus server (default port is usually 9090)
Access | Proxy = access via Grafana backend, Direct = access directly from browser.
Basic Auth | Enable basic authentication to the Prometheus datasource.
User | Name of your Prometheus user
Password | Database user's password
> Proxy access means that the Grafana backend will proxy all requests from the browser, and send them on to the Data Source. This is useful because it can eliminate CORS (Cross Origin Site Resource) issues, as well as eliminate the need to disseminate authentication details to the Data Source to the browser.
> Direct access is still supported because in some cases it may be useful to access a Data Source directly depending on the use case and topology of Grafana, the user, and the Data Source.
*Name* | The data source name. This is how you refer to the data source in panels & queries.
*Default* | Default data source means that it will be pre-selected for new panels.
*Url* | The http protocol, ip and port of you Prometheus server (default port is usually 9090)
*Access* | Proxy = access via Grafana backend, Direct = access directly from browser.
*Basic Auth* | Enable basic authentication to the Prometheus data source.
*User* | Name of your Prometheus user
*Password* | Database user's password
## Query editor
Open a graph in edit mode by click the title.
![](/img/v2/prometheus_editor.png)
Open a graph in edit mode by click the title > Edit (or by pressing `e` key while hovering over panel).
For details on Prometheus metric queries check out the Prometheus documentation
- [Query Metrics - Prometheus documentation](http://prometheus.io/docs/querying/basics/).
## Templated queries
Prometheus Datasource Plugin provides the following functions in `Variables values query` field in Templating Editor to query `metric names` and `labels names` on the Prometheus server.
{{< docs-imagebox img="/img/docs/v45/prometheus_query_editor_still.png"
animated-gif="/img/docs/v45/prometheus_query_editor.gif" >}}
Name | Description
------- | --------
`label_values(label)` | Returns a list of label values for the `label` in every metric.
`label_values(metric, label)` | Returns a list of label values for the `label` in the specified metric.
`metrics(metric)` | Returns a list of metrics matching the specified `metric` regex.
`query_result(query)` | Returns a list of Prometheus query result for the `query`.
*Query expression* | Prometheus query expression, check out the [Prometheus documentation](http://prometheus.io/docs/querying/basics/).
*Legend format* | Controls the name of the time series, using name or pattern. For example `{{hostname}}` will be replaced with label value for the label `hostname`.
*Min step* | Set a lower limit for the Prometheus step option. Step controls how big the jumps are when the Prometheus query engine performs range queries. Sadly there is no official prometheus documentation to link to for this very important option.
*Resolution* | Controls the step option. Small steps create high-resolution graphs but can be slow over larger time ranges, lowering the resolution can speed things up. `1/2` will try to set step option to generate 1 data point for every other pixel. A value of `1/10` will try to set step option so there is a data point every 10 pixels.
*Metric lookup* | Search for metric names in this input field.
*Format as* | **(New in v4.3)** Switch between Table & Time series. Table format will only work in the Table panel.
For details of `metric names` & `label names`, and `label values`, please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
## Templating
> Note: The part of queries is incompatible with the version before 2.6, if you specify like `foo.*`, please change like `metrics(foo.*)`.
Instead of hard-coding things like server, application and sensor name in you metric queries you can use variables in their place.
Variables are shown as dropdown select boxes at the top of the dashboard. These dropdowns makes it easy to change the data
being displayed in your dashboard.
You can create a template variable in Grafana and have that variable filled with values from any Prometheus metric exploration query.
You can then use this variable in your Prometheus metric queries.
Checkout the [Templating]({{< relref "reference/templating.md" >}}) documentation for an introduction to the templating feature and the different
types of template variables.
For example you can have a variable that contains all values for label `hostname` if you specify a query like this in the templating edit view.
### Query variable
```sql
label_values(hostname)
```
Variable of the type *Query* allows you to query Prometheus for a list of metrics, labels or label values. The Prometheus data source plugin
provides the following functions you can use in the `Query` input field.
You can also use raw queries & regular expressions to extract anything you might need.
Name | Description
---- | --------
*label_values(label)* | Returns a list of label values for the `label` in every metric.
*label_values(metric, label)* | Returns a list of label values for the `label` in the specified metric.
*metrics(metric)* | Returns a list of metrics matching the specified `metric` regex.
*query_result(query)* | Returns a list of Prometheus query result for the `query`.
### Using templated variables in queries
For details of *metric names*, *label names* and *label values* are please refer to the [Prometheus documentation](http://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
When the `Include All` option or `Multi-Value` option is enabled, Grafana converts the labels from plain text to a regex compatible string.
Which means you have to use `=~` instead of `=` in your Prometheus queries. For example `ALERTS{instance=~$instance}` instead of `ALERTS{instance=$instance}`.
### Using variables in queries
![](/img/docs/v2/prometheus_templating.png)
There are two syntaxes:
- `$<varname>` Example: rate(http_requests_total{job=~"$job"}[5m])
- `[[varname]]` Example: rate(http_requests_total{job=~"[[job]]"}[5m])
Why two ways? The first syntax is easier to read and write but does not allow you to use a variable in the middle of a word. When the *Multi-value* or *Include all value*
options are enabled, Grafana converts the labels from plain text to a regex compatible string. Which means you have to use `=~` instead of `=`.
## Annotations
[Annotations]({{< relref "reference/annotations.md" >}}) allows you to overlay rich event information on top of graphs. You add annotation
queries via the Dashboard menu / Annotations view.
Prometheus supports two ways to query annotations.
- A regular metric query
- A Prometheus query for pending and firing alerts (for details see [Inspecting alerts during runtime](https://prometheus.io/docs/alerting/rules/#inspecting-alerts-during-runtime))
The step option is useful to limit the number of events returned from your query.
+3 -10
View File
@@ -11,26 +11,20 @@ weight = 20
# Grafana TestData
> NOTE: This plugin is disable by default.
The purpose of this data sources is to make it easier to create fake data for any panel.
Using `Grafana TestData` you can build your own time series and have any panel render it.
This make is much easier to verify functionally since the data can be shared very
This make is much easier to verify functionally since the data can be shared very easily.
## Enable
`Grafana TestData` is not enabled by default. To enable it you have to go to `/plugins/testdata/edit` and click the enable button to enable it for each server.
`Grafana TestData` is not enabled by default. To enable it you have to go to `/plugins/testdata/edit` and click the enable button to enable.
## Create mock data.
Once `Grafana TestData` is enabled you use it as a datasource in the metric panel.
Once `Grafana TestData` is enabled you can use it as a data source in any metric panel.
![](/img/docs/v41/test_data_add.png)
## Scenarios
You can now choose different scenario that you want rendered in the drop down menu. If you have scenarios that you think should be added, please add them to `` and submit a pull request.
## CSV
The comma separated values scenario is the most powerful one since it lets you create any kind of graph you like.
@@ -38,7 +32,6 @@ Once you provided the numbers `Grafana TestData` will distribute them evenly bas
![](/img/docs/v41/test_data_csv_example.png)
## Dashboards
`Grafana TestData` also contains some dashboards with example. `/plugins/testdata/edit`
+27
View File
@@ -0,0 +1,27 @@
+++
title = "Alert List"
keywords = ["grafana", "alert list", "documentation", "panel", "alertlist"]
type = "docs"
aliases = ["/reference/alertlist/"]
[menu.docs]
name = "Alert list"
parent = "panels"
weight = 4
+++
# Alert List Panel
{{< docs-imagebox img="/img/docs/v45/alert-list-panel.png" max-width="850px" >}}
The alert list panel allows you to display your dashbords alerts. The list can be configured to show current state or recent state changes. You can read more about alerts [here](http://docs.grafana.org/alerting/rules).
## Alert List Options
{{< docs-imagebox img="/img/docs/v45/alert-list-options.png" max-width="600px" class="docs-image--no-shadow docs-image--right" >}}
1. **Show**: Lets you choose between current state or recent state changes.
2. **Max Items**: Max items set the maximum of items in a list.
3. **Sort Order**: Lets you sort your list alphabeticaly(asc/desc) or by importance.
4. **Alerts From** This Dashboard`: Shows alerts only from the dashboard the alert list is in.
5. **State Filter**: Here you can filter your list by one or more parameters.
+13 -29
View File
@@ -2,6 +2,7 @@
title = "Dashboard List"
keywords = ["grafana", "dashboard list", "documentation", "panel", "dashlist"]
type = "docs"
aliases = ["/reference/dashlist/"]
[menu.docs]
name = "Dashboard list"
parent = "panels"
@@ -11,42 +12,25 @@ weight = 4
# Dashboard List Panel
The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, a search query and/or dashboard tags.
{{< docs-imagebox img="/img/docs/v45/dashboard-list-panels.png" max-width="850px">}}
<img class="no-shadow" src="/img/docs/v2/dashboard_list_panels.png">
The dashboard list panel allows you to display dynamic links to other dashboards. The list can be configured to use starred dashboards, recently viewed dashboards, a search query and/or dashboard tags.
> On each dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
## Mode: Starred Dashboards
## Dashboard List Options
The `starred` dashboard selection displays starred dashboards, up to the number specified in the `Limit Number to` field, in alphabetical order. On dashboard load, the dashlist panel will re-query the favorites to appear in dashboard list panel, always providing the most up to date results.
{{< docs-imagebox img="/img/docs/v45/dashboard-list-options.png" class="docs-image--no-shadow docs-image--right">}}
<img class="no-shadow" src="/img/docs/v2/dashboard_list_config_starred.png">
1. **Starred**: The starred dashboard selection displays starred dashboards in alphabetical order.
2. **Recently Viewed**: The recently viewed dashboard selection displays recently viewed dashboards in alphabetical order.
3. **Search**: The search dashboard selection displays dashboards by search query or tag(s).
4. **Show Headings**: When show headings is ticked the choosen list selection(Starred, Recently Viewed, Search) is shown as a heading.
5. **Max Items**: Max items set the maximum of items in a list.
6. **Query**: Here is where you enter your query you want to search by. Queries are case-insensitive, and partial values are accepted.
7. **Tags**: Here is where you enter your tag(s) you want to search by. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
## Mode: Search Dashboards
The panel may be configured to search by either string query or tag(s). On dashboard load, the dashlist panel will re-query the dashboard list, always providing the most up to date results.
To configure dashboard list in this manner, select `search` from the Mode select box. When selected, the Search Options section will appear.
Name | Description
------------ | -------------
Mode | Set search or starred mode
Query | If in search mode specify the search query
Tags | if in search mode specify dashboard tags to search for
Limit number to | Specify the maximum number of dashboards
### Search by string
To search by a string, enter a search query in the `Search Options: Query` field. Queries are case-insensitive, and partial values are accepted.
<img class="no-shadow" src="/img/docs/v2/dashboard_list_config_string.png">
### Search by tag
To search by one or more tags, enter your selection in the `Search Options: Tags:` field. Note that existing tags will not appear as you type, and *are* case sensitive. To see a list of existing tags, you can always return to the dashboard, open the Dashboard Picker at the top and click `tags` link in the search bar.
<img class="no-shadow" src="/img/docs/v2/dashboard_list_config_tags.png">
<div class="clearfix"></div>
> When multiple tags and strings appear, the dashboard list will display those matching ALL conditions.
+73 -52
View File
@@ -2,6 +2,7 @@
title = "Graph Panel"
keywords = ["grafana", "graph panel", "documentation", "guide", "graph"]
type = "docs"
aliases = ["/reference/graph/"]
[menu.docs]
name = "Graph"
parent = "panels"
@@ -10,35 +11,38 @@ weight = 1
# Graph Panel
{{< docs-imagebox img="/img/docs/v45/graph_overview.png" class="docs-image--no-shadow" max-width="850px" >}}
The main panel in Grafana is simply named Graph. It provides a very rich set of graphing options.
<img src="/img/docs/v1/graph_overview.png" class="no-shadow">
Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration
1. Clicking the title for a panel exposes a menu. The `edit` option opens additional configuration
options for the panel.
2. Click to open color & axis selection.
3. Click to only show this series. Shift/Ctrl + click to hide series.
## General
![](/img/docs/v2/graph_general.png)
{{< docs-imagebox img="/img/docs/v43/graph_general.png" max-width= "900px" >}}
The general tab allows customization of a panel's appearance and menu options.
### General Options
- ``Title`` - The panel title on the dashboard
- ``Span`` - The panel width in columns
- ``Height`` - The panel contents height in pixels
- **Title** - The panel title on the dashboard
- **Span** - The panel width in columns
- **Height** - The panel contents height in pixels
### Drilldown / detail link
The drilldown section allows adding dynamic links to the panel that can link to other dashboards
or URLs
or URLs.
Each link has a title, a type and params. A link can be either a ``dashboard`` or ``absolute`` links.
If it is a dashboard links, the `dashboard` value must be the name of a dashboard. If it's an
`absolute` link, the URL is the URL to link.
If it is a dashboard link, the `dashboard` value must be the name of a dashboard. If it is an
`absolute` link, the URL is the URL to the link.
``params`` allows adding additional URL params to the links. The format is the ``name=value`` with
multiple params separate by ``&``. Template variables can be added as values using ``$myvar``.
multiple params separated by ``&``. Template variables can be added as values using ``$myvar``.
When linking to another dashboard that uses template variables, you can use ``var-myvar=value`` to
populate the template variable to a desired value from the link.
@@ -48,51 +52,62 @@ populate the template variable to a desired value from the link.
The metrics tab defines what series data and sources to render. Each datasource provides different
options.
## Axes & Grid
## Axes
![](/img/docs/v2/graph_axes_grid_options.png)
{{< docs-imagebox img="/img/docs/v43/graph_axes_grid_options.png" max-width= "900px" >}}
The Axes & Grid tab controls the display of axes, grids and legend.
The Axes tab controls the display of axes, grids and legend. The **Left Y** and **Right Y** can be customized using:
### Axes
- **Unit** - The display unit for the Y value
- **Scale** -
- **Y-Min** - The minimum Y value. (default auto)
- **Y-Max** - The maximum Y value. (default auto)
- **Label** - The Y axis label (default "")
The ``Left Y`` and ``Right Y`` can be customized using:
Axes can also be hidden by unchecking the appropriate box from **Show**.
- ``Unit`` - The display unit for the Y value
- ``Grid Max`` - The maximum Y value. (default auto)
- ``Grid Min`` - The minimum Y value. (default auto)
- ``Label`` - The Y axis label (default "")
### X-Axis Mode
Axes can also be hidden by unchecking the appropriate box from `Show Axis`.
There are three options:
- The default option is **Time** and means the x-axis represents time and that the data is grouped by time (for example, by hour or by minute).
- The **Series** option means that the data is grouped by series and not by time. The y-axis still represents the value.
{{< docs-imagebox img="/img/docs/v45/graph-x-axis-mode-series.png" max-width="700px">}}
- The **Histogram** option converts the graph into a histogram. A Histogram is a kind of bar chart that groups numbers into ranges, often called buckets or bins. Taller bars show that more data falls in that range. Histograms and buckets are described in more detail [here](http://docs.grafana.org/features/panels/heatmap/#histograms-and-buckets).
<img src="/img/docs/v43/heatmap_histogram.png" class="no-shadow">
### Legend
The legend hand be hidden by checking the ``Show`` checkbox. If it's shown, it can be
displayed as a table of values by checking the ``Table`` checkbox. Series with no
values can be hidden from the legend using the ``Hide empty`` checkbox.
The legend hand be hidden by checking the **Show** checkbox. If it's shown, it can be
displayed as a table of values by checking the **Table** checkbox. Series with no
values can be hidden from the legend using the **Hide empty** checkbox.
### Legend Values
Additional values can be shown along-side the legend names:
- ``Total`` - Sum of all values returned from metric query
- ``Current`` - Last value returned from the metric query
- ``Min`` - Minimum of all values returned from metric query
- ``Max`` - Maximum of all values returned from the metric query
- ``Avg`` - Average of all values returned from metric query
- ``Decimals`` - Controls how many decimals are displayed for legend values (and graph hover tooltips)
- **Total** - Sum of all values returned from metric query
- **Current** - Last value returned from the metric query
- **Min** - Minimum of all values returned from metric query
- **Max** - Maximum of all values returned from the metric query
- **Avg** - Average of all values returned from metric query
- **Decimals** - Controls how many decimals are displayed for legend values (and graph hover tooltips)
The legend values are calculated client side by Grafana and depend on what type of
aggregation or point consolidation you metric query is using. All the above legend values cannot
aggregation or point consolidation your metric query is using. All the above legend values cannot
be correct at the same time. For example if you plot a rate like requests/second, this is probably
using average as aggregator, then the Total in the legend will not represent the total number of requests.
It is just the sum of all data points received by Grafana.
## Display styles
![](/img/docs/v2/graph_display_styles.png)
{{< docs-imagebox img="/img/docs/v43/graph_display_styles.png" max-width= "900px" >}}
Display styles controls properties of the graph.
Display styles control visual properties of the graph.
### Thresholds
@@ -102,43 +117,49 @@ the graph crosses a particular threshold.
### Chart Options
- ``Bar`` - Display values as a bar chart
- ``Lines`` - Display values as a line graph
- ``Points`` - Display points for values
- **Bar** - Display values as a bar chart
- **Lines** - Display values as a line graph
- **Points** - Display points for values
### Line Options
- ``Line Fill`` - Amount of color fill for a series. 0 is none.
- ``Line Width`` - The width of the line for a series.
- ``Null point mode`` - How null values are displayed
- ``Staircase line`` - Draws adjacent points as staircase
- **Line Fill** - Amount of color fill for a series. 0 is none.
- **Line Width** - The width of the line for a series.
- **Null point mode** - How null values are displayed
- **Staircase line** - Draws adjacent points as staircase
### Multiple Series
If there are multiple series, they can be display as a group.
If there are multiple series, they can be displayed as a group.
- ``Stack`` - Each series is stacked on top of another
- ``Percent`` - Each series is draw as a percent of the total of all series
- **Stack** - Each series is stacked on top of another
- **Percent** - Each series is drawn as a percentage of the total of all series
If you have stack enabled you can select what the mouse hover feature should show.
If you have stack enabled, you can select what the mouse hover feature should show.
- Cumulative - Sum of series below plus the series you hover over
- Individual - Just the value for the series you hover over
### Rendering
- ``Flot`` - Render the graphs in the browser using Flot (default)
- ``Graphite PNG`` - Render the graph on the server using graphite's render API.
- **Flot** - Render the graphs in the browser using Flot (default)
- **Graphite PNG** - Render the graph on the server using graphite's render API.
### Tooltip
- ``All series`` - Show all series on the same tooltip and a x crosshairs to help follow all series
- **All series** - Show all series on the same tooltip and a x crosshairs to help follow all series
### Series specific overrides
### Series Specific Overrides
The section allows a series to be render different from the rest. For example, one series can be given
a thicker line width to make it standout.
The section allows a series to be rendered differently from the others. For example, one series can be given
a thicker line width to make it stand out.
## Time range
#### Dashes Drawing Style
![](/img/docs/v2/graph_time_range.png)
There is an option under Series overrides to draw lines as dashes. Set Dashes to the value True to override the line draw setting for a specific series.
## Time Range
The time range tab allows you to override the dashboard time range and specify a panel specific time. Either through a relative from now time option or through a timeshift.
{{< docs-imagebox img="/img/docs/v45/graph-time-range.png" max-width= "900px" >}}
+108
View File
@@ -0,0 +1,108 @@
+++
title = "Heatmap Panel"
description = "Heatmap panel documentation"
keywords = ["grafana", "heatmap", "panel", "documentation"]
type = "docs"
[menu.docs]
name = "Heatmap"
parent = "panels"
weight = 3
+++
# Heatmap Panel
![](/img/docs/v43/heatmap_panel_cover.jpg)
> New panel only available in Grafana v4.3+
The Heatmap panel allows you to view histograms over time. To fully understand and use this panel you need
understand what Histograms are and how they are created. Read on below to for a quick introduction to the
term Histogram.
## Histograms and buckets
A histogram is a graphical representation of the distribution of numerical data. You group values into buckets
(some times also called bins) and then count how many values fall into each bucket. Instead
of graphing the actual values you then graph the buckets. Each bar represents a bucket
and the bar height represents the frequency (i.e. count) of values that fell into that bucket's interval.
Example Histogram:
![](/img/docs/v43/heatmap_histogram.png)
The above histogram shows us that most value distribution of a couple of time series. We can easily see that
most values land between 240-300 with a peak between 260-280. Histograms just look at value distributions
over specific time range. So you cannot see any trend or changes in the distribution over time,
this is where heatmaps become useful.
## Heatmap
A Heatmap is like a histogram but over time where each time slice represents its own
histogram. Instead of using bar height as a representation of frequency you use cells and color
the cell proportional to the number of values in the bucket.
Example:
![](/img/docs/v43/heatmap_histogram_over_time.png)
Here we can clearly see what values are more common and how they trend over time.
## Data Options
Data and bucket options can be found in the `Axes` tab.
### Data Formats
Data format | Description
------------ | -------------
*Time series* | Grafana does the bucketing by going through all time series values. The bucket sizes & intervals will be determined using the Buckets options.
*Time series buckets* | Each time series already represents a Y-Axis bucket. The time series name (alias) needs to be a numeric value representing the upper interval for the bucket. Grafana does no bucketing so the bucket size options are hidden.
### Bucket Size
The Bucket count & size options are used by Grafana to calculate how big each cell in the heatmap is. You can
define the bucket size either by count (the first input box) or by specifying a size interval. For the Y-Axis
the size interval is just a value but for the X-bucket you can specify a time range in the *Size* input, for example,
the time range `1h`. This will make the cells 1h wide on the X-axis.
### Pre-bucketed data
If you have a data that is already organized into buckets you can use the `Time series buckets` data format. This format requires that your metric query return regular time series and that each time series has a numeric name
that represent the upper or lower bound of the interval.
The only data source that supports histograms over time is Elasticsearch. You do this by adding a *Histogram*
bucket aggregation before the *Date Histogram*.
![](/img/docs/v43/elastic_histogram.png)
You control the size of the buckets using the Histogram interval (Y-Axis) and the Date Histogram interval (X-axis).
## Display Options
In the heatmap *Display* tab you define how the cells are rendered and what color they are assigned.
### Color Mode & Spectrum
{{< imgbox max-width="40%" img="/img/docs/v43/heatmap_scheme.png" caption="Color spectrum" >}}
The color spectrum controls the mapping between value count (in each bucket) and the color assigned to each bucket.
The left most color on the spectrum represents the minimum count and the color on the right most side represents the
maximum count. Some color schemes are automatically inverted when using the light theme.
You can also change the color mode to `Opacity`. In this case, the color will not change but the amount of opacity will
change with the bucket count.
## Raw data vs aggregated
If you use the heatmap with regular time series data (not pre-bucketed). Then it's important to keep in mind that your data
is often already by aggregated by your time series backend. Most time series queries do not return raw sample data
but include a group by time interval or maxDataPoints limit coupled with an aggregation function (usually average).
This all depends on the time range of your query of course. But the important point is to know that the Histogram bucketing
that Grafana performs may be done on already aggregated and averaged data. To get more accurate heatmaps it is better
to do the bucketing during metric collection or store the data in Elasticsearch, which currently is the only data source
data supports doing Histogram bucketing on the raw data.
If you remove or lower the group by time (or raise maxDataPoints) in your query to return more data points your heatmap will be
more accurate but this can also be very CPU & Memory taxing for your browser and could cause hangs and crashes if the number of
data points becomes unreasonably large.
+48 -32
View File
@@ -2,6 +2,7 @@
title = "Singlestat Panel"
keywords = ["grafana", "dashboard", "documentation", "panels", "singlestat"]
type = "docs"
aliases = ["/reference/singlestat/"]
[menu.docs]
name = "Singlestat"
parent = "panels"
@@ -11,69 +12,84 @@ weight = 2
# Singlestat Panel
![](/img/docs/v1/singlestat_panel2.png)
{{< docs-imagebox img="/img/docs/v45/singlestat-panel.png" class="docs-image--no-shadow" max-width="900px" >}}
The Singlestat Panel allows you to show the one main summary stat of a SINGLE series. It reduces the series into a single number (by looking at the max, min, average, or sum of values in the series). Singlestat also provides thresholds to color the stat or the Panel background. It can also translate the single number into a text value, and show a sparkline summary of the series.
### Singlestat Panel Configuration
The singlestat panel has a normal query editor to allow you define your exact metric queries like many other Panels. Through the Options tab, you can access the Singlestat-specific functionality.
The singlestat panel has a normal query editor to allow you define your exact metric queries like many other Panels. In the Options tab, you can access the Singlestat-specific functionality.
<img class="no-shadow" src="/img/docs/v1/Singlestat-BaseSettings.png">
{{< docs-imagebox img="/img/docs/v45/singlestat-value-options.png" class="docs-image--no-shadow" max-width="900px" >}}
1. `Big Value`: Big Value refers to how we display the main stat for the Singlestat Panel. This is always a single value that is displayed in the Panel in between two strings, `Prefix` and `Suffix`. The single number is calculated by choosing a function (min,max,average,current,total) of your metric query. This functions reduces your query into a single numeric value.
2. `Font Size`: You can use this section to select the font size of the different texts in the Singlestat Panel, i.e. prefix, value and postfix.
3. `Values`: The Value fields let you set the function (min, max, average, current, total, first, delta, range) that your entire query is reduced into a single value with. You can also set the font size of the Value field and font-size (as a %) of the metric query that the Panel is configured with. This reduces the entire query into a single summary value that is displayed.
* `min` - The smallest value in the series
* `max` - The largest value in the series
* `avg` - The average of all the non-null values in the series
* `current` - The last value in the series. If the series ends on null the previous value will be used.
* `total` - The sum of all the non-null values in the series
* `first` - The first value in the series
* `delta` - The total incremental increase (of a counter) in the series. An attempt is made to account for counter resets, but this will only be accurate for single instance metrics. Used to show total counter increase in time series.
* `diff` - The difference betwen 'current' (last value) and 'first'.
* `range` - The difference between 'min' and 'max'. Useful the show the range of change for a gauge.
4. `Postfixes`: The Postfix fields let you define a custom label and font-size (as a %) to appear *after* the value
5. `Units`: Units are appended to the the Singlestat within the panel, and will respect the color and threshold settings for the value.
6. `Decimals`: The Decimal field allows you to override the automatic decimal precision, and set it explicitly.
1. **Stats**: The Stats field let you set the function (min, max, average, current, total, first, delta, range) that your entire query is reduced into a single value with. This reduces the entire query into a single summary value that is displayed.
* **min** - The smallest value in the series
* **max** - The largest value in the series
* **avg** - The average of all the non-null values in the series
* **current** - The last value in the series. If the series ends on null the previous value will be used.
* **total** - The sum of all the non-null values in the series
* **first** - The first value in the series
* **delta** - The total incremental increase (of a counter) in the series. An attempt is made to account for counter resets, but this will only be accurate for single instance metrics. Used to show total counter increase in time series.
* **diff** - The difference betwen 'current' (last value) and 'first'.
* **range** - The difference between 'min' and 'max'. Useful the show the range of change for a gauge.
2. **Prefix/Postfix**: The Prefix/Postfix fields let you define a custom label to appear *before/after* the value. The `$__name` variable can be used here to use the series name or alias from the metric query.
3. **Units**: Units are appended to the the Singlestat within the panel, and will respect the color and threshold settings for the value.
4. **Decimals**: The Decimal field allows you to override the automatic decimal precision, and set it explicitly.
5. **Font Size**: You can use this section to select the font size of the different texts in the Singlestat Panel, i.e. prefix, value and postfix.
### Coloring
The coloring options of the Singlestat Panel config allow you to dynamically change the colors based on the Singlestat value.
<img class="no-shadow" src="/img/docs/v1/Singlestat-Coloring.png">
{{< docs-imagebox img="/img/docs/v45/singlestat-color-options.png" max-width="500px" class="docs-image--right docs-image--no-shadow">}}
1. `Background`: This checkbox applies the configured thresholds and colors to the entirety of the Singlestat Panel background.
2. `Value`: This checkbox applies the configured thresholds and colors to the summary stat.
3. `Thresholds`: Change the background and value colors dynamically within the panel, depending on the Singlestat value. The threshold field accepts **2 comma-separated** values which represent 3 ranges that correspond to the three colors directly to the right. For example: if the thresholds are 70, 90 then the first color represents < 70, the second color represents between 70 and 90 and the third color represents > 90.
4. `Colors`: Select a color and opacity
5. `Invert order`: This link toggles the threshold color order.</br>For example: Green, Orange, Red (<img class="no-shadow" src="/img/docs(v1/gyr.png">) will become Red, Orange, Green (<img class="no-shadow" src="/img/docs/v1/ryg.png">).
1. **Background**: This checkbox applies the configured thresholds and colors to the entirety of the Singlestat Panel background.
2. **Thresholds**: Change the background and value colors dynamically within the panel, depending on the Singlestat value. The threshold field accepts **2 comma-separated** values which represent 3 ranges that correspond to the three colors directly to the right. For example: if the thresholds are 70, 90 then the first color represents < 70, the second color represents between 70 and 90 and the third color represents > 90.
3. **Colors**: Select a color and opacity
4. **Value**: This checkbox applies the configured thresholds and colors to the summary stat.
5. **Invert order**: This link toggles the threshold color order.</br>For example: Green, Orange, Red (<img class="no-shadow" src="/img/docs(v1/gyr.png">) will become Red, Orange, Green (<img class="no-shadow" src="/img/docs/v1/ryg.png">).
### Spark Lines
Sparklines are a great way of seeing the historical data related to the summary stat, providing valuable context at a glance. Sparklines act differently than traditional Graph Panels and do not include x or y axis, coordinates, a legend, or ability to interact with the graph.
<img class="no-shadow" src="/img/docs/v1/Singlestat-Sparklines.png">
{{< docs-imagebox img="/img/docs/v45/singlestat-spark-options.png" max-width="500px" class="docs-image--right docs-image--no-shadow">}}
1. `Show`: The show checkbox will toggle whether the spark line is shown in the Panel. When unselected, only the Singlestat value will appear.
2. `Background`: Check if you want the sparklines to take up the full panel width, or uncheck if they should be below the main Singlestat value.
3. `Line Color`: This color selection applies to the color of the sparkline itself.
4. `Fill Color`: This color selection applies to the area below the sparkline.
1. **Show**: The show checkbox will toggle whether the spark line is shown in the Panel. When unselected, only the Singlestat value will appear.
2. **Full Height**: Check if you want the sparklines to take up the full panel height, or uncheck if they should be below the main Singlestat value.
3. **Line Color**: This color selection applies to the color of the sparkline itself.
4. **Fill Color**: This color selection applies to the area below the sparkline.
<div class="clearfix"></div>
> ***Pro-tip:*** Reduce the opacity on fill colors for nice looking panels.
### Gauge
Gauges gives a clear picture of how high a value is in it's context. It's a great way to see if a value is close to the thresholds. The gauge uses the colors set in the color options.
{{< docs-imagebox img="/img/docs/v45/singlestat-gauge-options.png" max-width="500px" class="docs-image--right docs-image--no-shadow">}}
1. **Show**: The show checkbox will toggle wether the gauge is shown in the panel. When unselected, only the Singlestat value will appear.
2. **Min/Max**: This sets the start and end point for the gauge.
3. **Threshold Labels**: Check if you want to show the threshold labels. Thresholds are set in the color options.
4. **Threshold Markers**: Check if you want to have a second meter showing the thresholds.
<div class="clearfix"></div>
### Value to text mapping
{{< docs-imagebox img="/img/docs/v45/singlestat-value-mapping.png" class="docs-image--right docs-image--no-shadow">}}
Value to text mapping allows you to translate the value of the summary stat into explicit text. The text will respect all styling, thresholds and customization defined for the value. This can be useful to translate the number of the main Singlestat value into a context-specific human-readable word or message.
<img class="no-shadow" src="/img/docs/v1/Singlestat-ValueMapping.png">
<div class="clearfix"></div>
## Troubleshooting
### Multiple Series Error
<img class="no-shadow" src="/img/docs/v2/Singlestat-MultiSeriesError.png">
{{< docs-imagebox img="/img/docs/v45/singelstat-multiple-series-error.png" class="docs-image--right docs-image--no-shadow">}}
Grafana 2.5 introduced stricter checking for multiple-series on singlestat panels. In previous versions, the panel logic did not verify that only a single series was used, and instead, displayed the first series encountered. Depending on your data source, this could have lead to inconsistent data being shown and/or a general confusion about which metric was being displayed.

Some files were not shown because too many files have changed in this diff Show More