forked from devopsprodigy/kubegraf
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit f7b6794
Showing
197 changed files
with
18,186 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,11 @@ | ||
.idea | ||
yarn.lock | ||
node_modules | ||
package-lock.json | ||
|
||
forward_grafana | ||
mount_grafana | ||
prometheus | ||
start | ||
s_start | ||
test |
This file contains 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 @@ | ||
.idea | ||
yarn.lock | ||
node_modules | ||
package-lock.json |
This file contains 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,3 @@ | ||
FROM grafana/grafana:6.0.0 | ||
|
||
COPY . /var/lib/grafana/plugins/devopsprodigy-kubegraf |
This file contains 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,101 @@ | ||
module.exports = function(grunt) { | ||
require('load-grunt-tasks')(grunt); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-clean'); | ||
grunt.loadNpmTasks('grunt-typescript'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
|
||
grunt.initConfig({ | ||
clean: ['dist'], | ||
|
||
copy: { | ||
dist_js: { | ||
expand: true, | ||
cwd: 'src', | ||
src: ['**/*.ts', '**/*.d.ts'], | ||
dest: 'dist' | ||
}, | ||
dist_html: { | ||
expand: true, | ||
cwd: 'src', | ||
src: ['**/*.html', '**/*.json'], | ||
dest: 'dist' | ||
}, | ||
dist_img: { | ||
expand: true, | ||
flatten: true, | ||
cwd: 'src/img', | ||
src: ['*.*'], | ||
dest: 'dist/img/' | ||
}, | ||
dist_img_ds: { | ||
expand: true, | ||
flatten: true, | ||
cwd: 'src/datasource/img', | ||
src: ['*.*'], | ||
dest: 'dist/datasource/img/' | ||
}, | ||
dist_statics: { | ||
expand: true, | ||
flatten: true, | ||
src: ['src/plugin.json', 'LICENSE', 'README.md', 'src/query_help.md'], | ||
dest: 'dist/' | ||
} | ||
}, | ||
|
||
typescript: { | ||
build: { | ||
src: ['dist/**/*.ts', '!**/*.d.ts'], | ||
dest: 'dist', | ||
options: { | ||
module: 'system', | ||
target: 'es5', | ||
rootDir: 'dist/', | ||
declaration: true, | ||
emitDecoratorMetadata: true, | ||
experimentalDecorators: true, | ||
sourceMap: true, | ||
noImplicitAny: false, | ||
moduleResolution: "node" | ||
} | ||
} | ||
}, | ||
|
||
sass: { | ||
build: { | ||
files: [ | ||
{ | ||
expand: true, | ||
cwd: 'src/sass', | ||
src: ['*.sass'], | ||
dest: 'dist/css', | ||
ext: '.css' | ||
} | ||
] | ||
} | ||
}, | ||
|
||
watch: { | ||
files: ['src/**/*.ts', 'src/**/*.html', 'src/**/*.sass', 'src/images/*.*', 'src/dashboards/*.json', 'src/plugin.json', 'README.md', 'src/query_help.md', 'src/datasource/plugin.json'], | ||
tasks: ['default'], | ||
options: { | ||
debounceDelay: 250, | ||
}, | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-sass'); | ||
grunt.loadNpmTasks('grunt-sass'); | ||
|
||
grunt.registerTask('default', [ | ||
'clean', | ||
'sass', | ||
'copy:dist_js', | ||
'typescript:build', | ||
'copy:dist_html', | ||
'copy:dist_img', | ||
'copy:dist_img_ds', | ||
'copy:dist_statics', | ||
]); | ||
}; |
This file contains 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,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 DevOpsProdigy | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains 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,100 @@ | ||
#Kubernetes plugin for Grafana | ||
|
||
An updated version of the Grafana App for Kubernetes plugin (https://grafana.com/plugins/grafana-kubernetes-app), this plugin allows you to visualize and analyze your Kubernetes cluster’s performance. It demonstrates in graphics the main service metrics and characteristics of the Kubernetes cluster. It also makes it easier to examine the application’s life cycle and error logs. | ||
|
||
## Requirements | ||
|
||
1. Grafana > 5.0.0 | ||
2. Prometheus + node-exporter + kube-state-metrics | ||
1. Grafana-piechart-panel | ||
|
||
## Features | ||
|
||
The plugin consists of three main info pages with detailed information about the Kubernetes cluster. | ||
|
||
### Applications overview | ||
|
||
- Logic map of applications; | ||
- Distribution of Kubernetes entities; | ||
- List of pod entities with life metrics; | ||
- Visual presentation of the application’s life cycle and its basic characteristics; | ||
- Description of the ports that allow access services in the cluster. | ||
|
||
 | ||
|
||
*Pic. 1: Applications overview* | ||
|
||
### Cluster status | ||
|
||
- Summary about the status of the cluster and the nodes within it; | ||
- Details of monitoring the application’s life cycle; | ||
- Visual presentation of where the services in the cluster servers are located. | ||
|
||
 | ||
|
||
*Pic. 2: Cluster status* | ||
|
||
### Nodes overview | ||
|
||
- Summary of cluster’s nodes; | ||
- Information about used and allocated resources (RAM, CPU utilization) and the number of pods; | ||
- Physical distribution of pods. | ||
|
||
 | ||
|
||
*Pic. 3: Nodes overview* | ||
|
||
###Dashboards | ||
|
||
Besides providing general information on the main pages, the plugin allows you to track a cluster’s performance in graphs, which are located on five dashboards. | ||
|
||
- ** node dashboard** | ||
|
||
This is a dashboard with node metrics. It displays the employment of resources like CPU utilization, memory consumption, percentage of CPU time in idle / iowait modes, and disk and network status. | ||
|
||
 | ||
|
||
*Pic. 4: Node dashboard * | ||
|
||
- **pod resources ** | ||
|
||
Displays how much of the resources the selected pod has used. | ||
|
||
 | ||
|
||
*Pic. 5: Pod resources* | ||
|
||
- **deployment dashboard ** | ||
|
||
 | ||
|
||
*Pic. 6: Deployment dashboard* | ||
|
||
- **statefulsets dashboard ** | ||
- **daemonsets dashboard ** | ||
|
||
The above three dashboards show the number of available / unavailable application replicas and the status of containers in the pods of these applications, and trace containers’ restarts. | ||
|
||
### Installation | ||
|
||
Install by using git-clone. | ||
|
||
1. Go to the plugins directory in Grafana: | ||
|
||
`cd $GRAFANA_PATH/data/plugins` | ||
|
||
2. Copy repository: | ||
|
||
`git clone https:// /var/lib/grafana/plugins` | ||
or | ||
`grafana-cli plugins install devopsprodigy-kubegraf` | ||
|
||
3. Go to /configuration-plugins in Grafana and click on the plugin. Then click “enable”. | ||
|
||
4. Go to the plugin and select “create cluster”. | ||
|
||
5. Enter the settings of http-access to the Kubernetes api server. | ||
|
||
6. Open the “additional datasources” drop-down list and select the prometheus that is used in this cluster. |
This file contains 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,22 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 DevOpsProdigy | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
This file contains 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,100 @@ | ||
#Kubernetes plugin for Grafana | ||
|
||
An updated version of the Grafana App for Kubernetes plugin (https://grafana.com/plugins/grafana-kubernetes-app), this plugin allows you to visualize and analyze your Kubernetes cluster’s performance. It demonstrates in graphics the main service metrics and characteristics of the Kubernetes cluster. It also makes it easier to examine the application’s life cycle and error logs. | ||
|
||
## Requirements | ||
|
||
1. Grafana > 5.0.0 | ||
2. Prometheus + node-exporter + kube-state-metrics | ||
1. Grafana-piechart-panel | ||
|
||
## Features | ||
|
||
The plugin consists of three main info pages with detailed information about the Kubernetes cluster. | ||
|
||
### Applications overview | ||
|
||
- Logic map of applications; | ||
- Distribution of Kubernetes entities; | ||
- List of pod entities with life metrics; | ||
- Visual presentation of the application’s life cycle and its basic characteristics; | ||
- Description of the ports that allow access services in the cluster. | ||
|
||
 | ||
|
||
*Pic. 1: Applications overview* | ||
|
||
### Cluster status | ||
|
||
- Summary about the status of the cluster and the nodes within it; | ||
- Details of monitoring the application’s life cycle; | ||
- Visual presentation of where the services in the cluster servers are located. | ||
|
||
 | ||
|
||
*Pic. 2: Cluster status* | ||
|
||
### Nodes overview | ||
|
||
- Summary of cluster’s nodes; | ||
- Information about used and allocated resources (RAM, CPU utilization) and the number of pods; | ||
- Physical distribution of pods. | ||
|
||
 | ||
|
||
*Pic. 3: Nodes overview* | ||
|
||
###Dashboards | ||
|
||
Besides providing general information on the main pages, the plugin allows you to track a cluster’s performance in graphs, which are located on five dashboards. | ||
|
||
- ** node dashboard** | ||
|
||
This is a dashboard with node metrics. It displays the employment of resources like CPU utilization, memory consumption, percentage of CPU time in idle / iowait modes, and disk and network status. | ||
|
||
 | ||
|
||
*Pic. 4: Node dashboard * | ||
|
||
- **pod resources ** | ||
|
||
Displays how much of the resources the selected pod has used. | ||
|
||
 | ||
|
||
*Pic. 5: Pod resources* | ||
|
||
- **deployment dashboard ** | ||
|
||
 | ||
|
||
*Pic. 6: Deployment dashboard* | ||
|
||
- **statefulsets dashboard ** | ||
- **daemonsets dashboard ** | ||
|
||
The above three dashboards show the number of available / unavailable application replicas and the status of containers in the pods of these applications, and trace containers’ restarts. | ||
|
||
### Installation | ||
|
||
Install by using git-clone. | ||
|
||
1. Go to the plugins directory in Grafana: | ||
|
||
`cd $GRAFANA_PATH/data/plugins` | ||
|
||
2. Copy repository: | ||
|
||
`git clone https:// /var/lib/grafana/plugins` | ||
or | ||
`grafana-cli plugins install devopsprodigy-kubegraf` | ||
|
||
3. Go to /configuration-plugins in Grafana and click on the plugin. Then click “enable”. | ||
|
||
4. Go to the plugin and select “create cluster”. | ||
|
||
5. Enter the settings of http-access to the Kubernetes api server. | ||
|
||
6. Open the “additional datasources” drop-down list and select the prometheus that is used in this cluster. |
This file contains 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,9 @@ | ||
declare const ERROR: number; | ||
declare const WARNING: number; | ||
declare const TERMINATING: number; | ||
declare const SUCCESS: number; | ||
declare const COLOR_YELLOW: string; | ||
declare const COLOR_RED: string; | ||
declare const COLOR_GREEN: string; | ||
declare const PODS_LIMIT: number; | ||
export { ERROR, WARNING, TERMINATING, SUCCESS, COLOR_YELLOW, COLOR_RED, COLOR_GREEN, PODS_LIMIT }; |
Oops, something went wrong.