Educloud-monconf

# educloud-mon main config file.

# General section
[general]

# This daemon will run in background or in foreground?
background = 0

# Run daemon in debug mode will produce further information in the system
# log.
debug = 1

# Location of the log file
logfile = /var/log/educloud-mon.log

# Run daemon as the follow user
user = "oneadmin" 

# Run daemon as the follow group
group = "oneadmin" 

# Run in dry-run mode ?
# In this mode virtual machines are not created or deleted. 
# Default is false.
dry-run = 0

# How many seconds wait after start a vm ?
# Default is 30 seconds
start_vm_wait = 60

# How many seconds wait to start new cicle of metrics checks ?
# This value determines the seconds between each cicle of N
# metrics. Default is 30 seconds
cicle_wait = 30

# Number maximum of retries to start a vm. After this, if vm state is not
# "running", a notification will be sent
# Default is 3
max_vm_retry = 3

# List of metrics to consider. This wil be converted to a dict in the python
# deamon, so please, use the same python syntax.
# Each metric must have: 'top_thresold', 'bottom_thresold' and 'script'
# Each script MUST return in stdout only the value to consult and compare with
# thresolds defined here.
# TODO: Better documentation
metrics = {
          'cpu-load': {
             'top_thresold': '70',
             'bottom_thresold': '2',
             'script': '/usr/local/bin/educloud-mon/scripts/web-cpu-usage.py',
             'check_interval': '2',
             'average_checks': '5',
          },
          'active-users': {
             'top_thresold': '20',
             'bottom_thresold': '5',
             'script': '/usr/local/bin/educloud-mon/scripts/web-active-users.py',
             'check_interval': '2',
             'average_checks': '5',
          },
    }

# This command will be execute to get number of current http connection
# in a vm. This will be appended th vm id
get_connections_cmd = "ssh osdc07 iis_connected_users.sh" 

# nginx web server cluster
[nginx]

# This command will be executed when a new vm is added to the pool
# This command will be appended with vm_id
nginx_add_cmd = "ssh osdc07 nginx_webservers.sh add" 

# This command will be executed when a vm is removed from pool
# This command will be appended with vm_id
nginx_del_cmd = "ssh osdc07 nginx_webservers.sh del" 

# This command will be executed after a add or del action in nginx cluster
nginx_restart_cmd = "ssh osdc07 sudo /usr/sbin/service nginx restart" 

# Settings for email notification system
[notification]

# If enabled, emails will be sent to administrators when errors occur.
# Default is true.
enable_notifications = 0

# SMTP Server to use
smtp_server = 127.0.0.1

# SMTP Port
smtp_port = 25

# Use SMTP Authentication ? 
# Default is true.
smtp_auth = 0

# SMTP User for authentication
smtp_user = user

# SMTP Pass for authentication
smtp_pass = password

# Mail From
mail_from = "educloud-mon <educloud-mon@ncc.unes.pbr" 

# Mail to
mail_to = "admin@ncc.unesp.br" 

# Options to connect with OpenNebula goes in this section
[opennebula]

# RPC OpenNebula URL. You have to specify a full URL of RCP with port and path.
# Without quotes. Example: http://localhost:2633/RPC2
rpc_url = http://200.145.46.198:2633/RPC2

# User to use in opennebula connection. Without quotes.
user = oneadmin

# Password to use in opennebula connection. Without quotes.
password = !@qazxsw

# Relative path to template to start when metrics get values >= top_thresolds
# This path is relative to the home of the user oneadmin on OpenNebula
# controller. This hardcoded path is necessary because we are using OpenNebula
# 2.2.1 version.
template = "/usr/local/bin/educloud-mon/templates/teste.template" 

# Minimum amount of machine in "web cluster" 
# If the cluster has this number no more virtual machines will be 
# deleted. Default is 1
minimum_vms = 1

Also available in: PDF HTML TXT