Skip to content

Commit

Permalink
Merge pull request #7 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.0.5
  • Loading branch information
manegron authored Jun 1, 2024
2 parents b5ed5a8 + b67893b commit b495140
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 15 deletions.
24 changes: 18 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
cookbook-pmacct CHANGELOG
===========================
===============

This file is used to list changes made in each version of the pmacct cookbook.
## 0.0.5

0.0.1
-----
- [jjprieto]
- COMMIT_REF Initial release of cookbook pmacct
- Miguel Negrón
- [397a3ba] Merge pull request #6 from redBorder/bugfix/17493_pmacct_dir_not_created
- [05b84d8] Update default.rb
- [b7f5a97] Merge pull request #1 from redBorder/bugfix/#15368_fix_register_and_deregister
- [a8afa01] Merge branch 'development' into bugfix/#15368_fix_register_and_deregister
- [de65490] Merge pull request #5 from redBorder/master
- [05b7529] Update metadata.rb
- nilsver
- [ef19a4c] create pmacct dir
- Luis Blanco
- [a80fcf5] fix curl

## 0.0.1

- [jjprieto]
- COMMIT_REF Initial release of cookbook pmacct

- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
Expand Down
9 changes: 4 additions & 5 deletions resources/metadata.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name 'pmacct'
maintainer 'Juan J. Prieto'
maintainer_email 'jjprieto@redborder.com'
license 'All rights reserved'
maintainer 'Eneo Tecnología S.L.'
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-pmacct'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.4'
version '0.0.5'
12 changes: 9 additions & 3 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@
not_if "getent passwd #{user}"
end

directory "/etc/pmacct" do
owner user
group group
mode 0755
end

flow_nodes = []

template "/etc/pmacct/sfacctd.conf" do
Expand Down Expand Up @@ -71,7 +77,7 @@

action :remove do
begin

service "sfacctd" do
service_name "sfacctd"
ignore_failure true
Expand Down Expand Up @@ -107,7 +113,7 @@
json_query = Chef::JSONCompat.to_json(query)

execute 'Register service in consul' do
command "curl http://localhost:8500/v1/agent/service/register -d '#{json_query}' &>/dev/null"
command "curl -X PUT http://localhost:8500/v1/agent/service/register -d '#{json_query}' &>/dev/null"
action :nothing
end.run_action(:run)

Expand All @@ -123,7 +129,7 @@
begin
if node["pmacct"]["registered"]
execute 'Deregister service in consul' do
command "curl http://localhost:8500/v1/agent/service/deregister/sfacct-#{node["hostname"]} &>/dev/null"
command "curl -X PUT http://localhost:8500/v1/agent/service/deregister/sfacct-#{node["hostname"]} &>/dev/null"
action :nothing
end.run_action(:run)

Expand Down
1 change: 0 additions & 1 deletion resources/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@
#

pmacct_config "config" do
sensors node["redborder"]["sensors_info"]["flow-sensor"]
action :add
end

0 comments on commit b495140

Please sign in to comment.