-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#158456560] Add a lot of metrics to the collector #3
Commits on Jun 21, 2018
-
Configuration menu - View commit details
-
Copy full SHA for 9d184a2 - Browse repository at this point
Copy the full SHA 9d184a2View commit details -
cloudwatch: Add more basic metrics
Add a bunch of additional basic metrics as listed in [1] We do not test these, as there is not such a point because we mock the service. In this commit, we add the most valuable metrics in our opinion. [1] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html
Configuration menu - View commit details
-
Copy full SHA for eb294d9 - Browse repository at this point
Copy the full SHA eb294d9View commit details -
cloudwatch: Add more RDS specific metrics
Add more metrics available in cloudwatch for RDS[1] We add them in a separate commit as we are not sure about the real value of these metrics. [1] https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/rds-metricscollected.html
Configuration menu - View commit details
-
Copy full SHA for 3861553 - Browse repository at this point
Copy the full SHA 3861553View commit details -
Add Tags as an attribute of the metrics.Metric object, which would be added when emitting the metric with loggregator.
Configuration menu - View commit details
-
Copy full SHA for e65ac27 - Browse repository at this point
Copy the full SHA e65ac27View commit details -
Add "source" tag to the current collectors
we add tags source=cloudwatch and source=sql to each existing collector.
Configuration menu - View commit details
-
Copy full SHA for c7bbbd2 - Browse repository at this point
Copy the full SHA c7bbbd2View commit details -
sql_collector allows include tags in queries
We want to add dynamic tags like database name, table name and so on to the metrics retrieved using SQL queries. For that we extend the sql connector, so that it will consider any additional column not defined as `MetricQueryMeta` as tags, and add it to the returned metrics.
Configuration menu - View commit details
-
Copy full SHA for 79e2ae2 - Browse repository at this point
Copy the full SHA 79e2ae2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 72f1c7b - Browse repository at this point
Copy the full SHA 72f1c7bView commit details -
postgres: sql query for dbsize and test DB
We want to include the dbname tag with the current name, because we might allow multiple DBs per service instance in the future. Currently we only offer one DB per instance, which shall be returned by the `brokerinfo.ConnectionString()`, so we only return only `current_database()`. We change the test to create a temporary test DB with a random DB and delete it after the test. We had to kill all active connection before DROP that database using SQL commands, because golang sql.DB does keep a pool of connections and we did not find a way to close them explicitely.
Configuration menu - View commit details
-
Copy full SHA for c67cc8e - Browse repository at this point
Copy the full SHA c67cc8eView commit details -
postgres: DB deadlocks counter metric
The deadlocks counter metric keeps a counter of how many deadlocks have occurred per DB. A deadlock means that one transaction had to be cancelled. We add a test that simulates a deadlock. We only report `current_database()` for the time being as our broker only offers one DB per instance, but we might allow more later. We include the tag `dbname`. The example code to simulate the deadlock has been borrowed from: https://www.depesz.com/2012/02/09/waiting-for-9-2-deadlock-counter/
Configuration menu - View commit details
-
Copy full SHA for 28b1ca0 - Browse repository at this point
Copy the full SHA 28b1ca0View commit details -
postgres: seq_scan and idx_scan per table
We get the stats collector generated metric seq_scan and idx_scan for each table. We add the tags for the table_name. The dbname is forced to be `current_database()` but we might emit for all the DBs if we offer more databases per instance. We add a index to the films table and try to run queries that does a scan and a index to check the counter.
Configuration menu - View commit details
-
Copy full SHA for ce71d31 - Browse repository at this point
Copy the full SHA ce71d31View commit details -
postgres: idx_scan includes index_name tag
Use the pg_stat_user_indexes tables to enrich the metric with the index name.
Configuration menu - View commit details
-
Copy full SHA for 1b4937e - Browse repository at this point
Copy the full SHA 1b4937eView commit details -
postgres: max_connections setting
Return the max_connections allowed in the postgred server. This number is per configuration in the RDS parameter group[1], and it is constant. We report this value in the marketplace description, but it might be handy for the tenant to create dynamic dashboards and alerts, rather than hardcode values. [1] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html
Configuration menu - View commit details
-
Copy full SHA for 941699d - Browse repository at this point
Copy the full SHA 941699dView commit details -
postgres: table_size per table
Report the table_size in bytes per table. We include the table_name tag. The dbname tag is forced to be `current_database()` but we might emit for all the DBs if we offer more databases per instance.
Configuration menu - View commit details
-
Copy full SHA for 30e72a5 - Browse repository at this point
Copy the full SHA 30e72a5View commit details -
postgres: Add more metrics from pg_stat_database
Add counter of commit/rollback transactions, read/hit block couter, read/write time and temporary bytes. See [1] [1] https://www.postgresql.org/docs/9.2/static/monitoring-stats.html#PG-STAT-DATABASE-VIEW
Configuration menu - View commit details
-
Copy full SHA for 570ef97 - Browse repository at this point
Copy the full SHA 570ef97View commit details -
postgres: Metric for blocked_connections
We test this with the deadlock test.
Configuration menu - View commit details
-
Copy full SHA for 4b9ff46 - Browse repository at this point
Copy the full SHA 4b9ff46View commit details -
postgres: report max age of running transactions
max_tx_age, transactions lasting too long indicate trouble[1]: transactions lasting too long, transactions not closed properly, slow queries or operations, etc. This metric will report the maximum transaction age in the moment the query is reported, but it will likely miss transactions shorter than the metric collection interval. [1] https://russ.garrett.co.uk/2015/10/02/postgres-monitoring-cheatsheet/
Configuration menu - View commit details
-
Copy full SHA for 4ed4817 - Browse repository at this point
Copy the full SHA 4ed4817View commit details
Commits on Jun 22, 2018
-
ci/blackbox: Test for any cloudwatch metrics
The CPUUTilization takes a while to appear. Consider the test OK if any cloudwatch metric is received.
Configuration menu - View commit details
-
Copy full SHA for 3508ce7 - Browse repository at this point
Copy the full SHA 3508ce7View commit details