parameterize zabbix and munin servers
This commit is contained in:
parent
8775060bee
commit
5257611b84
|
@ -48,6 +48,13 @@ page), and credentials for fastd and openvpn.
|
||||||
Example puppet code (save e.g. as `/etc/puppet/gw.pp`):
|
Example puppet code (save e.g. as `/etc/puppet/gw.pp`):
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
class { 'ff_gw::sysadmin':
|
||||||
|
# both optional, used for FFHH monitoring:
|
||||||
|
zabbixserver => 'argos.mschuette.name',
|
||||||
|
muninserver => '78.47.49.236',
|
||||||
|
}
|
||||||
|
|
||||||
class { 'ff_gw':
|
class { 'ff_gw':
|
||||||
# user accounts:
|
# user accounts:
|
||||||
accounts => {
|
accounts => {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# kitchen sink class for various small settings
|
# kitchen sink class for various small settings
|
||||||
class ff_gw::sysadmin {
|
class ff_gw::sysadmin($zabbixserver = '127.0.0.1', $muninserver = '127.0.0.1') {
|
||||||
|
|
||||||
# use Hiera as a Puppet data source
|
# use Hiera as a Puppet data source
|
||||||
file {
|
file {
|
||||||
|
@ -62,8 +62,8 @@ class ff_gw::sysadmin {
|
||||||
file { '/etc/zabbix/zabbix_agentd.d/argos_monitoring.conf':
|
file { '/etc/zabbix/zabbix_agentd.d/argos_monitoring.conf':
|
||||||
ensure => file,
|
ensure => file,
|
||||||
content => "# managed by puppet
|
content => "# managed by puppet
|
||||||
Server=argos.mschuette.name
|
Server=${zabbixserver}
|
||||||
ServerActive=argos.mschuette.name
|
ServerActive=${zabbixserver}
|
||||||
HostnameItem=${::hostname}
|
HostnameItem=${::hostname}
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ ignore_file \.pod$
|
||||||
port 4949
|
port 4949
|
||||||
|
|
||||||
host_name <%= @fqdn %>
|
host_name <%= @fqdn %>
|
||||||
cidr_allow 78.47.49.236/32
|
cidr_allow <%= @muninserver %>/32
|
||||||
host <%= @ipaddress_eth0 %>
|
host <%= @ipaddress_eth0 %>
|
||||||
');
|
');
|
||||||
'/usr/share/munin/plugins/vnstat_':
|
'/usr/share/munin/plugins/vnstat_':
|
||||||
|
|
Loading…
Reference in a new issue