Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #12 from pwelch/fix_readme

Add README information
  • Loading branch information...
commit 49d12bc9b6beca9e0530b77ceaa4b7187b29cf04 2 parents 378bbdb + 4df43bf
@mdxp authored
Showing with 79 additions and 30 deletions.
  1. +60 −11 README.md
  2. +19 −19 attributes/default.rb
View
71 README.md
@@ -3,29 +3,78 @@
DESCRIPTION:
===========
+Installs and configures Icinga server.
+
REQUIREMENTS:
===========
+Cookbooks
+---------
+
+* apache2
+* build-essential
+
ATTRIBUTES:
===========
-USAGE:
-======
+See `attributes/default.rb`
-Some caveats at the moment:
+Data Bags
+=========
Minimum requirements for users databag format:
Users
--id
---groups
----sysadmin
---htaccess // in order to have access to site through webui
---icinga
----email // this key must exist for each user with a sysadmin group value (above)
+-----
+
+Create a `users` data bag that will contain the users that will be able to log into the Icinga webui. Each user can use htauth with a specified password. Users that should be able to log in should be in the sysadmin group. Example user data bag item:
+
+```bash
+{
+ "id": "icinga",
+ "groups": "sysadmin",
+ "htpasswd": "hashed_htpassword",
+ "icinga": {
+ "icinga_email": "icinga@example.com"
+ }
+}
+```
+
+* `email` - This key must exist for each user with a sysadmin group value
+* `htpasswd` - Used to have access
+
+The htpasswd must be the hashed value. Get this value with htpasswd:
+
+```bash
+ % htpasswd -n -s icinga
+ New password:
+ Re-type new password:
+ icinga:{SHA}8XLF6eTYQKVTVogqK2RIRrMCshY=
+```
-Note: the htpasswd value must be generated with: `htpasswd -nb <username> <password>`
+For example use the `{SHA}8XLF6eTYQKVTVogqK2RIRrMCshY=` value in the data bag.
+
+USAGE:
+======
Also, you will need one node with a "monitoring" role (I applying it to my icinga node,
and this can be just a skeleton. This is just so that one of the templates generates correctly,
-and this requirement will likely be alleviated in future versions.
+and this requirement will likely be alleviated in future versions.)
+
+Monitoring Role
+---------------
+Create a role to use for the monitoring server. The role name should match the value of the attribute "`node['icinga']['server_role']`". For example:
+
+```bash
+ % cat roles/monitoring.rb
+ name "monitoring"
+ description "Monitoring server"
+ run_list(
+ "recipe[icinga::server]"
+ )
+
+
+ % knife role from file monitoring.rb
+```
+
+
View
38 attributes/default.rb
@@ -1,40 +1,40 @@
-default['icinga']['version'] = "1.8.4"
+default['icinga']['version'] = "1.8.4"
default['icinga']['checksum'] = "e1ecbc6c83bb8b2d4d29934182b101f305c8d45873b0cefe452dd913ee5b6de1"
-default['icinga']['prefix'] = "/usr/local/icinga"
+default['icinga']['prefix'] = "/usr/local/icinga"
-default['icinga']['sysadmin_email'] = "root@localhost"
+default['icinga']['sysadmin_email'] = "root@localhost"
default['icinga']['sysadmin_sms_email'] = "root@localhost"
-default['icinga']['user'] = "nagios"
+default['icinga']['user'] = "nagios"
default['icinga']['group'] = "nagios"
-default['icinga']['server_role'] = "monitoring"
+default['icinga']['server_role'] = "monitoring"
+default['icinga']['sysadmin'] = "sysadmin"
default['icinga']['notifications_enabled'] = 0
default['icinga']['check_external_commands'] = true
default['icinga']['default_contact_groups'] = %w(admins)
-default['icinga']['sysadmin'] = "sysadmin"
-set['icinga']['conf_dir'] = node['icinga']['prefix'] + "/etc"
+set['icinga']['conf_dir'] = node['icinga']['prefix'] + "/etc"
set['icinga']['config_dir'] = node['icinga']['conf_dir'] + "/conf.d"
-set['icinga']['log_dir'] = node['icinga']['prefix'] + "/var"
-set['icinga']['cache_dir'] = node['icinga']['log_dir']
-set['icinga']['state_dir'] = node['icinga']['log_dir']
-set['icinga']['run_dir'] = node['icinga']['log_dir']
-set['icinga']['docroot'] = node['icinga']['prefix'] + "/share/"
+set['icinga']['log_dir'] = node['icinga']['prefix'] + "/var"
+set['icinga']['cache_dir'] = node['icinga']['log_dir']
+set['icinga']['state_dir'] = node['icinga']['log_dir']
+set['icinga']['run_dir'] = node['icinga']['log_dir']
+set['icinga']['docroot'] = node['icinga']['prefix'] + "/share/"
# This setting is effectively sets the minimum interval (in seconds) icinga can handle.
# Other interval settings provided in seconds will calculate their actual from this value, since icinga works in 'time units' rather than allowing definitions everywhere in seconds
-default['icinga']['templates'] = Mash.new
+default['icinga']['templates'] = Mash.new
default['icinga']['interval_length'] = 1
# Provide all interval values in seconds
-default['icinga']['default_host']['check_interval'] = 15
-default['icinga']['default_host']['retry_interval'] = 15
-default['icinga']['default_host']['max_check_attempts'] = 1
+default['icinga']['default_host']['check_interval'] = 15
+default['icinga']['default_host']['retry_interval'] = 15
+default['icinga']['default_host']['max_check_attempts'] = 1
default['icinga']['default_host']['notification_interval'] = 300
-default['icinga']['default_service']['check_interval'] = 60
-default['icinga']['default_service']['retry_interval'] = 15
-default['icinga']['default_service']['max_check_attempts'] = 3
+default['icinga']['default_service']['check_interval'] = 60
+default['icinga']['default_service']['retry_interval'] = 15
+default['icinga']['default_service']['max_check_attempts'] = 3
default['icinga']['default_service']['notification_interval'] = 1200
Please sign in to comment.
Something went wrong with that request. Please try again.