diff --git a/attributes/default.rb b/attributes/default.rb
index dd3183fc..671118f2 100644
--- a/attributes/default.rb
+++ b/attributes/default.rb
@@ -17,12 +17,14 @@
end
# installation
-default["sensu"]["version"] = "0.28.4-1"
+default["sensu"]["version"] = "1.2.0-1"
default["sensu"]["version_suffix"] = nil
default["sensu"]["apt_repo_codename"] = nil
default["sensu"]["yum_repo_releasever"] = nil
default["sensu"]["use_unstable_repo"] = false
default["sensu"]["log_level"] = "info"
+default["sensu"]["log_rotate_file_size"] = 10240
+default["sensu"]["log_rotate_file_keep"] = 10
default["sensu"]["use_ssl"] = true
default["sensu"]["use_embedded_ruby"] = true
default["sensu"]["service_max_wait"] = 10
@@ -33,8 +35,8 @@
default["sensu"]["apt_repo_url"] = "http://repositories.sensuapp.org/apt"
default["sensu"]["yum_repo_url"] = "http://repositories.sensuapp.org"
+default['sensu']['msi_repo_url'] = "https://repositories.sensuapp.org/msi"
default['sensu']['yum_flush_cache'] = nil
-default["sensu"]["msi_repo_url"] = "https://repositories.sensuapp.org/msi"
default["sensu"]["aix_package_root_url"] = "https://sensu.global.ssl.fastly.net/aix"
default["sensu"]["add_repo"] = true
default['sensu']['apt_key_url'] = 'https://sensu.global.ssl.fastly.net/apt/pubkey.gpg'
diff --git a/recipes/_windows.rb b/recipes/_windows.rb
index 98c9df50..708c7d46 100644
--- a/recipes/_windows.rb
+++ b/recipes/_windows.rb
@@ -19,6 +19,22 @@
windows = node["sensu"]["windows"].dup
+if node['kernel']['machine'] =~ /x86_64/
+ kernel = 'x64'
+else
+ kernel = 'x86'
+end
+
+if node['platform_version'].to_f == 6.1
+ version = '2008r2'
+elsif node['platform_version'].to_f == 6.2
+ version = '2012'
+elsif node['platform_version'].to_f == 6.3
+ version = '2012r2'
+elsif node['platform_version'].to_f == 10.0
+ version = '2016'
+end
+
user node["sensu"]["user"] do
password Sensu::Helpers.random_password(20, true, true, true, true)
not_if { Sensu::Helpers.windows_user_exists?(node["sensu"]["user"]) }
@@ -35,7 +51,7 @@
end
package "Sensu" do
- source "#{node['sensu']['msi_repo_url']}/sensu-#{node['sensu']['version']}.msi"
+ source "#{node['sensu']['msi_repo_url']}/#{version}/sensu-#{node['sensu']['version']}-#{kernel}.msi"
options windows["package_options"]
version node["sensu"]["version"].tr("-", ".")
notifies :create, "ruby_block[sensu_service_trigger]", :immediately
diff --git a/templates/default/sensu.xml.erb b/templates/default/sensu.xml.erb
index 6659049f..9a02e6c8 100644
--- a/templates/default/sensu.xml.erb
+++ b/templates/default/sensu.xml.erb
@@ -14,8 +14,11 @@
<%= node["sensu"]["directory"] %>\conf.d
-e
<%= node["sensu"]["directory"] %>\extensions
- -l
- <%= node["sensu"]["log_directory"] %>\<%= @service %>.log
-L
<%= node["sensu"]["log_level"] %>
+ <%= node["sensu"]["log_directory"] %>\
+
+ <%= node["sensu"]["log_rotate_file_size"] %>
+ <%= node["sensu"]["log_rotate_file_keep"] %>
+