cookbook 'glances', '= 2.0.1'
glances (15) Versions 2.0.1 Follow2
Installs/Configures glances
cookbook 'glances', '= 2.0.1', :supermarket
knife supermarket install glances
knife supermarket download glances
glances Cookbook |
Installs/Configures glances on your server!
Requirements
cookbooks
spython
Platforms
The following platforms and versions are tested and supported using Opscode's test-kitchen:
- Ubuntu 16.04
- Ubuntu 18.04
- Debian 9
- Debian 10
- Centos 7
Recommended cookbooks
-
apt
for debian/ubuntu platforms -
build-essential
for all platforms
Attributes
glances::default
Key | Type | Description |
---|---|---|
[glances][extra_pip_packages] |
Array | List of extra packages (default: [pystache]) |
[glances][version] |
String | Glances package version (default: '') |
[glances][python] |
String | Python runtime (default: '3') |
[glances][config] |
Hash | Glances configuration |
glances::service
Key | Type | Description |
---|---|---|
[glances][service] |
Hash | Hash for service configuration |
Usage
glances::default
Just include glances
in your node's run_list
:
{ "name":"my_node", "run_list": [ "recipe[glances]" ] }
glances::service
Just include glances::service
in your node's run_list
:
{ "name":"my_node", "run_list": [ "recipe[glances::service]" ] }
This recipe is not compatible with Fedora.
Examples
Glances with python 2.6
{ "json_class": "Chef::Role", "chef_type": "role", "name":"glances-py26", "description": "Glances with python 2.6", "run_list": [ "recipe[glances]" ], "attributes": { "glances": { "extra_pip_packages": [ "logutils", "argparse" ] } } }
Glances server
{ "json_class": "Chef::Role", "chef_type": "role", "name":"glances-server", "description": "Glances server", "run_list": [ "recipe[glances::service]" ], "attributes": { "glances": { "service": { "RUN": "true", "DAEMON": "/usr/local/bin/glances", "DAEMON_ARGS": "-s -B 127.0.0.1 -p 1337" } } } }
Glances client
{ "json_class": "Chef::Role", "chef_type": "role", "name":"glances-client", "description": "Glances client", "run_list": [ "recipe[glances]" ], "attributes": { "glances": { "config": { "serverlist": { "server_1_name": "10.0.0.4", "server_1_alias": "Server 1", "server_1_port": "1337", "server_2_name": "10.0.0.5", "server_2_alias": "Server 2", "server_2_port": "1338" } } } } }
Glances process monitor
{ "json_class": "Chef::Role", "chef_type": "role", "name":"glances-proc-monitor", "description": "Glances process monitoring", "run_list": [ "recipe[glances]" ], "attributes": { "glances": { "config": { "monitor": { "list_1_description": "Glances", "list_1_regex": ".*/usr/local/bin/glances", "list_1_countmin": "1", "list_1_countmax": "1" } } } } }
Glances libnotify
{ "json_class": "Chef::Role", "chef_type": "role", "name":"glances-libnotify", "description": "Glances libnotify", "run_list": [ "recipe[glances]" ], "attributes": { "glances": { "config": { "sensors": { "battery_critical_action": "notify-send -u critical -i terminal BAT \"Critical: {{label}} {{value}}%%\"", "battery_warning_action": "notify-send -u normal -i terminal BAT \"Warning: {{label}} {{value}}%%\"", "battery_careful_action": "notify-send -u low -i terminal BAT \"Careful: {{label}} {{value}}%%\"", "temperature_core_critical_action": "notify-send -u critical -i terminal TEMP \"Critical: Core {{label}} - {{value}}\u00b0C\"", "temperature_core_warning_action": "notify-send -u normal -i terminal TEMP \"Warning: Core {{label}} - {{value}}\u00b0C\"", "temperature_core_careful_action": "notify-send -u low -i terminal TEMP \"Careful: Core {{label}} - {{value}}\u00b0C\"" }, "fs": { "critical_action": "notify-send -u critical -i terminal FileSystem \"Critical: {{mnt_point}} - {{percent}}%% used\"", "warning_action": "notify-send -u normal -i terminal FileSystem \"Warning: {{mnt_point}} - {{percent}}%% used\"", "careful_action": "notify-send -u low -i terminal FileSystem \"Careful: {{mnt_point}} - {{percent}}%% used\"" }, "memswap": { "critical_action": "notify-send -u critical -i terminal SWAP \"Critical: {{percent}}%%\"", "warning_action": "notify-send -u normal -i terminal SWAP \"Warning: {{percent}}%%\"", "careful_action": "notify-send -u low -i terminal SWAP \"Careful: {{percent}}%%\"" }, "mem": { "critical_action": "notify-send -u critical -i terminal MEMORY \"Critical: {{percent}}%%\"", "warning_action": "notify-send -u normal -i terminal MEMORY \"Warning : {{percent}}%%\"", "careful_action": "notify-send -u low -i terminal MEMORY \"Careful : {{percent}}%%\"" }, "load": { "critical_action": "notify-send -u critical -i terminal LOAD \"Critical: {{min1}} - {{min5}} - {{min15}}\"", "warning_action": "notify-send -u normal -i terminal LOAD \"Warning: {{min1}} - {{min5}} - {{min15}}\"", "careful_action": "notify-send -u low -i terminal LOAD \"Careful: {{min1}} - {{min5}} - {{min15}}\"" }, "cpu": { "steal_critical_action": "notify-send -u critical -i terminal CPU \"Critical steal: {{steal}}%%\"", "steal_warning_action": "notify-send -u normal -i terminal CPU \"Warning steal: {{steal}}%%\"", "steal_careful_action": "notify-send -u low -i terminal CPU \"Careful steal: {{steal}}%%\"", "iowait_critical_action": "notify-send -u critical -i terminal CPU \"Critical iowait: {{iowait}}%%\"", "iowait_warning_action": "notify-send -u normal -i terminal CPU \"Warning iowait: {{iowait}}%%\"", "iowait_careful_action": "notify-send -u low -i terminal CPU \"Careful iowait: {{iowait}}%%\"", "system_critical_action": "notify-send -u critical -i terminal CPU \"Critical system: {{system}}%%\"", "system_warning_action": "notify-send -u normal -i terminal CPU \"Warning system: {{system}}%%\"", "system_careful_action": "notify-send -u low -i terminal CPU \"Careful system: {{system}}%%\"", "user_critical_action": "notify-send -u critical -i terminal CPU \"Critical user: {{user}}%%\"", "user_warning_action": "notify-send -u normal -i terminal CPU \"Warning user: {{user}}%%\"", "user_careful_action": "notify-send -u low -i terminal CPU \"Careful user: {{user}}%%\"" } } } } }
Testing
See [TESTING.md](TESTING.md)
Contributing
See [CONTRIBUTING.md](CONTRIBUTING.md)
License and Authors
Authors: Sliim sliim@mailoo.org
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
glances CHANGELOG
This file is used to list changes made in each version of the glances cookbook.
2.0.1
- Fix Glances package name (capitalized)
2.0.0
- Use spython cookbook to manage python installs
- Remove poise-python dependency
- Set default python runtime to 3
- CI:
- Fix chefspec
- Fix cookstyle
- Use inspec instead of serverspec as kitchen verifier
- Enable kitchen docker in travis-ci
1.1.0
- Chef 13 compat
- Changed
python
dependency bypoise-python
1.0.6
- return 0 at the end of do_stop/do_start init scripts functions
1.0.5
- Fix service restart: Do not exit init scripts from function
1.0.4
- Fix centos init script
1.0.3
- Restart glances service when configuration or init script changed
1.0.2
- Reload daemon for systemd service
- Set system user for glances service
1.0.1
- Fixed specs..
1.0.0
-
glances::service
recipe to setup glances service - Supports
ubuntu
,debian
,centos
andfedora
platforms -
[glances][version]
attribute to install specific glances version -
[glances][daemon]
attribute is replaces by[glances][service]
for service config
0.3.0
- New attribute:
[glances][extra_pip_packages]
0.2.0
- Glances configuration improved
0.1.0
- Initial release of glances
Collaborator Number Metric
2.0.1 failed this metric
Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.
Contributing File Metric
2.0.1 passed this metric
Foodcritic Metric
2.0.1 passed this metric
No Binaries Metric
2.0.1 passed this metric
Testing File Metric
2.0.1 passed this metric
Version Tag Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.1 failed this metric
2.0.1 passed this metric
Foodcritic Metric
2.0.1 passed this metric
No Binaries Metric
2.0.1 passed this metric
Testing File Metric
2.0.1 passed this metric
Version Tag Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.1 passed this metric
2.0.1 passed this metric
Testing File Metric
2.0.1 passed this metric
Version Tag Metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number
2.0.1 passed this metric
2.0.1 failed this metric
Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must include a tag that matches this cookbook version number