Educloud-monconf » History » Version 1

Beraldo Leal, 13 Mar 2012 12:47

1 1 Beraldo Leal
h1. Educloud-monconf
2 1 Beraldo Leal
<pre>
3 1 Beraldo Leal
# educloud-mon main config file.
4 1 Beraldo Leal
5 1 Beraldo Leal
# General section
6 1 Beraldo Leal
[general]
7 1 Beraldo Leal
8 1 Beraldo Leal
# This daemon will run in background or in foreground?
9 1 Beraldo Leal
background = 0
10 1 Beraldo Leal
11 1 Beraldo Leal
# Run daemon in debug mode will produce further information in the system
12 1 Beraldo Leal
# log.
13 1 Beraldo Leal
debug = 1
14 1 Beraldo Leal
15 1 Beraldo Leal
# Location of the log file
16 1 Beraldo Leal
logfile = /var/log/educloud-mon.log
17 1 Beraldo Leal
18 1 Beraldo Leal
# Run daemon as the follow user
19 1 Beraldo Leal
user = "oneadmin"
20 1 Beraldo Leal
21 1 Beraldo Leal
# Run daemon as the follow group
22 1 Beraldo Leal
group = "oneadmin"
23 1 Beraldo Leal
24 1 Beraldo Leal
# Run in dry-run mode ?
25 1 Beraldo Leal
# In this mode virtual machines are not created or deleted. 
26 1 Beraldo Leal
# Default is false.
27 1 Beraldo Leal
dry-run = 0
28 1 Beraldo Leal
29 1 Beraldo Leal
# How many seconds wait after start a vm ?
30 1 Beraldo Leal
# Default is 30 seconds
31 1 Beraldo Leal
start_vm_wait = 60
32 1 Beraldo Leal
33 1 Beraldo Leal
# How many seconds wait to start new cicle of metrics checks ?
34 1 Beraldo Leal
# This value determines the seconds between each cicle of N
35 1 Beraldo Leal
# metrics. Default is 30 seconds
36 1 Beraldo Leal
cicle_wait = 30
37 1 Beraldo Leal
38 1 Beraldo Leal
# Number maximum of retries to start a vm. After this, if vm state is not
39 1 Beraldo Leal
# "running", a notification will be sent
40 1 Beraldo Leal
# Default is 3
41 1 Beraldo Leal
max_vm_retry = 3
42 1 Beraldo Leal
43 1 Beraldo Leal
# List of metrics to consider. This wil be converted to a dict in the python
44 1 Beraldo Leal
# deamon, so please, use the same python syntax.
45 1 Beraldo Leal
# Each metric must have: 'top_thresold', 'bottom_thresold' and 'script'
46 1 Beraldo Leal
# Each script MUST return in stdout only the value to consult and compare with
47 1 Beraldo Leal
# thresolds defined here.
48 1 Beraldo Leal
# TODO: Better documentation
49 1 Beraldo Leal
metrics = {
50 1 Beraldo Leal
          'cpu-load': {
51 1 Beraldo Leal
             'top_thresold': '70',
52 1 Beraldo Leal
             'bottom_thresold': '2',
53 1 Beraldo Leal
             'script': '/usr/local/bin/educloud-mon/scripts/web-cpu-usage.py',
54 1 Beraldo Leal
             'check_interval': '2',
55 1 Beraldo Leal
             'average_checks': '5',
56 1 Beraldo Leal
          },
57 1 Beraldo Leal
          'active-users': {
58 1 Beraldo Leal
             'top_thresold': '20',
59 1 Beraldo Leal
             'bottom_thresold': '5',
60 1 Beraldo Leal
             'script': '/usr/local/bin/educloud-mon/scripts/web-active-users.py',
61 1 Beraldo Leal
             'check_interval': '2',
62 1 Beraldo Leal
             'average_checks': '5',
63 1 Beraldo Leal
          },
64 1 Beraldo Leal
    }
65 1 Beraldo Leal
66 1 Beraldo Leal
# This command will be execute to get number of current http connection
67 1 Beraldo Leal
# in a vm. This will be appended th vm id
68 1 Beraldo Leal
get_connections_cmd = "ssh osdc07 iis_connected_users.sh"
69 1 Beraldo Leal
70 1 Beraldo Leal
# nginx web server cluster
71 1 Beraldo Leal
[nginx]
72 1 Beraldo Leal
73 1 Beraldo Leal
# This command will be executed when a new vm is added to the pool
74 1 Beraldo Leal
# This command will be appended with vm_id
75 1 Beraldo Leal
nginx_add_cmd = "ssh osdc07 nginx_webservers.sh add"
76 1 Beraldo Leal
77 1 Beraldo Leal
# This command will be executed when a vm is removed from pool
78 1 Beraldo Leal
# This command will be appended with vm_id
79 1 Beraldo Leal
nginx_del_cmd = "ssh osdc07 nginx_webservers.sh del"
80 1 Beraldo Leal
81 1 Beraldo Leal
# This command will be executed after a add or del action in nginx cluster
82 1 Beraldo Leal
nginx_restart_cmd = "ssh osdc07 sudo /usr/sbin/service nginx restart"
83 1 Beraldo Leal
84 1 Beraldo Leal
# Settings for email notification system
85 1 Beraldo Leal
[notification]
86 1 Beraldo Leal
87 1 Beraldo Leal
# If enabled, emails will be sent to administrators when errors occur.
88 1 Beraldo Leal
# Default is true.
89 1 Beraldo Leal
enable_notifications = 0
90 1 Beraldo Leal
91 1 Beraldo Leal
# SMTP Server to use
92 1 Beraldo Leal
smtp_server = 127.0.0.1
93 1 Beraldo Leal
94 1 Beraldo Leal
# SMTP Port
95 1 Beraldo Leal
smtp_port = 25
96 1 Beraldo Leal
97 1 Beraldo Leal
# Use SMTP Authentication ? 
98 1 Beraldo Leal
# Default is true.
99 1 Beraldo Leal
smtp_auth = 0
100 1 Beraldo Leal
101 1 Beraldo Leal
# SMTP User for authentication
102 1 Beraldo Leal
smtp_user = user
103 1 Beraldo Leal
104 1 Beraldo Leal
# SMTP Pass for authentication
105 1 Beraldo Leal
smtp_pass = password
106 1 Beraldo Leal
107 1 Beraldo Leal
# Mail From
108 1 Beraldo Leal
mail_from = "educloud-mon <educloud-mon@ncc.unes.pbr"
109 1 Beraldo Leal
110 1 Beraldo Leal
# Mail to
111 1 Beraldo Leal
mail_to = "admin@ncc.unesp.br"
112 1 Beraldo Leal
113 1 Beraldo Leal
# Options to connect with OpenNebula goes in this section
114 1 Beraldo Leal
[opennebula]
115 1 Beraldo Leal
116 1 Beraldo Leal
# RPC OpenNebula URL. You have to specify a full URL of RCP with port and path.
117 1 Beraldo Leal
# Without quotes. Example: http://localhost:2633/RPC2
118 1 Beraldo Leal
rpc_url = http://200.145.46.198:2633/RPC2
119 1 Beraldo Leal
120 1 Beraldo Leal
# User to use in opennebula connection. Without quotes.
121 1 Beraldo Leal
user = oneadmin
122 1 Beraldo Leal
123 1 Beraldo Leal
# Password to use in opennebula connection. Without quotes.
124 1 Beraldo Leal
password = !@qazxsw
125 1 Beraldo Leal
126 1 Beraldo Leal
# Relative path to template to start when metrics get values >= top_thresolds
127 1 Beraldo Leal
# This path is relative to the home of the user oneadmin on OpenNebula
128 1 Beraldo Leal
# controller. This hardcoded path is necessary because we are using OpenNebula
129 1 Beraldo Leal
# 2.2.1 version.
130 1 Beraldo Leal
template = "/usr/local/bin/educloud-mon/templates/teste.template"
131 1 Beraldo Leal
132 1 Beraldo Leal
# Minimum amount of machine in "web cluster"
133 1 Beraldo Leal
# If the cluster has this number no more virtual machines will be 
134 1 Beraldo Leal
# deleted. Default is 1
135 1 Beraldo Leal
minimum_vms = 1
136 1 Beraldo Leal
</pre>