Skip to content

Commit

Permalink
Merge pull request #9 from yaacov/remove-cadvisor
Browse files Browse the repository at this point in the history
Remove cadvisor
  • Loading branch information
yaacov authored Sep 5, 2017
2 parents 626660c + 496cd93 commit e88c65c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 739 deletions.
36 changes: 0 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,42 +173,6 @@ prometheus.targets()
```

#### cAdvisor specialize client

A cAdvisor client is a client that add object specific labels to each REST call,
objects available are Node, Pod and Container.

###### Node

Add the instance label, user must declare the instance on client creation.

###### Pod

Add the pod_name label, user must declare the pod_name on client creation.

###### Container

Add the container_name and pod_name labels, user must declare container_name and pod_name on client creation.

###### Example

```ruby

# create a client for cAdvisor metrics of a Node instance 'example.com'
# connected to a Prometheus server listening on http://example.com:8080
prometheus = Prometheus::ApiClient::Cadvisor::Node.new(
instance: 'example.com',
url: 'http://example.com:8080',
)

# send a query request to server
prometheus.query(query: 'sum(container_cpu_usage_seconds_total)')
```
```
# response from server:
{"resultType"=>"vector", "result"=>[{"metric"=>{}, "value"=>[1502350741.161, "6606.310387038"]}]}
```

## Tests

Install necessary development gems with `bundle install` and run tests with
Expand Down
21 changes: 0 additions & 21 deletions examples/cadvisor.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/prometheus/api_client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
require 'uri'
require 'openssl'
require 'prometheus/api_client/client'
require 'prometheus/api_client/cadvisor'

module Prometheus
# Api Client is a ruby implementation for a Prometheus compatible api_client.
Expand Down
90 changes: 0 additions & 90 deletions lib/prometheus/api_client/cadvisor.rb

This file was deleted.

192 changes: 0 additions & 192 deletions spec/prometheus/api_client/cadvisor_spec.rb

This file was deleted.

Loading

0 comments on commit e88c65c

Please sign in to comment.