Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding rb-arubacentral #100

Merged
merged 2 commits into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
default["redborder"]["memory_services"]["snmp"] = {"count" => 5, "memory" => 0, "max_limit" => 10000 }
default["redborder"]["memory_services"]["redborder-monitor"] = {"count" => 5, "memory" => 0, "max_limit" => 20000 }
default["redborder"]["memory_services"]["rb-logstatter"] = {"count" => 5, "memory" => 0, "max_limit" => 20000 }
default["redborder"]["memory_services"]["rb-arubacentral"] = {"count" => 5, "memory" => 0, "max_limit" => 20000 }
default["redborder"]["memory_services"]["webui"] = {"count" => 40, "memory" => 0 }
default["redborder"]["memory_services"]["f2k"] = { "count" => 40, "memory" => 0 }
default["redborder"]["memory_services"]["redborder-nmsp"] = {"count" => 10, "memory" => 0 }
Expand Down Expand Up @@ -148,6 +149,7 @@
default["redborder"]["services"]["redborder-cep"] = false
default["redborder"]["services"]["rb-aioutliers"] = false
default["redborder"]["services"]["rb-logstatter"] = true
default["redborder"]["services"]["rb-arubacentral"] = false
default["redborder"]["services"]["memcached"] = true
default["redborder"]["services"]["rb-monitor"] = false
default["redborder"]["services"]["secor"] = false
Expand Down Expand Up @@ -186,6 +188,7 @@
default["redborder"]["systemdservices"]["redborder-cep"] = ["redborder-cep"]
default["redborder"]["systemdservices"]["rb-aioutliers"] = ["rb-aioutliers"]
default["redborder"]["systemdservices"]["rb-logstatter"] = ["rb-logstatter"]
default["redborder"]["systemdservices"]["rb-arubacentral"] = ["rb-arubacentral"]
default["redborder"]["systemdservices"]["memcached"] = ["memcached"]
default["redborder"]["systemdservices"]["s3"] = ["minio"]
default["redborder"]["systemdservices"]["mongodb"] = ["mongod"]
Expand Down
2 changes: 1 addition & 1 deletion resources/libraries/get_sensors_all_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module Rb_manager
module Helpers
def get_sensors_all_info()
sensors_info = {}
sensor_types = ["ips-sensor","ipsv2-sensor","ipscp-sensor","ipsg-sensor","vault-sensor","flow-sensor","mse-sensor","meraki-sensor","cisco-cloudproxy","proxy-sensor","scanner-sensor","mse-sensor","meraki-sensor","ale-sensor","cep-sensor","device-sensor"]
sensor_types = ["ips-sensor","ipsv2-sensor","ipscp-sensor","ipsg-sensor","vault-sensor","flow-sensor","arubacentral-sensor","mse-sensor","meraki-sensor","cisco-cloudproxy","proxy-sensor","scanner-sensor","mse-sensor","meraki-sensor","ale-sensor","cep-sensor","device-sensor"]

sensor_types.each do |s_type|
sensors = search(:node, "role:#{s_type} AND -redborder_parent_id:*?").sort #get sensor where parent_id is nil
Expand Down
1 change: 1 addition & 0 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,4 @@
#depends 'rbaioutliers'
depends 'rbcgroup'
depends 'rblogstatter'
depends 'rb-arubacentral'
6 changes: 6 additions & 0 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,12 @@
action (node["redborder"]["services"]["rb-logstatter"] ? :add : :remove)
end

rb_arubacentral_config "Configure rb-arubacentral" do
arubacentral_nodes node["redborder"]["sensors_info_all"]["arubacentral-sensor"]
flow_nodes node["redborder"]["sensors_info_all"]["flow-sensor"]
action (node["redborder"]["services"]["rb-arubacentral"] ? :add : :remove)
end

#freeradius_config "Configure radiusd" do
# flow_nodes node["redborder"]["sensors_info_all"]["flow-sensor"]
# action (node["redborder"]["services"]["radiusd"] ? [:config_common, :config_manager, :register] : [:remove, :deregister])
Expand Down
Loading