Skip to content

Commit

Permalink
Drop InfluxDB/Grafana support for the GithubUsageTracker
Browse files Browse the repository at this point in the history
We don't currently use it, so it is just a maintenance burden.
If we want to resurrect we can always revert this PR.
  • Loading branch information
Fryguy committed Nov 16, 2023
1 parent f2d1888 commit c8027f1
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 135 deletions.
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ gem 'rails', '~> 5.2.8', '>= 5.2.8.1'
# Use PostgreSQL as the database for Active Record
gem 'pg'

# InfluxDB for Github rate limit tracking
gem 'influxdb', '~>0.3.13'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0.7'

Expand Down
4 changes: 0 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,10 @@ GEM
hashdiff (1.0.1)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
influxdb (0.3.17)
json
jquery-rails (4.4.0)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.6.2)
listen (3.7.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
Expand Down Expand Up @@ -360,7 +357,6 @@ DEPENDENCIES
foreman (~> 0.64.0)
haml (~> 5.1)
haml_lint (~> 0.35.0)
influxdb (~> 0.3.13)
jquery-rails
listen
manageiq-style
Expand Down
15 changes: 0 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,21 +197,6 @@ underscores replaced with hyphens.
repository with any rubocop problems, such as `MixedCaseConstant = 1`.
Wait a few minutes and see if it comments on your PR.

### InfluxDB and Grafana setup

The bot collects some optional data in a time series database
([InfluxDB](https://github.com/influxdata/influxdb)) and displays it in an
entirely separate user interface ([Grafana](http://grafana.org/)).

To use these features:

* Install and configure InfluxDB
* Enter the database name and credentials in your local settings yaml
* Install Grafana
* Enter the url of the running Grafana instance in your local settings yaml

Metrics tracking is optional and you should not need to do these extra steps to run miq_bot locally.

### Enabling and Disabling workers

By default, most workers are enabled for all repos (except for the MergeTargetTitler
Expand Down
4 changes: 0 additions & 4 deletions config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
github_credentials:
username:
password:
influxdb_credentials:
database:
username:
password:

# General settings
grafana:
Expand Down
5 changes: 0 additions & 5 deletions lib/github_service/response/ratelimit_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@ def initialize(app, logger = nil)
def on_complete(env)
api_calls_remaining = env.response_headers['x-ratelimit-remaining']
logger.info { "Executed #{env.method.to_s.upcase} #{env.url}...api calls remaining #{api_calls_remaining}" }
GithubUsageTracker.record_datapoint(
:requests_remaining => api_calls_remaining,
:uri => env.url.request_uri,
:timestamp => Time.parse(env.response_headers["date"])
)
end
end
end
Expand Down
47 changes: 0 additions & 47 deletions lib/github_usage_tracker.rb

This file was deleted.

57 changes: 0 additions & 57 deletions spec/lib/github_usage_tracker_spec.rb

This file was deleted.

0 comments on commit c8027f1

Please sign in to comment.