-
Notifications
You must be signed in to change notification settings - Fork 12
Monitoring #46
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
Open
vijayaji
wants to merge
18
commits into
DigitalEarns:dev
Choose a base branch
from
vijayaji:monitoring
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Monitoring #46
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
41e54da
Removed config that disables shared-folder
8e16215
Added new role
bf243b1
Update Makefile
3bd1c8e
Fixed Makefile and Updated Meta for Common Role
1339b59
Added documentation for ubuntu.
Ranjandas 1e5ab4c
Fixed typo
a0da64a
Fixed typo
7571137
Added etcd role
41de129
Added docker multihost networking configuration using etcd backend.
115055e
Fix etcd and docker configuration file template variable names
f156e45
setting up docker swarm with one master node
sebinjohn 5c31950
review comments
sebinjohn 58aa388
modifying ansible configurations and updating docs
sebinjohn 366ed9a
Swarm HA Implementation
88e28f4
Merge remote-tracking branch 'upstream/dev' into dev
4945405
Merge branch 'dev' of https://github.com/DigitalEarns/upswing into dev
b44e944
One of the proposed monitoring solutions. Telegraf+Influx+Grafana
12db6d9
Fixing the template file not found error
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,9 @@ node-[1:3] | |
|
|
||
| [vagrant:children] | ||
| nodes | ||
|
|
||
| [influxdb_server] | ||
| node-1 | ||
|
|
||
| [grafana_server] | ||
| node-1 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| # defaults file for grafana | ||
| grafana: | ||
| version: 3.0.1-1 | ||
| host: 192.168.44.11 | ||
| port: 3000 | ||
| admin: admin | ||
| admin_password: admin | ||
| conf_dir: /etc/grafana | ||
| root: /var/lib/grafana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| [grafana] | ||
| name=grafana | ||
| baseurl=https://packagecloud.io/grafana/stable/el/6/$basearch | ||
| enabled=1 | ||
| gpgcheck=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| --- | ||
| # handlers file for grafana | ||
| - name: restart grafana | ||
| service: name=grafana-server state=restarted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| --- | ||
| galaxy_info: | ||
| author: Jishnu Vijayan | ||
| description: Monitoring solution for upswing | ||
| company: DigitalEarns (Infrastructure) | ||
| # If the issue tracker for your role is not on github, uncomment the | ||
| # next line and provide a value | ||
| # issue_tracker_url: http://example.com/issue/tracker | ||
| # Some suggested licenses: | ||
| # - BSD (default) | ||
| # - MIT | ||
| # - GPLv2 | ||
| # - GPLv3 | ||
| # - Apache | ||
| # - CC-BY | ||
| license: license (GPLv2, CC-BY, etc) | ||
| min_ansible_version: 1.2 | ||
| # | ||
| # Below are all platforms currently available. Just uncomment | ||
| # the ones that apply to your role. If you don't see your | ||
| # platform on this list, let us know and we'll get it added! | ||
| # | ||
| #platforms: | ||
| # | ||
| # Below are all categories currently available. Just as with | ||
| # the platforms above, uncomment those that apply to your role. | ||
| # | ||
| #categories: | ||
| dependencies: [] | ||
| # List your role dependencies here, one per line. | ||
| # Be sure to remove the '[]' above if you add dependencies | ||
| # to this list. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| - include_vars: ../../telegraf/defaults/main.yml | ||
|
|
||
| - name: configure grafana repo | ||
| copy: src=grafana.repo dest=/etc/yum.repos.d/grafana.repo owner=root group=root | ||
|
|
||
| - name: install grafana | ||
| yum: name=grafana-{{ grafana.version }} state=present | ||
|
|
||
| - name: configure grafana | ||
| template: src=grafana.ini.j2 dest={{ grafana.conf_dir }}/grafana.ini | ||
| notify: | ||
| - restart grafana | ||
|
|
||
| - meta: flush_handlers | ||
|
|
||
| - name: start grafana-server | ||
| service: name=grafana-server enabled=yes state=started | ||
|
|
||
| - name: install python-httplib2.noarch | ||
| yum: name=python-httplib2.noarch state=present | ||
|
|
||
| - wait_for: port={{ grafana.port }} delay=10 timeout=20 | ||
|
|
||
| - name: setup upswing datasource in grafana | ||
| uri: | ||
| url: http://{{ grafana.host }}:{{ grafana.port }}/api/datasources | ||
| method: POST | ||
| body: "{{ lookup('template','datasource.json') }}" | ||
| user: "{{ grafana.admin }}" | ||
| password: "{{ grafana.admin_password }}" | ||
| force_basic_auth: yes | ||
| body_format: json | ||
| HEADER_Content-Type: "application/json" | ||
| status_code: 200,500 | ||
|
|
||
| - name: set up upswing dashboard | ||
| uri: | ||
| url: http://{{ grafana.host }}:{{ grafana.port }}/api/dashboards/db | ||
| method: POST | ||
| body: "{{ lookup('template','upswing_nodes.json') }}" | ||
| user: "{{ grafana.admin }}" | ||
| password: "{{ grafana.admin_password }}" | ||
| force_basic_auth: yes | ||
| body_format: json | ||
| HEADER_Content-Type: "application/json" | ||
| status_code: 200,412 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
|
|
||
| { | ||
| "name":"upswing_telegraf", | ||
| "type":"influxdb", | ||
| "access":"direct", | ||
| "isDefault":true, | ||
| "url":"http://{{ influxdb.host }}:{{ influxdb.port }}", | ||
| "user":"{{ telegraf.db.admin }}", | ||
| "password":"{{ telegraf.db.admin_password }}", | ||
| "database":"{{ telegraf.db.name }}", | ||
| "basicAuth":false, | ||
| "basicAuthUser":"", | ||
| "basicAuthPassword":"" | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ grafana.host }}could be rewritten as usinghostvarsandgroupsref: http://serverfault.com/questions/638507/how-to-access-host-variable-of-a-different-host-with-ansible