Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Remove grafana collector (#892)
Browse files Browse the repository at this point in the history
* Remove grafana collector

* Remove extra file
  • Loading branch information
liubo0127 authored Aug 13, 2019
1 parent 94298d6 commit e3bea41
Show file tree
Hide file tree
Showing 32 changed files with 1,492 additions and 1,818 deletions.
47 changes: 0 additions & 47 deletions conf/grafana_collector.toml

This file was deleted.

1 change: 0 additions & 1 deletion deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
- grafana
roles:
- grafana
- grafana_collector

- name: deploying kafka_exporter
hosts: kafka_exporter_servers
Expand Down
18 changes: 0 additions & 18 deletions graceful_stop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,21 +343,3 @@
port: "{{ grafana_port }}"
state: stopped
msg: "the grafana port {{ grafana_port }} is not down"

- name: stop grafana_collector by supervise
shell: cd {{ deploy_dir }}/scripts && ./stop_{{ item }}.sh
when: process_supervision == 'supervise'
with_items:
- grafana_collector

- name: stop grafana_collector by systemd
systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=stopped
become: true
when: process_supervision == 'systemd'

- name: wait until the grafana_collector port is down
wait_for:
host: "{{ ansible_host }}"
port: "{{ grafana_collector_port }}"
state: stopped
msg: "the grafana_collector port {{ grafana_collector_port }} is not down"
1 change: 0 additions & 1 deletion group_vars/grafana_servers.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---

grafana_port: 3000
grafana_collector_port: 8686

grafana_api_keys_dir: "{{ playbook_dir }}/conf/keys"
17 changes: 0 additions & 17 deletions migrate_monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@

roles:
- grafana
- grafana_collector

post_tasks:
- name: start grafana by supervise
Expand All @@ -281,21 +280,6 @@
host={{ ansible_host }} port={{ grafana_port }} state=present
send='GET /login HTTP/1.0\r\n\r\n' search_regex='200 OK'
- name: start grafana_collector by supervise
shell: cd {{ deploy_dir }}/scripts && ./start_{{ item }}.sh
when: process_supervision == 'supervise'
with_items:
- grafana_collector

- name: start grafana_collector by systemd
systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=started enabled=no
when: process_supervision == 'systemd'
become: true

- name: wait for grafana_collector up
wait_for: |
host={{ ansible_host }} port={{ grafana_collector_port }} state=present
- set_fact:
grafana_host: "{{ ansible_host }}"

Expand All @@ -317,7 +301,6 @@
- grafana_dest_config:
name: "{{ cluster_name | title }}"
url: "http://{{ grafana_host }}:{{ grafana_port }}/"
report_url: "http://{{ grafana_host }}:{{ grafana_collector_port }}/"
user: "{{ grafana_admin_user }}"
password: "{{ grafana_admin_password }}"
apikey: "{{ lookup('file', grafana_api_keys_dir + '/grafana_apikey.key') }}"
Expand Down
8 changes: 0 additions & 8 deletions roles/grafana_collector/defaults/main.yml

This file was deleted.

4 changes: 0 additions & 4 deletions roles/grafana_collector/meta/main.yml

This file was deleted.

26 changes: 0 additions & 26 deletions roles/grafana_collector/tasks/binary_deployment.yml

This file was deleted.

15 changes: 0 additions & 15 deletions roles/grafana_collector/tasks/main.yml

This file was deleted.

8 changes: 0 additions & 8 deletions roles/grafana_collector/tasks/supervise_deployment.yml

This file was deleted.

8 changes: 0 additions & 8 deletions roles/grafana_collector/tasks/systemd_deployment.yml

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions roles/local/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@
with_items:
- fio

- name: cp grafana_collector binary and fonts
shell: >
cp -rv {{ downloads_dir }}/grafana_collector-latest-linux-amd64/* "{{ resources_dir }}/bin/"
- name: cp kafka_exporter binary
shell: >
cp -v {{ downloads_dir }}/kafka_exporter-*/{{ item }} "{{ resources_dir }}/bin/"
Expand Down
3 changes: 0 additions & 3 deletions roles/local/templates/common_packages.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ common_packages:
version: 3.8
url: "http://download.pingcap.org/fio-3.8.tar.gz"
checksum: "sha256:15739abde7e74b59ac59df57f129b14fc5cd59e1e2eca2ce37b41f8c289c3d58"
- name: grafana_collector
version: latest
url: http://download.pingcap.org/grafana_collector-latest-linux-amd64.tar.gz
- name: kafka_exporter
version: 1.1.0
url: http://download.pingcap.org/kafka_exporter-1.1.0.linux-amd64.tar.gz
Expand Down
47 changes: 0 additions & 47 deletions rolling_update_monitor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,36 +351,8 @@
state: stopped
msg: "the grafana port {{ grafana_port }} is not down"

- name: check grafana_collector existed
stat:
path: "{{ deploy_dir }}/conf/grafana_collector.toml"
register: grafana_collector_config_file

- name: stop grafana_collector by supervise
shell: cd {{ deploy_dir }}/scripts && ./stop_{{ item }}.sh
when:
- process_supervision == 'supervise'
- grafana_collector_config_file.stat.exists == True
with_items:
- grafana_collector

- name: stop grafana_collector by systemd
systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=stopped
become: true
when:
- process_supervision == 'systemd'
- grafana_collector_config_file.stat.exists == True

- name: wait until the grafana_collector port is down
wait_for:
host: "{{ ansible_host }}"
port: "{{ grafana_collector_port }}"
state: stopped
msg: "the grafana_collector port {{ grafana_collector_port }} is not down"

roles:
- grafana
- grafana_collector

post_tasks:
- name: start grafana by supervise
Expand Down Expand Up @@ -409,24 +381,6 @@
retries: 12
delay: 5

- name: start grafana_collector by supervise
shell: cd {{ deploy_dir }}/scripts && ./start_{{ item }}.sh
when: process_supervision == 'supervise'
with_items:
- grafana_collector

- name: start grafana_collector by systemd
systemd: name=grafana_collector-{{ grafana_collector_port }}.service state=started enabled=no
when: process_supervision == 'systemd'
become: true

- name: wait until the grafana_collector port is up
wait_for:
host: "{{ ansible_host }}"
port: "{{ grafana_collector_port }}"
state: started
msg: "the grafana_collector port {{ grafana_collector_port }} is not up"

- set_fact:
grafana_host: "{{ ansible_host }}"

Expand All @@ -448,7 +402,6 @@
- grafana_dest_config:
name: "{{ cluster_name | title }}"
url: "http://{{ grafana_host }}:{{ grafana_port }}/"
report_url: "http://{{ grafana_host }}:{{ grafana_collector_port }}/"
user: "{{ grafana_admin_user }}"
password: "{{ grafana_admin_password }}"
apikey: "{{ lookup('file', grafana_api_keys_dir + '/grafana_apikey.key') }}"
Expand Down
Loading

0 comments on commit e3bea41

Please sign in to comment.