Skip to content

Commit

Permalink
Added hostname field to server monitoring config file, fixes djoos-co…
Browse files Browse the repository at this point in the history
  • Loading branch information
djoos committed Jan 24, 2014
1 parent 3f85430 commit 048f190
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Attributes
* `node['newrelic']['server_monitoring']['ssl']`
* `node['newrelic']['server_monitoring']['ssl_ca_bundle']`
* `node['newrelic']['server_monitoring']['ssl_ca_path']`
* `node['newrelic']['server_monitoring']['hostname']`
* `node['newrelic']['server_monitoring']['pidfile']`
* `node['newrelic']['server_monitoring']['collector_host']`
* `node['newrelic']['server_monitoring']['timeout']`
Expand Down
1 change: 1 addition & 0 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
default['newrelic']['server_monitoring']['ssl'] = nil
default['newrelic']['server_monitoring']['ssl_ca_bundle'] = nil
default['newrelic']['server_monitoring']['ssl_ca_path'] = nil
default['newrelic']['server_monitoring']['hostname'] = nil
default['newrelic']['server_monitoring']['pidfile'] = nil
default['newrelic']['server_monitoring']['collector_host'] = nil
default['newrelic']['server_monitoring']['timeout'] = nil
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license "MIT"
description "Installs/Configures New Relic"
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "0.5.6"
version "0.5.7"

%w{ debian ubuntu redhat centos fedora scientific amazon windows smartos }.each do |os|
supports os
Expand Down
3 changes: 2 additions & 1 deletion recipes/server-monitor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@
:loglevel => node['newrelic']['server_monitoring']['loglevel'],
:proxy => node['newrelic']['server_monitoring']['proxy'],
:ssl => node['newrelic']['server_monitoring']['ssl'],
:ssl_ca_path => node['newrelic']['server_monitoring']['ssl_ca_path'],
:ssl_ca_bundle => node['newrelic']['server_monitoring']['ssl_ca_bundle'],
:ssl_ca_path => node['newrelic']['server_monitoring']['ssl_ca_path'],
:hostname => node['newrelic']['server_monitoring']['hostname'],
:pidfile => node['newrelic']['server_monitoring']['pidfile'],
:collector_host => node['newrelic']['server_monitoring']['collector_host'],
:timeout => node['newrelic']['server_monitoring']['timeout']
Expand Down
16 changes: 16 additions & 0 deletions templates/default/nrsysmond.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,22 @@ ssl_ca_bundle=<%= @ssl_ca_bundle %>
ssl_ca_path=<%= @ssl_ca_path %>
<% end %>

#
# Option : hostname
# Value : A meaningful host name to be displayed in the user interface. On
# many cloud based nodes the host name is incomprehensible and makes
# finding a specific host problematic. Using this option will allow
# you to assign a more meaningful name to a host. You must ensure
# that all your host names are unique.
# Default: Whatever the system calls the host.
# Note : Can also be set with the -n command line option.
#
<% if @hostname.nil? %>
#hostname=
<% else %>
hostname=<%= @hostname %>
<% end %>

#
# Option : pidfile
# Value : Name of a file where the server monitoring daemon will store it's
Expand Down

0 comments on commit 048f190

Please sign in to comment.