Daemon that monitors physical hosts performance
- [CPU] Sysbench
To install the monitoring-hosts daemon you will need a virtual machine with a fresh install environment and with the configuration described below.
Minimal Server Configuration
OS: Ubuntu 14.04
CPU: 1 core
Memory: 1G of RAM
Disk: there is no disk requirements
- Update and Upgrade your machine
$ sudo apt-get update && sudo apt-get upgrade
- Install pip and dependencies
$ sudo apt-get install python-setuptools python-dev build-essential $ sudo easy_install pip
- Install git
$ sudo apt-get install git
- Install sysbench
$ sudo apt-get install sysbench
- Clone the monitoring-hosts repository
$ git clone https://github.com/bigsea-ufcg/monitoring-hosts
- Access the bigsea-loadbalancer folder to install the requirements
$ cd monitoring-hosts/ $ sudo pip install -r requirements.txt --no-cache-dir
You can use two types of configuration, no backend (the output will be written in the output_dir), or use monaca (the output will be directlly published.
default.cfg
[DEFAULT]
type=CPU
name=sysbench
# Full path to access the sysbench.json file that is in sample directory.
parameters=/path/sysbench.json
output_dir=/tmp
backend=
sample/default_monasca.cfg
[DEFAULT]
type=CPU
name=sysbench
# Full path to access the sysbench.json file that is in sample directory.
parameters=/path/sysbench.json
output_dir=/tmp
backend=OS_MONASCA
[monasca]
username=<@username>
password=<@password>
project_name=<@project_name>
auth_url=<@auth_url>
monasca_api_version=v2_0
You can set the number_of_threads
and the max_prime
parameters used by sysbench by
editing the sysbench.json
file located in the sample
directory.
- Help command
ubuntu@host:~/monitoring-hosts/monitoring$ python run.py -h
usage: python monitoring.py [-h] {start,restart,stop} ...
Monitoring Host Daemon
positional arguments:
{start,restart,stop} Operation with the monitoring host daemon. Accepts any
of these values: start, stop, restart
start Starts python monitoring.py daemon
restart Restarts python monitoring.py daemon
stop Stops python monitoring.py daemon
optional arguments:
-h, --help show this help message and exit
- Start command
ubuntu@host:~/monitoring-hosts/monitoring$ python run.py start -h
usage: python monitoring.py start [-h] -time TIME_INTERVAL
[-conf CONFIGURATION]
optional arguments:
-h, --help show this help message and exit
-time TIME_INTERVAL, --time_interval TIME_INTERVAL
Number of seconds to wait before run the Monitoring
Daemon again.(Integer)
-conf CONFIGURATION, --configuration CONFIGURATION
Filename with all benchmark information
- Stop command
ubuntu@host1:~/monitoring-hosts/monitoring$ python run.py stop -h
usage: python monitoring.py stop [-h] [-conf CONFIGURATION]
Stops the daemon if it is currently running.
optional arguments:
-h, --help show this help message and exit
-conf CONFIGURATION, --configuration CONFIGURATION
Filename with all benchmark information
- Restart command
ubuntu@host1:~/monitoring-hosts/monitoring$ python run.py restart -h
usage: python monitoring.py restart [-h] -time TIME_INTERVAL
[-conf CONFIGURATION]
optional arguments:
-h, --help show this help message and exit
-time TIME_INTERVAL, --time_interval TIME_INTERVAL
Number of seconds to wait before run the Monitoring
Daemon again. (Integer)
-conf CONFIGURATION, --configuration CONFIGURATION
Filename with all benchmark information
- Running
root@host:~# python monitoring/run.py start -conf sample/default_monasca.cfg -time 1800
root@hots:~# python monitoring/run.py stop -conf sample/default.cfg