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