influxdb-rails 1.0.0.beta1 → 1.0.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.rubocop.yml +7 -1
- data/.travis.yml +9 -10
- data/CHANGELOG.md +48 -11
- data/Gemfile +6 -0
- data/README.md +278 -100
- data/Rakefile +17 -18
- data/gemfiles/Gemfile.rails-5.0.x +2 -0
- data/gemfiles/Gemfile.rails-6.0.x +10 -0
- data/influxdb-rails.gemspec +20 -10
- data/lib/influxdb-rails.rb +35 -118
- data/lib/influxdb/rails/configuration.rb +99 -179
- data/lib/influxdb/rails/context.rb +26 -0
- data/lib/influxdb/rails/helpers/rspec_matchers.rb +48 -0
- data/lib/influxdb/rails/metric.rb +39 -0
- data/lib/influxdb/rails/middleware/active_job_subscriber.rb +67 -0
- data/lib/influxdb/rails/middleware/active_record_subscriber.rb +26 -0
- data/lib/influxdb/rails/middleware/block_instrumentation_subscriber.rb +24 -0
- data/lib/influxdb/rails/middleware/render_subscriber.rb +32 -0
- data/lib/influxdb/rails/middleware/request_subscriber.rb +44 -0
- data/lib/influxdb/rails/middleware/sql_subscriber.rb +37 -0
- data/lib/influxdb/rails/middleware/subscriber.rb +68 -0
- data/lib/influxdb/rails/railtie.rb +28 -25
- data/lib/influxdb/rails/sql/normalizer.rb +27 -0
- data/lib/influxdb/rails/sql/query.rb +32 -0
- data/lib/influxdb/rails/tags.rb +33 -0
- data/lib/influxdb/rails/test_client.rb +13 -0
- data/lib/influxdb/rails/values.rb +24 -0
- data/lib/influxdb/rails/version.rb +1 -1
- data/lib/rails/generators/influxdb/influxdb_generator.rb +1 -1
- data/lib/rails/generators/influxdb/templates/initializer.rb +39 -9
- data/sample-dashboard/Dockerfile +24 -0
- data/sample-dashboard/README.md +74 -0
- data/sample-dashboard/Rakefile +9 -0
- data/sample-dashboard/Ruby On Rails Performance (per Action).json +1576 -0
- data/sample-dashboard/Ruby On Rails Performance (per Request).json +1053 -0
- data/sample-dashboard/Ruby On Rails Performance.json +2041 -0
- data/sample-dashboard/docker-compose.yml +34 -0
- data/sample-dashboard/provisioning/grafana-dashboards.yml +12 -0
- data/sample-dashboard/provisioning/grafana-datasource.yml +10 -0
- data/sample-dashboard/provisioning/performance-action.json +1576 -0
- data/sample-dashboard/provisioning/performance-request.json +1053 -0
- data/sample-dashboard/provisioning/performance.json +2041 -0
- data/spec/requests/action_controller_metrics_spec.rb +83 -0
- data/spec/requests/action_view_collection_metrics_spec.rb +66 -0
- data/spec/requests/action_view_partial_metrics_spec.rb +62 -0
- data/spec/requests/action_view_template_metrics_spec.rb +62 -0
- data/spec/requests/active_job_enqueue_metrics_spec.rb +65 -0
- data/spec/requests/active_job_perform_metrics_spec.rb +68 -0
- data/spec/requests/active_job_perform_start_metrics_spec.rb +68 -0
- data/spec/requests/active_record_instantiation_metrics_spec.rb +65 -0
- data/spec/requests/active_record_sql_metrics_spec.rb +103 -0
- data/spec/requests/block_inistrumentation_spec.rb +64 -0
- data/spec/requests/context_spec.rb +27 -0
- data/spec/requests/logger_spec.rb +10 -0
- data/spec/spec_helper.rb +12 -4
- data/spec/support/broken_client.rb +11 -0
- data/spec/support/rails5/app.rb +44 -5
- data/spec/support/rails6/app.rb +70 -0
- data/spec/support/views/metrics/_item.html.erb +1 -0
- data/spec/support/views/metrics/index.html.erb +5 -0
- data/spec/support/views/metrics/show.html.erb +4 -0
- data/spec/unit/block_instrumentation_spec.rb +18 -0
- data/spec/unit/configuration_spec.rb +64 -65
- data/spec/unit/sql/normalizer_spec.rb +15 -0
- data/spec/unit/sql/query_spec.rb +29 -0
- metadata +167 -44
- data/gemfiles/Gemfile.rails-4.2.x +0 -7
- data/lib/influxdb/rails/air_traffic_controller.rb +0 -41
- data/lib/influxdb/rails/backtrace.rb +0 -44
- data/lib/influxdb/rails/exception_presenter.rb +0 -94
- data/lib/influxdb/rails/instrumentation.rb +0 -34
- data/lib/influxdb/rails/logger.rb +0 -16
- data/lib/influxdb/rails/middleware/hijack_render_exception.rb +0 -16
- data/lib/influxdb/rails/middleware/hijack_rescue_action_everywhere.rb +0 -31
- data/lib/influxdb/rails/rack.rb +0 -24
- data/spec/controllers/widgets_controller_spec.rb +0 -15
- data/spec/integration/exceptions_spec.rb +0 -37
- data/spec/integration/integration_helper.rb +0 -1
- data/spec/integration/metrics_spec.rb +0 -21
- data/spec/support/rails4/app.rb +0 -30
- data/spec/unit/backtrace_spec.rb +0 -85
- data/spec/unit/exception_presenter_spec.rb +0 -23
- data/spec/unit/influxdb_rails_spec.rb +0 -164
@@ -0,0 +1,27 @@
|
|
1
|
+
module InfluxDB
|
2
|
+
module Rails
|
3
|
+
module Sql
|
4
|
+
class Normalizer # :nodoc:
|
5
|
+
def initialize(query)
|
6
|
+
@query = query.dup
|
7
|
+
end
|
8
|
+
|
9
|
+
def perform
|
10
|
+
query.squish!
|
11
|
+
query.gsub!(/(\s(=|>|<|>=|<=|<>|!=)\s)('[^']+'|[\$\+\-\w\.]+)/, '\1xxx')
|
12
|
+
query.gsub!(/(\sIN\s)\([^\(\)]+\)/i, '\1(xxx)')
|
13
|
+
regex = /(\sBETWEEN\s)('[^']+'|[\+\-\w\.]+)(\sAND\s)('[^']+'|[\+\-\w\.]+)/i
|
14
|
+
query.gsub!(regex, '\1xxx\3xxx')
|
15
|
+
query.gsub!(/(\sVALUES\s)\(.+\)/i, '\1(xxx)')
|
16
|
+
query.gsub!(/(\s(LIKE|ILIKE|SIMILAR TO|NOT SIMILAR TO)\s)('[^']+')/i, '\1xxx')
|
17
|
+
query.gsub!(/(\s(LIMIT|OFFSET)\s)(\d+)/i, '\1xxx')
|
18
|
+
query
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
attr_reader :query
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "influxdb/rails/sql/normalizer"
|
2
|
+
|
3
|
+
module InfluxDB
|
4
|
+
module Rails
|
5
|
+
module Sql
|
6
|
+
class Query # :nodoc:
|
7
|
+
attr_reader :query, :name
|
8
|
+
|
9
|
+
TRACKED_SQL_COMMANDS = %w[SELECT INSERT UPDATE DELETE].freeze
|
10
|
+
UNTRACKED_NAMES = %w[SCHEMA].freeze
|
11
|
+
|
12
|
+
def initialize(payload)
|
13
|
+
@query = payload[:sql].to_s.dup.upcase
|
14
|
+
@name = payload[:name].to_s.dup
|
15
|
+
end
|
16
|
+
|
17
|
+
def operation
|
18
|
+
query.split.first
|
19
|
+
end
|
20
|
+
|
21
|
+
def class_name
|
22
|
+
name.split.first
|
23
|
+
end
|
24
|
+
|
25
|
+
def track?
|
26
|
+
@track ||= query.start_with?(*TRACKED_SQL_COMMANDS) &&
|
27
|
+
!name.upcase.start_with?(*UNTRACKED_NAMES)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module InfluxDB
|
2
|
+
module Rails
|
3
|
+
class Tags
|
4
|
+
def initialize(tags: {}, config:, additional_tags: InfluxDB::Rails.current.tags)
|
5
|
+
@tags = tags
|
6
|
+
@config = config
|
7
|
+
@additional_tags = additional_tags
|
8
|
+
end
|
9
|
+
|
10
|
+
def to_h
|
11
|
+
expanded_tags.reject do |_, value|
|
12
|
+
value.nil? || value == ""
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
private
|
17
|
+
|
18
|
+
attr_reader :additional_tags, :tags, :config
|
19
|
+
|
20
|
+
def expanded_tags
|
21
|
+
config.tags_middleware.call(tags.merge(default_tags))
|
22
|
+
end
|
23
|
+
|
24
|
+
def default_tags
|
25
|
+
{
|
26
|
+
server: Socket.gethostname,
|
27
|
+
app_name: config.application_name,
|
28
|
+
location: :raw,
|
29
|
+
}.merge(additional_tags)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module InfluxDB
|
2
|
+
module Rails
|
3
|
+
class Values
|
4
|
+
def initialize(values: {}, additional_values: InfluxDB::Rails.current.values)
|
5
|
+
@values = values
|
6
|
+
@additional_values = additional_values
|
7
|
+
end
|
8
|
+
|
9
|
+
def to_h
|
10
|
+
expanded_values.reject do |_, value|
|
11
|
+
value.nil? || value == ""
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
attr_reader :additional_values, :values
|
18
|
+
|
19
|
+
def expanded_values
|
20
|
+
values.merge(additional_values)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require "rails/generators"
|
2
2
|
|
3
|
-
class InfluxdbGenerator < Rails::Generators::Base
|
3
|
+
class InfluxdbGenerator < Rails::Generators::Base
|
4
4
|
desc "Description:\n This creates a Rails initializer for InfluxDB::Rails."
|
5
5
|
|
6
6
|
source_root File.expand_path("templates", __dir__)
|
@@ -1,11 +1,41 @@
|
|
1
1
|
InfluxDB::Rails.configure do |config|
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
config.
|
6
|
-
config.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
2
|
+
## The only setting you actually need to update is the name of the
|
3
|
+
## database within the InfluxDB server instance. Don't forget to
|
4
|
+
## create this database as well.
|
5
|
+
config.client.database = "rails"
|
6
|
+
# config.client.hosts = ["localhost"]
|
7
|
+
# config.client.port = 8086
|
8
|
+
|
9
|
+
## If you've setup user authentication (and activated it in the server
|
10
|
+
## config), you need to configure the credentials here.
|
11
|
+
# config.client.username = "root"
|
12
|
+
# config.client.password = "root"
|
13
|
+
|
14
|
+
## Various other client and connection options. These are used to create
|
15
|
+
## an `InfluxDB::Client` instance (i.e. `InfluxDB::Rails.client`).
|
16
|
+
##
|
17
|
+
## See docs for the influxdb gem for the canonical list of options:
|
18
|
+
## https://github.com/influxdata/influxdb-ruby#list-of-configuration-options
|
19
|
+
##
|
20
|
+
## These defaults for the influxdb-rails gem deviate from the default
|
21
|
+
## for the influxdb gem:
|
22
|
+
# config.client.async = true # false
|
23
|
+
# config.client.read_timeout = 30 # 300
|
24
|
+
# config.client.max_delay = 300 # 30
|
25
|
+
# config.client.time_precision = "ms" # "s"
|
26
|
+
|
27
|
+
## Prior to 1.0.0, this gem has written all data points in different
|
28
|
+
## measurements (the config options were named `series_name_for_*`).
|
29
|
+
## Since 1.0.0.beta3, we're now using a single measurements
|
30
|
+
# config.measurement_name = "rails"
|
31
|
+
|
32
|
+
## Disable rails framework hooks.
|
33
|
+
# config.ignored_hooks = ['sql.active_record', 'render_template.action_view']
|
34
|
+
|
35
|
+
# Modify tags on the fly.
|
36
|
+
# config.tags_middleware = ->(tags) { tags }
|
37
|
+
|
38
|
+
## Set the application name to something meaningful, by default we
|
39
|
+
## infer the app name from the Rails.application class name.
|
40
|
+
# config.application_name = Rails.application.class.parent_name
|
11
41
|
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
FROM opensuse/leap:15.1
|
2
|
+
|
3
|
+
ENV NOKOGIRI_USE_SYSTEM_LIBRARIES 1
|
4
|
+
RUN useradd -g users -p rails -d /home/rails -m rails
|
5
|
+
RUN echo 'rails ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
6
|
+
|
7
|
+
RUN zypper -n addrepo -f https://dl.yarnpkg.com/rpm/yarn.repo; zypper --gpg-auto-import-keys refresh
|
8
|
+
RUN zypper -n install --no-recommends ruby2.5-devel nodejs10 make gcc timezone sudo pkg-config sqlite3-devel libxml2-devel libxslt-devel yarn git-core curl
|
9
|
+
RUN zypper -n clean -a
|
10
|
+
RUN gem install --no-format-executable --no-document rails -v '~> 6'
|
11
|
+
|
12
|
+
USER rails
|
13
|
+
WORKDIR /home/rails
|
14
|
+
|
15
|
+
RUN rails new thingiverse;
|
16
|
+
|
17
|
+
WORKDIR /home/rails/thingiverse
|
18
|
+
RUN rails g scaffold thing name:string amount:integer
|
19
|
+
RUN echo 'gem "influxdb-rails", :git => "https://github.com/influxdata/influxdb-rails/", :branch => "master"' >> Gemfile
|
20
|
+
RUN bundle install; rails webpacker:install; rake db:migrate
|
21
|
+
RUN sed -i '2i \ root to: "things#index"' config/routes.rb
|
22
|
+
RUN bundle exec rails generate influxdb
|
23
|
+
RUN sed -i '2i \ config.client.hosts = "influx"' config/initializers/influxdb_rails.rb
|
24
|
+
CMD bundle exec rails server -b 0.0.0.0 -p 4000
|
@@ -0,0 +1,74 @@
|
|
1
|
+
# Ruby On Rails Performance Dashboard
|
2
|
+
|
3
|
+
A dashboard providing Ruby on Rails performance insights based on
|
4
|
+
[Free Software](https://www.fsf.org/about/what-is-free-software), ready to
|
5
|
+
run inside your data-center.
|
6
|
+
|
7
|
+
![Screenshot of the dashboard](https://grafana.com/api/dashboards/10428/images/6557/image)
|
8
|
+
|
9
|
+
By default it measures (in various forms):
|
10
|
+
|
11
|
+
- Controller Action Runtime
|
12
|
+
- View/Partial Render Runtime
|
13
|
+
- Database Query Runtime
|
14
|
+
|
15
|
+
It provides an overview and you can also drill down into numbers on a per request basis. Of course you can use all the awesome features that Influx (Downsampling/Data Retention), Grafana (Alerts, Annotations) and influxdb-rails (custom tags) provide and extend this to your needs. Use your freedom and run, copy, distribute, study, change and improve this software!
|
16
|
+
|
17
|
+
## Requirements
|
18
|
+
|
19
|
+
To be able to measure performance you need the following things available:
|
20
|
+
|
21
|
+
- [InfluxDB 1.x](https://docs.influxdata.com/influxdb/v1.8/introduction/install/)
|
22
|
+
- [Grafana](https://grafana.com/docs/)
|
23
|
+
- A [Ruby On Rails](https://rubyonrails.org/) application with [influxdb-rails](https://github.com/influxdata/influxdb-rails) enabled
|
24
|
+
|
25
|
+
## Installation
|
26
|
+
|
27
|
+
Once you have influx/grafana instances running in your infrastructure just [import both
|
28
|
+
dashboards from grafana](https://grafana.com/docs/reference/export_import/#importing-a-dashboard).
|
29
|
+
|
30
|
+
- [Overview Dashboard](https://grafana.com/dashboards/10428)
|
31
|
+
- [Request Dashboard](https://grafana.com/dashboards/10429)
|
32
|
+
|
33
|
+
You can also paste the `.json` files from this repository.
|
34
|
+
|
35
|
+
In the unlikely case that you need to change the dashboard *UID*s during import you can configure the *UID* the `Overview` dashboard uses to link to the `Request` dashboard in the [variables](https://grafana.com/docs/reference/templating/#adding-a-variable). Just paste whatever *UID* you've set up for the `Request` dashboard.
|
36
|
+
|
37
|
+
## Demo
|
38
|
+
|
39
|
+
This repository includes a [docker-compose](https://docs.docker.com/compose/) demo setup that brings a simple rails app, influxdb and grafana.
|
40
|
+
|
41
|
+
### Starting the demo services
|
42
|
+
|
43
|
+
Clone this repository and run
|
44
|
+
|
45
|
+
```shell
|
46
|
+
docker-compose up
|
47
|
+
```
|
48
|
+
|
49
|
+
### Browse the sample app...
|
50
|
+
|
51
|
+
Go to http://0.0.0.0:4000 and do some things. Every request to the rails app will generate performance data in the demo.
|
52
|
+
|
53
|
+
### ...or Configure your own Rails app...
|
54
|
+
|
55
|
+
You can also use the dashboard with any other rails app you already have. Follow our [install instructions](https://github.com/influxdata/influxdb-rails/#installation), the default configuration works with the demo InfluxDB running on localhost:8086.
|
56
|
+
|
57
|
+
To be able to view individual requests you have to enable request ID tags in your application. Something like:
|
58
|
+
|
59
|
+
```ruby
|
60
|
+
class ApplicationController < ActionController::Base
|
61
|
+
|
62
|
+
before_action :set_influx_data
|
63
|
+
|
64
|
+
def set_influx_data
|
65
|
+
InfluxDB::Rails.current.values = { request: request.request_id }
|
66
|
+
end
|
67
|
+
end
|
68
|
+
```
|
69
|
+
|
70
|
+
### ...then see the dashboards in action
|
71
|
+
|
72
|
+
Just go to http://0.0.0.0:3000 and log in with admin/admin.
|
73
|
+
|
74
|
+
Enjoy! ❤️
|
@@ -0,0 +1,9 @@
|
|
1
|
+
task default: %w[prepare]
|
2
|
+
|
3
|
+
# rubocop:disable Metrics/LineLength
|
4
|
+
task :prepare do
|
5
|
+
sh "cat 'Ruby On Rails Performance.json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance.json"
|
6
|
+
sh "cat 'Ruby On Rails Performance (per Request).json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance-request.json"
|
7
|
+
sh "cat 'Ruby On Rails Performance (per Action).json' | sed 's/${DS_INFLUXDB}/InfluxDB/g' > provisioning/performance-action.json"
|
8
|
+
end
|
9
|
+
# rubocop:enable Metrics/LineLength
|
@@ -0,0 +1,1576 @@
|
|
1
|
+
{
|
2
|
+
"__inputs": [
|
3
|
+
{
|
4
|
+
"name": "DS_INFLUXDB",
|
5
|
+
"label": "InfluxDB",
|
6
|
+
"description": "",
|
7
|
+
"type": "datasource",
|
8
|
+
"pluginId": "influxdb",
|
9
|
+
"pluginName": "InfluxDB"
|
10
|
+
}
|
11
|
+
],
|
12
|
+
"__requires": [
|
13
|
+
{
|
14
|
+
"type": "grafana",
|
15
|
+
"id": "grafana",
|
16
|
+
"name": "Grafana",
|
17
|
+
"version": "6.2.4"
|
18
|
+
},
|
19
|
+
{
|
20
|
+
"type": "panel",
|
21
|
+
"id": "graph",
|
22
|
+
"name": "Graph",
|
23
|
+
"version": ""
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"type": "datasource",
|
27
|
+
"id": "influxdb",
|
28
|
+
"name": "InfluxDB",
|
29
|
+
"version": "1.0.0"
|
30
|
+
},
|
31
|
+
{
|
32
|
+
"type": "panel",
|
33
|
+
"id": "singlestat",
|
34
|
+
"name": "Singlestat",
|
35
|
+
"version": ""
|
36
|
+
},
|
37
|
+
{
|
38
|
+
"type": "panel",
|
39
|
+
"id": "table",
|
40
|
+
"name": "Table",
|
41
|
+
"version": ""
|
42
|
+
}
|
43
|
+
],
|
44
|
+
"annotations": {
|
45
|
+
"list": [
|
46
|
+
{
|
47
|
+
"builtIn": 1,
|
48
|
+
"datasource": "-- Grafana --",
|
49
|
+
"enable": true,
|
50
|
+
"hide": true,
|
51
|
+
"iconColor": "rgba(0, 211, 255, 1)",
|
52
|
+
"name": "Annotations & Alerts",
|
53
|
+
"type": "dashboard"
|
54
|
+
}
|
55
|
+
]
|
56
|
+
},
|
57
|
+
"description": "Ruby on Rails Request Performance Insights based on influxdb-rails",
|
58
|
+
"editable": true,
|
59
|
+
"gnetId": null,
|
60
|
+
"graphTooltip": 0,
|
61
|
+
"id": null,
|
62
|
+
"iteration": 1571756217977,
|
63
|
+
"links": [],
|
64
|
+
"panels": [
|
65
|
+
{
|
66
|
+
"cacheTimeout": null,
|
67
|
+
"colorBackground": false,
|
68
|
+
"colorValue": false,
|
69
|
+
"colors": [
|
70
|
+
"#299c46",
|
71
|
+
"rgba(237, 129, 40, 0.89)",
|
72
|
+
"#d44a3a"
|
73
|
+
],
|
74
|
+
"datasource": "${DS_INFLUXDB}",
|
75
|
+
"format": "ms",
|
76
|
+
"gauge": {
|
77
|
+
"maxValue": 100,
|
78
|
+
"minValue": 0,
|
79
|
+
"show": false,
|
80
|
+
"thresholdLabels": false,
|
81
|
+
"thresholdMarkers": true
|
82
|
+
},
|
83
|
+
"gridPos": {
|
84
|
+
"h": 4,
|
85
|
+
"w": 5,
|
86
|
+
"x": 0,
|
87
|
+
"y": 0
|
88
|
+
},
|
89
|
+
"id": 16,
|
90
|
+
"interval": null,
|
91
|
+
"links": [],
|
92
|
+
"mappingType": 1,
|
93
|
+
"mappingTypes": [
|
94
|
+
{
|
95
|
+
"name": "value to text",
|
96
|
+
"value": 1
|
97
|
+
},
|
98
|
+
{
|
99
|
+
"name": "range to text",
|
100
|
+
"value": 2
|
101
|
+
}
|
102
|
+
],
|
103
|
+
"maxDataPoints": 100,
|
104
|
+
"nullPointMode": "connected",
|
105
|
+
"nullText": null,
|
106
|
+
"options": {},
|
107
|
+
"postfix": "",
|
108
|
+
"postfixFontSize": "50%",
|
109
|
+
"prefix": "",
|
110
|
+
"prefixFontSize": "50%",
|
111
|
+
"rangeMaps": [
|
112
|
+
{
|
113
|
+
"from": "null",
|
114
|
+
"text": "N/A",
|
115
|
+
"to": "null"
|
116
|
+
}
|
117
|
+
],
|
118
|
+
"sparkline": {
|
119
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
120
|
+
"full": false,
|
121
|
+
"lineColor": "rgb(31, 120, 193)",
|
122
|
+
"show": true
|
123
|
+
},
|
124
|
+
"tableColumn": "",
|
125
|
+
"targets": [
|
126
|
+
{
|
127
|
+
"groupBy": [
|
128
|
+
{
|
129
|
+
"params": [
|
130
|
+
"$__interval"
|
131
|
+
],
|
132
|
+
"type": "time"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"params": [
|
136
|
+
"null"
|
137
|
+
],
|
138
|
+
"type": "fill"
|
139
|
+
}
|
140
|
+
],
|
141
|
+
"measurement": "rails",
|
142
|
+
"orderByTime": "ASC",
|
143
|
+
"policy": "default",
|
144
|
+
"refId": "A",
|
145
|
+
"resultFormat": "time_series",
|
146
|
+
"select": [
|
147
|
+
[
|
148
|
+
{
|
149
|
+
"params": [
|
150
|
+
"controller"
|
151
|
+
],
|
152
|
+
"type": "field"
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"params": [],
|
156
|
+
"type": "mean"
|
157
|
+
}
|
158
|
+
]
|
159
|
+
],
|
160
|
+
"tags": [
|
161
|
+
{
|
162
|
+
"key": "method",
|
163
|
+
"operator": "=~",
|
164
|
+
"value": "/^$Action$/"
|
165
|
+
},
|
166
|
+
{
|
167
|
+
"condition": "AND",
|
168
|
+
"key": "hook",
|
169
|
+
"operator": "=",
|
170
|
+
"value": "process_action"
|
171
|
+
}
|
172
|
+
]
|
173
|
+
}
|
174
|
+
],
|
175
|
+
"thresholds": "",
|
176
|
+
"title": "Request",
|
177
|
+
"type": "singlestat",
|
178
|
+
"valueFontSize": "80%",
|
179
|
+
"valueMaps": [
|
180
|
+
{
|
181
|
+
"op": "=",
|
182
|
+
"text": "N/A",
|
183
|
+
"value": "null"
|
184
|
+
}
|
185
|
+
],
|
186
|
+
"valueName": "avg"
|
187
|
+
},
|
188
|
+
{
|
189
|
+
"cacheTimeout": null,
|
190
|
+
"colorBackground": false,
|
191
|
+
"colorValue": false,
|
192
|
+
"colors": [
|
193
|
+
"#299c46",
|
194
|
+
"rgba(237, 129, 40, 0.89)",
|
195
|
+
"#d44a3a"
|
196
|
+
],
|
197
|
+
"datasource": "${DS_INFLUXDB}",
|
198
|
+
"format": "ms",
|
199
|
+
"gauge": {
|
200
|
+
"maxValue": 100,
|
201
|
+
"minValue": 0,
|
202
|
+
"show": false,
|
203
|
+
"thresholdLabels": false,
|
204
|
+
"thresholdMarkers": true
|
205
|
+
},
|
206
|
+
"gridPos": {
|
207
|
+
"h": 4,
|
208
|
+
"w": 5,
|
209
|
+
"x": 5,
|
210
|
+
"y": 0
|
211
|
+
},
|
212
|
+
"id": 14,
|
213
|
+
"interval": null,
|
214
|
+
"links": [],
|
215
|
+
"mappingType": 1,
|
216
|
+
"mappingTypes": [
|
217
|
+
{
|
218
|
+
"name": "value to text",
|
219
|
+
"value": 1
|
220
|
+
},
|
221
|
+
{
|
222
|
+
"name": "range to text",
|
223
|
+
"value": 2
|
224
|
+
}
|
225
|
+
],
|
226
|
+
"maxDataPoints": 100,
|
227
|
+
"nullPointMode": "connected",
|
228
|
+
"nullText": null,
|
229
|
+
"options": {},
|
230
|
+
"postfix": "",
|
231
|
+
"postfixFontSize": "50%",
|
232
|
+
"prefix": "",
|
233
|
+
"prefixFontSize": "50%",
|
234
|
+
"rangeMaps": [
|
235
|
+
{
|
236
|
+
"from": "null",
|
237
|
+
"text": "N/A",
|
238
|
+
"to": "null"
|
239
|
+
}
|
240
|
+
],
|
241
|
+
"sparkline": {
|
242
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
243
|
+
"full": false,
|
244
|
+
"lineColor": "rgb(31, 120, 193)",
|
245
|
+
"show": true
|
246
|
+
},
|
247
|
+
"tableColumn": "",
|
248
|
+
"targets": [
|
249
|
+
{
|
250
|
+
"groupBy": [
|
251
|
+
{
|
252
|
+
"params": [
|
253
|
+
"$__interval"
|
254
|
+
],
|
255
|
+
"type": "time"
|
256
|
+
},
|
257
|
+
{
|
258
|
+
"params": [
|
259
|
+
"null"
|
260
|
+
],
|
261
|
+
"type": "fill"
|
262
|
+
}
|
263
|
+
],
|
264
|
+
"measurement": "rails",
|
265
|
+
"orderByTime": "ASC",
|
266
|
+
"policy": "default",
|
267
|
+
"refId": "A",
|
268
|
+
"resultFormat": "time_series",
|
269
|
+
"select": [
|
270
|
+
[
|
271
|
+
{
|
272
|
+
"params": [
|
273
|
+
"view"
|
274
|
+
],
|
275
|
+
"type": "field"
|
276
|
+
},
|
277
|
+
{
|
278
|
+
"params": [],
|
279
|
+
"type": "mean"
|
280
|
+
}
|
281
|
+
]
|
282
|
+
],
|
283
|
+
"tags": [
|
284
|
+
{
|
285
|
+
"key": "method",
|
286
|
+
"operator": "=~",
|
287
|
+
"value": "/^$Action$/"
|
288
|
+
},
|
289
|
+
{
|
290
|
+
"condition": "AND",
|
291
|
+
"key": "hook",
|
292
|
+
"operator": "=",
|
293
|
+
"value": "process_action"
|
294
|
+
}
|
295
|
+
]
|
296
|
+
}
|
297
|
+
],
|
298
|
+
"thresholds": "",
|
299
|
+
"title": "View per request",
|
300
|
+
"type": "singlestat",
|
301
|
+
"valueFontSize": "80%",
|
302
|
+
"valueMaps": [
|
303
|
+
{
|
304
|
+
"op": "=",
|
305
|
+
"text": "N/A",
|
306
|
+
"value": "null"
|
307
|
+
}
|
308
|
+
],
|
309
|
+
"valueName": "avg"
|
310
|
+
},
|
311
|
+
{
|
312
|
+
"cacheTimeout": null,
|
313
|
+
"colorBackground": false,
|
314
|
+
"colorValue": false,
|
315
|
+
"colors": [
|
316
|
+
"#299c46",
|
317
|
+
"rgba(237, 129, 40, 0.89)",
|
318
|
+
"#d44a3a"
|
319
|
+
],
|
320
|
+
"datasource": "${DS_INFLUXDB}",
|
321
|
+
"format": "ms",
|
322
|
+
"gauge": {
|
323
|
+
"maxValue": 100,
|
324
|
+
"minValue": 0,
|
325
|
+
"show": false,
|
326
|
+
"thresholdLabels": false,
|
327
|
+
"thresholdMarkers": true
|
328
|
+
},
|
329
|
+
"gridPos": {
|
330
|
+
"h": 4,
|
331
|
+
"w": 5,
|
332
|
+
"x": 10,
|
333
|
+
"y": 0
|
334
|
+
},
|
335
|
+
"id": 10,
|
336
|
+
"interval": null,
|
337
|
+
"links": [],
|
338
|
+
"mappingType": 1,
|
339
|
+
"mappingTypes": [
|
340
|
+
{
|
341
|
+
"name": "value to text",
|
342
|
+
"value": 1
|
343
|
+
},
|
344
|
+
{
|
345
|
+
"name": "range to text",
|
346
|
+
"value": 2
|
347
|
+
}
|
348
|
+
],
|
349
|
+
"maxDataPoints": 100,
|
350
|
+
"nullPointMode": "connected",
|
351
|
+
"nullText": null,
|
352
|
+
"options": {},
|
353
|
+
"postfix": "",
|
354
|
+
"postfixFontSize": "50%",
|
355
|
+
"prefix": "",
|
356
|
+
"prefixFontSize": "50%",
|
357
|
+
"rangeMaps": [
|
358
|
+
{
|
359
|
+
"from": "null",
|
360
|
+
"text": "N/A",
|
361
|
+
"to": "null"
|
362
|
+
}
|
363
|
+
],
|
364
|
+
"sparkline": {
|
365
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
366
|
+
"full": false,
|
367
|
+
"lineColor": "rgb(31, 120, 193)",
|
368
|
+
"show": true
|
369
|
+
},
|
370
|
+
"tableColumn": "",
|
371
|
+
"targets": [
|
372
|
+
{
|
373
|
+
"groupBy": [
|
374
|
+
{
|
375
|
+
"params": [
|
376
|
+
"$__interval"
|
377
|
+
],
|
378
|
+
"type": "time"
|
379
|
+
},
|
380
|
+
{
|
381
|
+
"params": [
|
382
|
+
"null"
|
383
|
+
],
|
384
|
+
"type": "fill"
|
385
|
+
}
|
386
|
+
],
|
387
|
+
"measurement": "rails",
|
388
|
+
"orderByTime": "ASC",
|
389
|
+
"policy": "default",
|
390
|
+
"refId": "A",
|
391
|
+
"resultFormat": "time_series",
|
392
|
+
"select": [
|
393
|
+
[
|
394
|
+
{
|
395
|
+
"params": [
|
396
|
+
"db"
|
397
|
+
],
|
398
|
+
"type": "field"
|
399
|
+
},
|
400
|
+
{
|
401
|
+
"params": [],
|
402
|
+
"type": "mean"
|
403
|
+
}
|
404
|
+
]
|
405
|
+
],
|
406
|
+
"tags": [
|
407
|
+
{
|
408
|
+
"key": "method",
|
409
|
+
"operator": "=~",
|
410
|
+
"value": "/^$Action$/"
|
411
|
+
},
|
412
|
+
{
|
413
|
+
"condition": "AND",
|
414
|
+
"key": "hook",
|
415
|
+
"operator": "=",
|
416
|
+
"value": "process_action"
|
417
|
+
}
|
418
|
+
]
|
419
|
+
}
|
420
|
+
],
|
421
|
+
"thresholds": "",
|
422
|
+
"title": "SQL per request",
|
423
|
+
"type": "singlestat",
|
424
|
+
"valueFontSize": "80%",
|
425
|
+
"valueMaps": [
|
426
|
+
{
|
427
|
+
"op": "=",
|
428
|
+
"text": "N/A",
|
429
|
+
"value": "null"
|
430
|
+
}
|
431
|
+
],
|
432
|
+
"valueName": "avg"
|
433
|
+
},
|
434
|
+
{
|
435
|
+
"cacheTimeout": null,
|
436
|
+
"colorBackground": false,
|
437
|
+
"colorValue": false,
|
438
|
+
"colors": [
|
439
|
+
"#299c46",
|
440
|
+
"rgba(237, 129, 40, 0.89)",
|
441
|
+
"#d44a3a"
|
442
|
+
],
|
443
|
+
"datasource": "${DS_INFLUXDB}",
|
444
|
+
"format": "short",
|
445
|
+
"gauge": {
|
446
|
+
"maxValue": 100,
|
447
|
+
"minValue": 0,
|
448
|
+
"show": false,
|
449
|
+
"thresholdLabels": false,
|
450
|
+
"thresholdMarkers": true
|
451
|
+
},
|
452
|
+
"gridPos": {
|
453
|
+
"h": 4,
|
454
|
+
"w": 5,
|
455
|
+
"x": 15,
|
456
|
+
"y": 0
|
457
|
+
},
|
458
|
+
"id": 22,
|
459
|
+
"interval": null,
|
460
|
+
"links": [],
|
461
|
+
"mappingType": 1,
|
462
|
+
"mappingTypes": [
|
463
|
+
{
|
464
|
+
"name": "value to text",
|
465
|
+
"value": 1
|
466
|
+
},
|
467
|
+
{
|
468
|
+
"name": "range to text",
|
469
|
+
"value": 2
|
470
|
+
}
|
471
|
+
],
|
472
|
+
"maxDataPoints": 100,
|
473
|
+
"nullPointMode": "connected",
|
474
|
+
"nullText": null,
|
475
|
+
"options": {},
|
476
|
+
"postfix": "",
|
477
|
+
"postfixFontSize": "50%",
|
478
|
+
"prefix": "",
|
479
|
+
"prefixFontSize": "50%",
|
480
|
+
"rangeMaps": [
|
481
|
+
{
|
482
|
+
"from": "null",
|
483
|
+
"text": "N/A",
|
484
|
+
"to": "null"
|
485
|
+
}
|
486
|
+
],
|
487
|
+
"sparkline": {
|
488
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
489
|
+
"full": false,
|
490
|
+
"lineColor": "rgb(31, 120, 193)",
|
491
|
+
"show": false
|
492
|
+
},
|
493
|
+
"tableColumn": "value",
|
494
|
+
"targets": [
|
495
|
+
{
|
496
|
+
"groupBy": [],
|
497
|
+
"measurement": "rails",
|
498
|
+
"orderByTime": "ASC",
|
499
|
+
"policy": "default",
|
500
|
+
"refId": "A",
|
501
|
+
"resultFormat": "time_series",
|
502
|
+
"select": [
|
503
|
+
[
|
504
|
+
{
|
505
|
+
"params": [
|
506
|
+
"controller"
|
507
|
+
],
|
508
|
+
"type": "field"
|
509
|
+
},
|
510
|
+
{
|
511
|
+
"params": [],
|
512
|
+
"type": "count"
|
513
|
+
}
|
514
|
+
]
|
515
|
+
],
|
516
|
+
"tags": [
|
517
|
+
{
|
518
|
+
"key": "method",
|
519
|
+
"operator": "=~",
|
520
|
+
"value": "/^$Action$/"
|
521
|
+
},
|
522
|
+
{
|
523
|
+
"condition": "AND",
|
524
|
+
"key": "hook",
|
525
|
+
"operator": "=",
|
526
|
+
"value": "process_action"
|
527
|
+
}
|
528
|
+
]
|
529
|
+
}
|
530
|
+
],
|
531
|
+
"thresholds": "",
|
532
|
+
"title": "Total requests",
|
533
|
+
"type": "singlestat",
|
534
|
+
"valueFontSize": "80%",
|
535
|
+
"valueMaps": [
|
536
|
+
{
|
537
|
+
"op": "=",
|
538
|
+
"text": "N/A",
|
539
|
+
"value": "null"
|
540
|
+
}
|
541
|
+
],
|
542
|
+
"valueName": "avg"
|
543
|
+
},
|
544
|
+
{
|
545
|
+
"cacheTimeout": null,
|
546
|
+
"colorBackground": false,
|
547
|
+
"colorValue": true,
|
548
|
+
"colors": [
|
549
|
+
"#e24d42",
|
550
|
+
"#e5ac0e",
|
551
|
+
"#629e51"
|
552
|
+
],
|
553
|
+
"datasource": "${DS_INFLUXDB}",
|
554
|
+
"decimals": null,
|
555
|
+
"format": "percent",
|
556
|
+
"gauge": {
|
557
|
+
"maxValue": 100,
|
558
|
+
"minValue": 0,
|
559
|
+
"show": false,
|
560
|
+
"thresholdLabels": false,
|
561
|
+
"thresholdMarkers": true
|
562
|
+
},
|
563
|
+
"gridPos": {
|
564
|
+
"h": 4,
|
565
|
+
"w": 4,
|
566
|
+
"x": 20,
|
567
|
+
"y": 0
|
568
|
+
},
|
569
|
+
"id": 24,
|
570
|
+
"interval": null,
|
571
|
+
"links": [],
|
572
|
+
"mappingType": 1,
|
573
|
+
"mappingTypes": [
|
574
|
+
{
|
575
|
+
"name": "value to text",
|
576
|
+
"value": 1
|
577
|
+
},
|
578
|
+
{
|
579
|
+
"name": "range to text",
|
580
|
+
"value": 2
|
581
|
+
}
|
582
|
+
],
|
583
|
+
"maxDataPoints": 100,
|
584
|
+
"nullPointMode": "connected",
|
585
|
+
"nullText": null,
|
586
|
+
"options": {},
|
587
|
+
"postfix": "",
|
588
|
+
"postfixFontSize": "50%",
|
589
|
+
"prefix": "",
|
590
|
+
"prefixFontSize": "50%",
|
591
|
+
"rangeMaps": [
|
592
|
+
{
|
593
|
+
"from": "null",
|
594
|
+
"text": "N/A",
|
595
|
+
"to": "null"
|
596
|
+
}
|
597
|
+
],
|
598
|
+
"sparkline": {
|
599
|
+
"fillColor": "rgba(31, 118, 189, 0.18)",
|
600
|
+
"full": false,
|
601
|
+
"lineColor": "rgb(31, 120, 193)",
|
602
|
+
"show": false
|
603
|
+
},
|
604
|
+
"tableColumn": "",
|
605
|
+
"targets": [
|
606
|
+
{
|
607
|
+
"groupBy": [],
|
608
|
+
"measurement": "rails",
|
609
|
+
"orderByTime": "ASC",
|
610
|
+
"policy": "default",
|
611
|
+
"refId": "A",
|
612
|
+
"resultFormat": "time_series",
|
613
|
+
"select": [
|
614
|
+
[
|
615
|
+
{
|
616
|
+
"params": [
|
617
|
+
"cache_hits"
|
618
|
+
],
|
619
|
+
"type": "field"
|
620
|
+
},
|
621
|
+
{
|
622
|
+
"params": [
|
623
|
+
" / \"count\" * 100"
|
624
|
+
],
|
625
|
+
"type": "math"
|
626
|
+
}
|
627
|
+
]
|
628
|
+
],
|
629
|
+
"tags": [
|
630
|
+
{
|
631
|
+
"key": "location",
|
632
|
+
"operator": "=~",
|
633
|
+
"value": "/^$Action$/"
|
634
|
+
},
|
635
|
+
{
|
636
|
+
"condition": "AND",
|
637
|
+
"key": "hook",
|
638
|
+
"operator": "=",
|
639
|
+
"value": "render_collection"
|
640
|
+
}
|
641
|
+
]
|
642
|
+
}
|
643
|
+
],
|
644
|
+
"thresholds": "10,80",
|
645
|
+
"title": "Cache hits",
|
646
|
+
"type": "singlestat",
|
647
|
+
"valueFontSize": "80%",
|
648
|
+
"valueMaps": [
|
649
|
+
{
|
650
|
+
"op": "=",
|
651
|
+
"text": "N/A",
|
652
|
+
"value": "null"
|
653
|
+
}
|
654
|
+
],
|
655
|
+
"valueName": "avg"
|
656
|
+
},
|
657
|
+
{
|
658
|
+
"aliasColors": {},
|
659
|
+
"bars": false,
|
660
|
+
"dashLength": 10,
|
661
|
+
"dashes": false,
|
662
|
+
"datasource": "${DS_INFLUXDB}",
|
663
|
+
"fill": 1,
|
664
|
+
"fillGradient": 0,
|
665
|
+
"gridPos": {
|
666
|
+
"h": 8,
|
667
|
+
"w": 13,
|
668
|
+
"x": 0,
|
669
|
+
"y": 4
|
670
|
+
},
|
671
|
+
"id": 20,
|
672
|
+
"legend": {
|
673
|
+
"avg": false,
|
674
|
+
"current": false,
|
675
|
+
"max": false,
|
676
|
+
"min": false,
|
677
|
+
"show": false,
|
678
|
+
"total": false,
|
679
|
+
"values": false
|
680
|
+
},
|
681
|
+
"lines": true,
|
682
|
+
"linewidth": 1,
|
683
|
+
"links": [],
|
684
|
+
"nullPointMode": "null",
|
685
|
+
"options": {
|
686
|
+
"dataLinks": []
|
687
|
+
},
|
688
|
+
"percentage": false,
|
689
|
+
"pointradius": 5,
|
690
|
+
"points": false,
|
691
|
+
"renderer": "flot",
|
692
|
+
"seriesOverrides": [
|
693
|
+
{
|
694
|
+
"alias": "rails.max",
|
695
|
+
"fillBelowTo": "rails.min",
|
696
|
+
"lines": false
|
697
|
+
},
|
698
|
+
{
|
699
|
+
"alias": "rails.min",
|
700
|
+
"lines": false
|
701
|
+
}
|
702
|
+
],
|
703
|
+
"spaceLength": 10,
|
704
|
+
"stack": false,
|
705
|
+
"steppedLine": false,
|
706
|
+
"targets": [
|
707
|
+
{
|
708
|
+
"groupBy": [
|
709
|
+
{
|
710
|
+
"params": [
|
711
|
+
"$__interval"
|
712
|
+
],
|
713
|
+
"type": "time"
|
714
|
+
},
|
715
|
+
{
|
716
|
+
"params": [
|
717
|
+
"0"
|
718
|
+
],
|
719
|
+
"type": "fill"
|
720
|
+
}
|
721
|
+
],
|
722
|
+
"measurement": "rails",
|
723
|
+
"orderByTime": "ASC",
|
724
|
+
"policy": "default",
|
725
|
+
"refId": "A",
|
726
|
+
"resultFormat": "time_series",
|
727
|
+
"select": [
|
728
|
+
[
|
729
|
+
{
|
730
|
+
"params": [
|
731
|
+
"controller"
|
732
|
+
],
|
733
|
+
"type": "field"
|
734
|
+
},
|
735
|
+
{
|
736
|
+
"params": [],
|
737
|
+
"type": "mean"
|
738
|
+
}
|
739
|
+
]
|
740
|
+
],
|
741
|
+
"tags": [
|
742
|
+
{
|
743
|
+
"key": "method",
|
744
|
+
"operator": "=~",
|
745
|
+
"value": "/^$Action$/"
|
746
|
+
},
|
747
|
+
{
|
748
|
+
"condition": "AND",
|
749
|
+
"key": "hook",
|
750
|
+
"operator": "=",
|
751
|
+
"value": "process_action"
|
752
|
+
}
|
753
|
+
]
|
754
|
+
},
|
755
|
+
{
|
756
|
+
"groupBy": [
|
757
|
+
{
|
758
|
+
"params": [
|
759
|
+
"$__interval"
|
760
|
+
],
|
761
|
+
"type": "time"
|
762
|
+
},
|
763
|
+
{
|
764
|
+
"params": [
|
765
|
+
"0"
|
766
|
+
],
|
767
|
+
"type": "fill"
|
768
|
+
}
|
769
|
+
],
|
770
|
+
"measurement": "rails",
|
771
|
+
"orderByTime": "ASC",
|
772
|
+
"policy": "default",
|
773
|
+
"refId": "B",
|
774
|
+
"resultFormat": "time_series",
|
775
|
+
"select": [
|
776
|
+
[
|
777
|
+
{
|
778
|
+
"params": [
|
779
|
+
"controller"
|
780
|
+
],
|
781
|
+
"type": "field"
|
782
|
+
},
|
783
|
+
{
|
784
|
+
"params": [],
|
785
|
+
"type": "max"
|
786
|
+
}
|
787
|
+
]
|
788
|
+
],
|
789
|
+
"tags": [
|
790
|
+
{
|
791
|
+
"key": "method",
|
792
|
+
"operator": "=~",
|
793
|
+
"value": "/^$Action$/"
|
794
|
+
},
|
795
|
+
{
|
796
|
+
"condition": "AND",
|
797
|
+
"key": "hook",
|
798
|
+
"operator": "=",
|
799
|
+
"value": "process_action"
|
800
|
+
}
|
801
|
+
]
|
802
|
+
},
|
803
|
+
{
|
804
|
+
"groupBy": [
|
805
|
+
{
|
806
|
+
"params": [
|
807
|
+
"$__interval"
|
808
|
+
],
|
809
|
+
"type": "time"
|
810
|
+
},
|
811
|
+
{
|
812
|
+
"params": [
|
813
|
+
"0"
|
814
|
+
],
|
815
|
+
"type": "fill"
|
816
|
+
}
|
817
|
+
],
|
818
|
+
"measurement": "rails",
|
819
|
+
"orderByTime": "ASC",
|
820
|
+
"policy": "default",
|
821
|
+
"refId": "C",
|
822
|
+
"resultFormat": "time_series",
|
823
|
+
"select": [
|
824
|
+
[
|
825
|
+
{
|
826
|
+
"params": [
|
827
|
+
"controller"
|
828
|
+
],
|
829
|
+
"type": "field"
|
830
|
+
},
|
831
|
+
{
|
832
|
+
"params": [],
|
833
|
+
"type": "min"
|
834
|
+
}
|
835
|
+
]
|
836
|
+
],
|
837
|
+
"tags": [
|
838
|
+
{
|
839
|
+
"key": "method",
|
840
|
+
"operator": "=~",
|
841
|
+
"value": "/^$Action$/"
|
842
|
+
},
|
843
|
+
{
|
844
|
+
"condition": "AND",
|
845
|
+
"key": "hook",
|
846
|
+
"operator": "=",
|
847
|
+
"value": "process_action"
|
848
|
+
}
|
849
|
+
]
|
850
|
+
}
|
851
|
+
],
|
852
|
+
"thresholds": [],
|
853
|
+
"timeFrom": null,
|
854
|
+
"timeRegions": [],
|
855
|
+
"timeShift": null,
|
856
|
+
"title": "Response time",
|
857
|
+
"tooltip": {
|
858
|
+
"shared": true,
|
859
|
+
"sort": 0,
|
860
|
+
"value_type": "individual"
|
861
|
+
},
|
862
|
+
"type": "graph",
|
863
|
+
"xaxis": {
|
864
|
+
"buckets": null,
|
865
|
+
"mode": "time",
|
866
|
+
"name": null,
|
867
|
+
"show": true,
|
868
|
+
"values": []
|
869
|
+
},
|
870
|
+
"yaxes": [
|
871
|
+
{
|
872
|
+
"decimals": null,
|
873
|
+
"format": "dtdurationms",
|
874
|
+
"label": "",
|
875
|
+
"logBase": 2,
|
876
|
+
"max": null,
|
877
|
+
"min": null,
|
878
|
+
"show": true
|
879
|
+
},
|
880
|
+
{
|
881
|
+
"format": "short",
|
882
|
+
"label": null,
|
883
|
+
"logBase": 1,
|
884
|
+
"max": null,
|
885
|
+
"min": null,
|
886
|
+
"show": true
|
887
|
+
}
|
888
|
+
],
|
889
|
+
"yaxis": {
|
890
|
+
"align": false,
|
891
|
+
"alignLevel": null
|
892
|
+
}
|
893
|
+
},
|
894
|
+
{
|
895
|
+
"columns": [],
|
896
|
+
"datasource": "${DS_INFLUXDB}",
|
897
|
+
"fontSize": "100%",
|
898
|
+
"gridPos": {
|
899
|
+
"h": 8,
|
900
|
+
"w": 11,
|
901
|
+
"x": 13,
|
902
|
+
"y": 4
|
903
|
+
},
|
904
|
+
"id": 26,
|
905
|
+
"links": [],
|
906
|
+
"options": {},
|
907
|
+
"pageSize": null,
|
908
|
+
"scroll": true,
|
909
|
+
"showHeader": true,
|
910
|
+
"sort": {
|
911
|
+
"col": 0,
|
912
|
+
"desc": true
|
913
|
+
},
|
914
|
+
"styles": [
|
915
|
+
{
|
916
|
+
"alias": "Time",
|
917
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
918
|
+
"pattern": "Time",
|
919
|
+
"type": "date"
|
920
|
+
},
|
921
|
+
{
|
922
|
+
"alias": "Reqest",
|
923
|
+
"colorMode": null,
|
924
|
+
"colors": [
|
925
|
+
"rgba(245, 54, 54, 0.9)",
|
926
|
+
"rgba(237, 129, 40, 0.89)",
|
927
|
+
"rgba(50, 172, 45, 0.97)"
|
928
|
+
],
|
929
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
930
|
+
"decimals": 2,
|
931
|
+
"link": true,
|
932
|
+
"linkTargetBlank": true,
|
933
|
+
"linkTooltip": "Show details of this request",
|
934
|
+
"linkUrl": "/d/$REQUEST_DASHBOARD_UID/ruby-on-rails-performance-per-request?orgId=1&var-request_id=${__cell}&from=${__cell_2}&to=${__cell_0}&var-method=${__cell_1}",
|
935
|
+
"mappingType": 1,
|
936
|
+
"pattern": "request_id",
|
937
|
+
"thresholds": [],
|
938
|
+
"type": "string",
|
939
|
+
"unit": "short"
|
940
|
+
},
|
941
|
+
{
|
942
|
+
"alias": "Response time",
|
943
|
+
"colorMode": null,
|
944
|
+
"colors": [
|
945
|
+
"rgba(245, 54, 54, 0.9)",
|
946
|
+
"rgba(237, 129, 40, 0.89)",
|
947
|
+
"rgba(50, 172, 45, 0.97)"
|
948
|
+
],
|
949
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
950
|
+
"decimals": 2,
|
951
|
+
"mappingType": 1,
|
952
|
+
"pattern": "controller",
|
953
|
+
"thresholds": [],
|
954
|
+
"type": "number",
|
955
|
+
"unit": "ms"
|
956
|
+
},
|
957
|
+
{
|
958
|
+
"alias": "Time",
|
959
|
+
"colorMode": null,
|
960
|
+
"colors": [
|
961
|
+
"rgba(245, 54, 54, 0.9)",
|
962
|
+
"rgba(237, 129, 40, 0.89)",
|
963
|
+
"rgba(50, 172, 45, 0.97)"
|
964
|
+
],
|
965
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
966
|
+
"decimals": 2,
|
967
|
+
"mappingType": 1,
|
968
|
+
"pattern": "started",
|
969
|
+
"thresholds": [],
|
970
|
+
"type": "hidden",
|
971
|
+
"unit": "short"
|
972
|
+
},
|
973
|
+
{
|
974
|
+
"alias": "",
|
975
|
+
"colorMode": null,
|
976
|
+
"colors": [
|
977
|
+
"rgba(245, 54, 54, 0.9)",
|
978
|
+
"rgba(237, 129, 40, 0.89)",
|
979
|
+
"rgba(50, 172, 45, 0.97)"
|
980
|
+
],
|
981
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
982
|
+
"decimals": 2,
|
983
|
+
"mappingType": 1,
|
984
|
+
"pattern": "method",
|
985
|
+
"thresholds": [],
|
986
|
+
"type": "hidden",
|
987
|
+
"unit": "short"
|
988
|
+
},
|
989
|
+
{
|
990
|
+
"alias": "",
|
991
|
+
"colorMode": null,
|
992
|
+
"colors": [
|
993
|
+
"rgba(245, 54, 54, 0.9)",
|
994
|
+
"rgba(237, 129, 40, 0.89)",
|
995
|
+
"rgba(50, 172, 45, 0.97)"
|
996
|
+
],
|
997
|
+
"decimals": 2,
|
998
|
+
"pattern": "/.*/",
|
999
|
+
"thresholds": [],
|
1000
|
+
"type": "number",
|
1001
|
+
"unit": "short"
|
1002
|
+
}
|
1003
|
+
],
|
1004
|
+
"targets": [
|
1005
|
+
{
|
1006
|
+
"groupBy": [
|
1007
|
+
{
|
1008
|
+
"params": [
|
1009
|
+
"method"
|
1010
|
+
],
|
1011
|
+
"type": "tag"
|
1012
|
+
}
|
1013
|
+
],
|
1014
|
+
"limit": "50",
|
1015
|
+
"measurement": "rails",
|
1016
|
+
"orderByTime": "DESC",
|
1017
|
+
"policy": "default",
|
1018
|
+
"refId": "A",
|
1019
|
+
"resultFormat": "table",
|
1020
|
+
"select": [
|
1021
|
+
[
|
1022
|
+
{
|
1023
|
+
"params": [
|
1024
|
+
"started"
|
1025
|
+
],
|
1026
|
+
"type": "field"
|
1027
|
+
}
|
1028
|
+
],
|
1029
|
+
[
|
1030
|
+
{
|
1031
|
+
"params": [
|
1032
|
+
"controller"
|
1033
|
+
],
|
1034
|
+
"type": "field"
|
1035
|
+
}
|
1036
|
+
],
|
1037
|
+
[
|
1038
|
+
{
|
1039
|
+
"params": [
|
1040
|
+
"request_id"
|
1041
|
+
],
|
1042
|
+
"type": "field"
|
1043
|
+
}
|
1044
|
+
]
|
1045
|
+
],
|
1046
|
+
"tags": [
|
1047
|
+
{
|
1048
|
+
"key": "method",
|
1049
|
+
"operator": "=~",
|
1050
|
+
"value": "/^$Action$/"
|
1051
|
+
},
|
1052
|
+
{
|
1053
|
+
"condition": "AND",
|
1054
|
+
"key": "hook",
|
1055
|
+
"operator": "=",
|
1056
|
+
"value": "process_action"
|
1057
|
+
}
|
1058
|
+
]
|
1059
|
+
}
|
1060
|
+
],
|
1061
|
+
"title": "Last requests",
|
1062
|
+
"transform": "table",
|
1063
|
+
"type": "table"
|
1064
|
+
},
|
1065
|
+
{
|
1066
|
+
"columns": [],
|
1067
|
+
"datasource": "${DS_INFLUXDB}",
|
1068
|
+
"fontSize": "100%",
|
1069
|
+
"gridPos": {
|
1070
|
+
"h": 15,
|
1071
|
+
"w": 13,
|
1072
|
+
"x": 0,
|
1073
|
+
"y": 12
|
1074
|
+
},
|
1075
|
+
"id": 2,
|
1076
|
+
"links": [],
|
1077
|
+
"options": {},
|
1078
|
+
"pageSize": null,
|
1079
|
+
"scroll": true,
|
1080
|
+
"showHeader": true,
|
1081
|
+
"sort": {
|
1082
|
+
"col": 5,
|
1083
|
+
"desc": true
|
1084
|
+
},
|
1085
|
+
"styles": [
|
1086
|
+
{
|
1087
|
+
"alias": "Time",
|
1088
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1089
|
+
"pattern": "Time",
|
1090
|
+
"type": "hidden"
|
1091
|
+
},
|
1092
|
+
{
|
1093
|
+
"alias": "Partial",
|
1094
|
+
"colorMode": null,
|
1095
|
+
"colors": [
|
1096
|
+
"rgba(245, 54, 54, 0.9)",
|
1097
|
+
"rgba(237, 129, 40, 0.89)",
|
1098
|
+
"rgba(50, 172, 45, 0.97)"
|
1099
|
+
],
|
1100
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1101
|
+
"decimals": 2,
|
1102
|
+
"mappingType": 1,
|
1103
|
+
"pattern": "filename",
|
1104
|
+
"sanitize": false,
|
1105
|
+
"thresholds": [],
|
1106
|
+
"type": "string",
|
1107
|
+
"unit": "short"
|
1108
|
+
},
|
1109
|
+
{
|
1110
|
+
"alias": "Count",
|
1111
|
+
"colorMode": null,
|
1112
|
+
"colors": [
|
1113
|
+
"rgba(245, 54, 54, 0.9)",
|
1114
|
+
"rgba(237, 129, 40, 0.89)",
|
1115
|
+
"rgba(50, 172, 45, 0.97)"
|
1116
|
+
],
|
1117
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1118
|
+
"decimals": 0,
|
1119
|
+
"mappingType": 1,
|
1120
|
+
"pattern": "count",
|
1121
|
+
"thresholds": [],
|
1122
|
+
"type": "number",
|
1123
|
+
"unit": "short"
|
1124
|
+
},
|
1125
|
+
{
|
1126
|
+
"alias": "Mean",
|
1127
|
+
"colorMode": null,
|
1128
|
+
"colors": [
|
1129
|
+
"rgba(245, 54, 54, 0.9)",
|
1130
|
+
"rgba(237, 129, 40, 0.89)",
|
1131
|
+
"rgba(50, 172, 45, 0.97)"
|
1132
|
+
],
|
1133
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1134
|
+
"decimals": 2,
|
1135
|
+
"mappingType": 1,
|
1136
|
+
"pattern": "mean",
|
1137
|
+
"thresholds": [],
|
1138
|
+
"type": "number",
|
1139
|
+
"unit": "ms"
|
1140
|
+
},
|
1141
|
+
{
|
1142
|
+
"alias": "Median",
|
1143
|
+
"colorMode": null,
|
1144
|
+
"colors": [
|
1145
|
+
"rgba(245, 54, 54, 0.9)",
|
1146
|
+
"rgba(237, 129, 40, 0.89)",
|
1147
|
+
"rgba(50, 172, 45, 0.97)"
|
1148
|
+
],
|
1149
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1150
|
+
"decimals": 2,
|
1151
|
+
"mappingType": 1,
|
1152
|
+
"pattern": "median",
|
1153
|
+
"thresholds": [],
|
1154
|
+
"type": "number",
|
1155
|
+
"unit": "ms"
|
1156
|
+
},
|
1157
|
+
{
|
1158
|
+
"alias": "Max",
|
1159
|
+
"colorMode": null,
|
1160
|
+
"colors": [
|
1161
|
+
"rgba(245, 54, 54, 0.9)",
|
1162
|
+
"rgba(237, 129, 40, 0.89)",
|
1163
|
+
"rgba(50, 172, 45, 0.97)"
|
1164
|
+
],
|
1165
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1166
|
+
"decimals": 2,
|
1167
|
+
"mappingType": 1,
|
1168
|
+
"pattern": "max",
|
1169
|
+
"thresholds": [],
|
1170
|
+
"type": "number",
|
1171
|
+
"unit": "ms"
|
1172
|
+
},
|
1173
|
+
{
|
1174
|
+
"alias": "",
|
1175
|
+
"colorMode": null,
|
1176
|
+
"colors": [
|
1177
|
+
"rgba(245, 54, 54, 0.9)",
|
1178
|
+
"rgba(237, 129, 40, 0.89)",
|
1179
|
+
"rgba(50, 172, 45, 0.97)"
|
1180
|
+
],
|
1181
|
+
"decimals": 2,
|
1182
|
+
"pattern": "/.*/",
|
1183
|
+
"thresholds": [],
|
1184
|
+
"type": "number",
|
1185
|
+
"unit": "short"
|
1186
|
+
}
|
1187
|
+
],
|
1188
|
+
"targets": [
|
1189
|
+
{
|
1190
|
+
"groupBy": [
|
1191
|
+
{
|
1192
|
+
"params": [
|
1193
|
+
"filename"
|
1194
|
+
],
|
1195
|
+
"type": "tag"
|
1196
|
+
}
|
1197
|
+
],
|
1198
|
+
"measurement": "rails",
|
1199
|
+
"orderByTime": "ASC",
|
1200
|
+
"policy": "default",
|
1201
|
+
"refId": "A",
|
1202
|
+
"resultFormat": "table",
|
1203
|
+
"select": [
|
1204
|
+
[
|
1205
|
+
{
|
1206
|
+
"params": [
|
1207
|
+
"value"
|
1208
|
+
],
|
1209
|
+
"type": "field"
|
1210
|
+
},
|
1211
|
+
{
|
1212
|
+
"params": [],
|
1213
|
+
"type": "count"
|
1214
|
+
}
|
1215
|
+
],
|
1216
|
+
[
|
1217
|
+
{
|
1218
|
+
"params": [
|
1219
|
+
"value"
|
1220
|
+
],
|
1221
|
+
"type": "field"
|
1222
|
+
},
|
1223
|
+
{
|
1224
|
+
"params": [],
|
1225
|
+
"type": "mean"
|
1226
|
+
}
|
1227
|
+
],
|
1228
|
+
[
|
1229
|
+
{
|
1230
|
+
"params": [
|
1231
|
+
"value"
|
1232
|
+
],
|
1233
|
+
"type": "field"
|
1234
|
+
},
|
1235
|
+
{
|
1236
|
+
"params": [],
|
1237
|
+
"type": "median"
|
1238
|
+
}
|
1239
|
+
],
|
1240
|
+
[
|
1241
|
+
{
|
1242
|
+
"params": [
|
1243
|
+
"value"
|
1244
|
+
],
|
1245
|
+
"type": "field"
|
1246
|
+
},
|
1247
|
+
{
|
1248
|
+
"params": [],
|
1249
|
+
"type": "max"
|
1250
|
+
}
|
1251
|
+
]
|
1252
|
+
],
|
1253
|
+
"tags": [
|
1254
|
+
{
|
1255
|
+
"key": "location",
|
1256
|
+
"operator": "=~",
|
1257
|
+
"value": "/^$Action$/"
|
1258
|
+
},
|
1259
|
+
{
|
1260
|
+
"condition": "AND",
|
1261
|
+
"key": "hook",
|
1262
|
+
"operator": "=",
|
1263
|
+
"value": "render_partial"
|
1264
|
+
}
|
1265
|
+
]
|
1266
|
+
}
|
1267
|
+
],
|
1268
|
+
"title": "Partials",
|
1269
|
+
"transform": "table",
|
1270
|
+
"type": "table"
|
1271
|
+
},
|
1272
|
+
{
|
1273
|
+
"columns": [],
|
1274
|
+
"datasource": "${DS_INFLUXDB}",
|
1275
|
+
"fontSize": "100%",
|
1276
|
+
"gridPos": {
|
1277
|
+
"h": 15,
|
1278
|
+
"w": 11,
|
1279
|
+
"x": 13,
|
1280
|
+
"y": 12
|
1281
|
+
},
|
1282
|
+
"id": 4,
|
1283
|
+
"links": [],
|
1284
|
+
"options": {},
|
1285
|
+
"pageSize": null,
|
1286
|
+
"scroll": true,
|
1287
|
+
"showHeader": true,
|
1288
|
+
"sort": {
|
1289
|
+
"col": 6,
|
1290
|
+
"desc": true
|
1291
|
+
},
|
1292
|
+
"styles": [
|
1293
|
+
{
|
1294
|
+
"alias": "Time",
|
1295
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1296
|
+
"pattern": "Time",
|
1297
|
+
"type": "hidden"
|
1298
|
+
},
|
1299
|
+
{
|
1300
|
+
"alias": "",
|
1301
|
+
"colorMode": null,
|
1302
|
+
"colors": [
|
1303
|
+
"rgba(245, 54, 54, 0.9)",
|
1304
|
+
"rgba(237, 129, 40, 0.89)",
|
1305
|
+
"rgba(50, 172, 45, 0.97)"
|
1306
|
+
],
|
1307
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1308
|
+
"decimals": 2,
|
1309
|
+
"mappingType": 1,
|
1310
|
+
"pattern": "SQL",
|
1311
|
+
"thresholds": [],
|
1312
|
+
"type": "string",
|
1313
|
+
"unit": "short"
|
1314
|
+
},
|
1315
|
+
{
|
1316
|
+
"alias": "Count",
|
1317
|
+
"colorMode": null,
|
1318
|
+
"colors": [
|
1319
|
+
"rgba(245, 54, 54, 0.9)",
|
1320
|
+
"rgba(237, 129, 40, 0.89)",
|
1321
|
+
"rgba(50, 172, 45, 0.97)"
|
1322
|
+
],
|
1323
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1324
|
+
"decimals": 0,
|
1325
|
+
"mappingType": 1,
|
1326
|
+
"pattern": "count",
|
1327
|
+
"thresholds": [],
|
1328
|
+
"type": "number",
|
1329
|
+
"unit": "short"
|
1330
|
+
},
|
1331
|
+
{
|
1332
|
+
"alias": "Mean",
|
1333
|
+
"colorMode": null,
|
1334
|
+
"colors": [
|
1335
|
+
"rgba(245, 54, 54, 0.9)",
|
1336
|
+
"rgba(237, 129, 40, 0.89)",
|
1337
|
+
"rgba(50, 172, 45, 0.97)"
|
1338
|
+
],
|
1339
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1340
|
+
"decimals": 2,
|
1341
|
+
"mappingType": 1,
|
1342
|
+
"pattern": "mean",
|
1343
|
+
"thresholds": [],
|
1344
|
+
"type": "number",
|
1345
|
+
"unit": "ms"
|
1346
|
+
},
|
1347
|
+
{
|
1348
|
+
"alias": "Median",
|
1349
|
+
"colorMode": null,
|
1350
|
+
"colors": [
|
1351
|
+
"rgba(245, 54, 54, 0.9)",
|
1352
|
+
"rgba(237, 129, 40, 0.89)",
|
1353
|
+
"rgba(50, 172, 45, 0.97)"
|
1354
|
+
],
|
1355
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1356
|
+
"decimals": 2,
|
1357
|
+
"mappingType": 1,
|
1358
|
+
"pattern": "median",
|
1359
|
+
"thresholds": [],
|
1360
|
+
"type": "number",
|
1361
|
+
"unit": "ms"
|
1362
|
+
},
|
1363
|
+
{
|
1364
|
+
"alias": "Name",
|
1365
|
+
"colorMode": null,
|
1366
|
+
"colors": [
|
1367
|
+
"rgba(245, 54, 54, 0.9)",
|
1368
|
+
"rgba(237, 129, 40, 0.89)",
|
1369
|
+
"rgba(50, 172, 45, 0.97)"
|
1370
|
+
],
|
1371
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1372
|
+
"decimals": 2,
|
1373
|
+
"mappingType": 1,
|
1374
|
+
"pattern": "name",
|
1375
|
+
"thresholds": [],
|
1376
|
+
"type": "number",
|
1377
|
+
"unit": "short"
|
1378
|
+
},
|
1379
|
+
{
|
1380
|
+
"alias": "Max",
|
1381
|
+
"colorMode": null,
|
1382
|
+
"colors": [
|
1383
|
+
"rgba(245, 54, 54, 0.9)",
|
1384
|
+
"rgba(237, 129, 40, 0.89)",
|
1385
|
+
"rgba(50, 172, 45, 0.97)"
|
1386
|
+
],
|
1387
|
+
"dateFormat": "YYYY-MM-DD HH:mm:ss",
|
1388
|
+
"decimals": 2,
|
1389
|
+
"mappingType": 1,
|
1390
|
+
"pattern": "max",
|
1391
|
+
"thresholds": [],
|
1392
|
+
"type": "number",
|
1393
|
+
"unit": "ms"
|
1394
|
+
},
|
1395
|
+
{
|
1396
|
+
"alias": "",
|
1397
|
+
"colorMode": null,
|
1398
|
+
"colors": [
|
1399
|
+
"rgba(245, 54, 54, 0.9)",
|
1400
|
+
"rgba(237, 129, 40, 0.89)",
|
1401
|
+
"rgba(50, 172, 45, 0.97)"
|
1402
|
+
],
|
1403
|
+
"decimals": 2,
|
1404
|
+
"pattern": "/.*/",
|
1405
|
+
"thresholds": [],
|
1406
|
+
"type": "number",
|
1407
|
+
"unit": "short"
|
1408
|
+
}
|
1409
|
+
],
|
1410
|
+
"targets": [
|
1411
|
+
{
|
1412
|
+
"groupBy": [
|
1413
|
+
{
|
1414
|
+
"params": [
|
1415
|
+
"name"
|
1416
|
+
],
|
1417
|
+
"type": "tag"
|
1418
|
+
}
|
1419
|
+
],
|
1420
|
+
"measurement": "rails",
|
1421
|
+
"orderByTime": "ASC",
|
1422
|
+
"policy": "default",
|
1423
|
+
"refId": "A",
|
1424
|
+
"resultFormat": "table",
|
1425
|
+
"select": [
|
1426
|
+
[
|
1427
|
+
{
|
1428
|
+
"params": [
|
1429
|
+
"value"
|
1430
|
+
],
|
1431
|
+
"type": "field"
|
1432
|
+
},
|
1433
|
+
{
|
1434
|
+
"params": [],
|
1435
|
+
"type": "count"
|
1436
|
+
}
|
1437
|
+
],
|
1438
|
+
[
|
1439
|
+
{
|
1440
|
+
"params": [
|
1441
|
+
"value"
|
1442
|
+
],
|
1443
|
+
"type": "field"
|
1444
|
+
},
|
1445
|
+
{
|
1446
|
+
"params": [],
|
1447
|
+
"type": "mean"
|
1448
|
+
}
|
1449
|
+
],
|
1450
|
+
[
|
1451
|
+
{
|
1452
|
+
"params": [
|
1453
|
+
"value"
|
1454
|
+
],
|
1455
|
+
"type": "field"
|
1456
|
+
},
|
1457
|
+
{
|
1458
|
+
"params": [],
|
1459
|
+
"type": "median"
|
1460
|
+
}
|
1461
|
+
],
|
1462
|
+
[
|
1463
|
+
{
|
1464
|
+
"params": [
|
1465
|
+
"value"
|
1466
|
+
],
|
1467
|
+
"type": "field"
|
1468
|
+
},
|
1469
|
+
{
|
1470
|
+
"params": [],
|
1471
|
+
"type": "max"
|
1472
|
+
}
|
1473
|
+
]
|
1474
|
+
],
|
1475
|
+
"tags": [
|
1476
|
+
{
|
1477
|
+
"key": "location",
|
1478
|
+
"operator": "=~",
|
1479
|
+
"value": "/^$Action$/"
|
1480
|
+
},
|
1481
|
+
{
|
1482
|
+
"condition": "AND",
|
1483
|
+
"key": "hook",
|
1484
|
+
"operator": "=",
|
1485
|
+
"value": "sql"
|
1486
|
+
}
|
1487
|
+
]
|
1488
|
+
}
|
1489
|
+
],
|
1490
|
+
"title": "SQL",
|
1491
|
+
"transform": "table",
|
1492
|
+
"type": "table"
|
1493
|
+
}
|
1494
|
+
],
|
1495
|
+
"refresh": false,
|
1496
|
+
"schemaVersion": 18,
|
1497
|
+
"style": "dark",
|
1498
|
+
"tags": [],
|
1499
|
+
"templating": {
|
1500
|
+
"list": [
|
1501
|
+
{
|
1502
|
+
"allValue": null,
|
1503
|
+
"current": {},
|
1504
|
+
"datasource": "${DS_INFLUXDB}",
|
1505
|
+
"definition": "",
|
1506
|
+
"hide": 0,
|
1507
|
+
"includeAll": false,
|
1508
|
+
"label": null,
|
1509
|
+
"multi": true,
|
1510
|
+
"name": "Action",
|
1511
|
+
"options": [],
|
1512
|
+
"query": "show tag values from \"rails\" with key = \"method\";",
|
1513
|
+
"refresh": 1,
|
1514
|
+
"regex": "",
|
1515
|
+
"skipUrlSync": false,
|
1516
|
+
"sort": 0,
|
1517
|
+
"tagValuesQuery": "",
|
1518
|
+
"tags": [],
|
1519
|
+
"tagsQuery": "",
|
1520
|
+
"type": "query",
|
1521
|
+
"useTags": false
|
1522
|
+
},
|
1523
|
+
{
|
1524
|
+
"current": {
|
1525
|
+
"value": "H8S9fSVWz",
|
1526
|
+
"text": "H8S9fSVWz"
|
1527
|
+
},
|
1528
|
+
"hide": 2,
|
1529
|
+
"label": null,
|
1530
|
+
"name": "REQUEST_DASHBOARD_UID",
|
1531
|
+
"options": [
|
1532
|
+
{
|
1533
|
+
"value": "H8S9fSVWz",
|
1534
|
+
"text": "H8S9fSVWz"
|
1535
|
+
}
|
1536
|
+
],
|
1537
|
+
"query": "H8S9fSVWz",
|
1538
|
+
"skipUrlSync": false,
|
1539
|
+
"type": "constant"
|
1540
|
+
}
|
1541
|
+
]
|
1542
|
+
},
|
1543
|
+
"time": {
|
1544
|
+
"from": "now-2d",
|
1545
|
+
"to": "now"
|
1546
|
+
},
|
1547
|
+
"timepicker": {
|
1548
|
+
"refresh_intervals": [
|
1549
|
+
"5s",
|
1550
|
+
"10s",
|
1551
|
+
"30s",
|
1552
|
+
"1m",
|
1553
|
+
"5m",
|
1554
|
+
"15m",
|
1555
|
+
"30m",
|
1556
|
+
"1h",
|
1557
|
+
"2h",
|
1558
|
+
"1d"
|
1559
|
+
],
|
1560
|
+
"time_options": [
|
1561
|
+
"5m",
|
1562
|
+
"15m",
|
1563
|
+
"1h",
|
1564
|
+
"6h",
|
1565
|
+
"12h",
|
1566
|
+
"24h",
|
1567
|
+
"2d",
|
1568
|
+
"7d",
|
1569
|
+
"30d"
|
1570
|
+
]
|
1571
|
+
},
|
1572
|
+
"timezone": "",
|
1573
|
+
"title": "Ruby On Rails Performance (per Action)",
|
1574
|
+
"uid": "Gpp3B1Pik",
|
1575
|
+
"version": 1
|
1576
|
+
}
|