Provides CPU usage information as micro-service; updates periodically (default 60
seconds or 1 minute). This container may be run locally using Docker, pushed to a Docker registry, and published to any Open Horizon exchange.
org
-[email protected]
url
-com.github.dcmartin.open-horizon.cpu
version
-0.0.3
CPU_PERIOD
- seconds between updates; defaults to60
CPU_INTERVAL
- seconds between CPU tests; defaults to1
LOG_LEVEL
- specify level of logging; defaultinfo
; options include (debug
andnone
)
Copy this repository, change to the cpu
directory, then use the make command; see below:
% mkdir ~/gitdir
% cd ~/gitdir
% git clone https://github.com/dcmartin/open-horizon
% cd open-horizon/cpu
% make
...
{
"cpu": {
"date": 1554314683
},
"date": 1554314683,
"hzn": {
"agreementid": "",
"arch": "",
"cpus": 0,
"device_id": "",
"exchange_url": "",
"host_ips": [
""
],
"organization": "",
"ram": 0,
"pattern": null
},
"config": {
"log_level": "info",
"debug": false,
"period": "60",
"interval": "1",
"services": null
},
"service": {
"label": "cpu",
"version": "0.0.3"
}
}
The cpu
payload will be incomplete until the service initiates; subsequent make check
will return complete; see below:
{
"cpu": {
"date": 1554314684,
"percent": 5.27
},
"date": 1554314683,
"hzn": {
"agreementid": "",
"arch": "",
"cpus": 0,
"device_id": "",
"exchange_url": "",
"host_ips": [
""
],
"organization": "",
"ram": 0,
"pattern": null
},
"config": {
"log_level": "info",
"debug": false,
"period": "60",
"interval": "1",
"services": null
},
"service": {
"label": "cpu",
"version": "0.0.3"
}
}
Releases are based on Semantic Versioning, and use the format
of MAJOR.MINOR.PATCH
. In a nutshell, the version will be incremented
based on the following:
MAJOR
: Incompatible or major changes.MINOR
: Backwards-compatible new features and enhancements.PATCH
: Backwards-compatible bugfixes and package updates.