Skip to content

Commit

Permalink
Add sfacctd_ip
Browse files Browse the repository at this point in the history
  • Loading branch information
manegron committed Oct 24, 2024
1 parent b090016 commit d589c98
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
kafka_topic = new_resource.kafka_topic
kafka_broker_port = new_resource.kafka_broker_port
geo_country = new_resource.geo_country
sfacctd_ip = new_resource.sfacctd_ip

dnf_package 'pmacct' do
action :upgrade
Expand Down Expand Up @@ -41,7 +42,8 @@
kafka_hosts: kafka_hosts,
kafka_topic: kafka_topic,
kafka_broker_port: kafka_broker_port,
geo_country: geo_country)
geo_country: geo_country,
sfacctd_ip: sfacctd_ip)
notifies :restart, 'service[sfacctd]', :delayed unless node['redborder']['leader_configuring']
end

Expand Down
1 change: 1 addition & 0 deletions resources/resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
attribute :kafka_topic, kind_of: String, default: 'sflow'
attribute :kafka_broker_port, kind_of: Integer, default: 9092
attribute :geo_country, kind_of: String, default: '/usr/share/GeoIP/GeoLiteCountry.dat'
attribute :sfacctd_ip, kind_of: String
2 changes: 1 addition & 1 deletion resources/templates/default/sfacctd.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ geoipv2_file: <%=@geo_country %>
sfacctd_time_new: true
sfacctd_account_options: true
sfacctd_port: 6343
sfacctd_ip: <%= "#{node["ipaddress"]}" %>
sfacctd_ip: <%= "#{@sfacctd_ip}" %>

sfprobe_direction: tag

Expand Down

0 comments on commit d589c98

Please sign in to comment.