Skip to content

Commit

Permalink
README.md: fixed mongo cmd
Browse files Browse the repository at this point in the history
data/common.yaml: sync prod version
manifests/*/monitoring.pp: refactoring
  • Loading branch information
fb929 committed Feb 8, 2024
1 parent 99f9767 commit 19cb382
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 17 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ any-sync-confapply -c /etc/any-sync-coordinator/config.yml -n /etc/any-sync-coor
### Ahow current config in Mongo
```
use coordinator
db.getMongo().setReadPref('primaryPreferred')
db.nodeConf.find().sort( { _id: -1 } ).limit(1)
```

Expand Down
8 changes: 4 additions & 4 deletions data/common.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
pkg::any-sync-node: 0.2.3
pkg::any-sync-filenode: 0.3.3
pkg::any-sync-coordinator: 0.2.5
pkg::any-sync-consensusnode: 0.0.1
pkg::any-sync-node: 0.3.17
pkg::any-sync-filenode: 0.5.4
pkg::any-sync-coordinator: 0.3.6
pkg::any-sync-consensusnode: 0.1.1

anysync::node: false
anysync::filenode: false
Expand Down
11 changes: 8 additions & 3 deletions manifests/consensusnode/monitoring.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class anysync::consensusnode::monitoring {
if $::anysync::monitoring {
common::consul_cfg { "any-sync-consensusnode": port => 8000 }
class anysync::consensusnode::monitoring (
Boolean $consul = $::anysync::monitoring,
Boolean $collectd = $::anysync::monitoring,
) {
if $consul {
tools::consul_cfg { "any-sync-consensusnode": port => 8000 }
}
if $collectd {
collectd::cfg { "any-sync-consensusnode": content => inline_template("LoadPlugin processes\n<Plugin processes>\n ProcessMatch \"any-sync-consensusnode\" \"/bin/any-sync-consensusnode\"\n</Plugin>\n") }
}
}
11 changes: 8 additions & 3 deletions manifests/coordinator/monitoring.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class anysync::coordinator::monitoring {
if $::anysync::monitoring {
common::consul_cfg { "any-sync-coordinator": port => 8000 }
class anysync::coordinator::monitoring (
Boolean $consul = $::anysync::monitoring,
Boolean $collectd = $::anysync::monitoring,
) {
if $consul {
tools::consul_cfg { "any-sync-coordinator": port => 8000 }
}
if $collectd {
collectd::cfg { "any-sync-coordinator": content => inline_template("LoadPlugin processes\n<Plugin processes>\n ProcessMatch \"any-sync-coordinator\" \"/bin/any-sync-coordinator\"\n</Plugin>\n") }
}
}
11 changes: 8 additions & 3 deletions manifests/filenode/monitoring.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class anysync::filenode::monitoring {
if $::anysync::monitoring {
common::consul_cfg { "any-sync-filenode": port => 8000 }
class anysync::filenode::monitoring (
Boolean $consul = $::anysync::monitoring,
Boolean $collectd = $::anysync::monitoring,
) {
if $consul {
tools::consul_cfg { "any-sync-filenode": port => 8000 }
}
if $collectd {
collectd::cfg { "any-sync-filenode": content => inline_template("LoadPlugin processes\n<Plugin processes>\n ProcessMatch \"any-sync-filenode\" \"/bin/any-sync-filenode\"\n</Plugin>\n") }
}
}
11 changes: 8 additions & 3 deletions manifests/node/monitoring.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class anysync::node::monitoring {
if $::anysync::monitoring {
common::consul_cfg { "any-sync-node": port => 8000 }
class anysync::node::monitoring (
Boolean $consul = $::anysync::monitoring,
Boolean $collectd = $::anysync::monitoring,
) {
if $consul {
tools::consul_cfg { "any-sync-node": port => 8000 }
}
if $collectd {
collectd::cfg { "any-sync-node": content => inline_template("LoadPlugin processes\n<Plugin processes>\n ProcessMatch \"any-sync-node\" \"/bin/any-sync-node\"\n</Plugin>\n") }
}
}

0 comments on commit 19cb382

Please sign in to comment.