[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Triple Change Request



Okay, I've got a triple whammy...

1) I want to teach proxy5 about bapp1 (patch 0001)
2) I want to fix up the httpd config for zabbix on the proxies (patch
0002)
3) I want to be able to flip the send remote commands/active checks
depending on where a machine is - security (patch 0003)

Patch 0003 also includes a lot of tabs->spaces because they annoyed me
so much.

Can I get some plusy-oneys?

- Nigel
-- 
Nigel Jones <dev nigelj com>
>From a0edfff46ad5ba17c2b0a05dea4f440099794d6e Mon Sep 17 00:00:00 2001
From: Nigel Jones <nigelj puppet1 fedora phx redhat com>
Date: Sun, 26 Oct 2008 09:35:21 +0000
Subject: [PATCH] Teach proxy5 about bapp1

---
 manifests/nodes/proxy5.fedoraproject.org.pp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/manifests/nodes/proxy5.fedoraproject.org.pp b/manifests/nodes/proxy5.fedoraproject.org.pp
index 44ccf48..60a6aae 100644
--- a/manifests/nodes/proxy5.fedoraproject.org.pp
+++ b/manifests/nodes/proxy5.fedoraproject.org.pp
@@ -22,6 +22,11 @@ node proxy5{
         alias => ['app4', 'app4.fedoraproject.org']
     }
 
+    host { 'bapp1.fedora.phx.redhat.com':
+        ip => '192.168.1.41',
+        alias => ['bapp4', 'bapp1.fedoraproject.org']
+    }
+
     host { 'fas1.fedora.phx.redhat.com':
         ip => '192.168.1.38',
         alias => ['fas1', 'fas1.fedoraproject.org']
-- 
1.5.5.1

>From 2b25e53164e241526aced431c4fa02f594baf70c Mon Sep 17 00:00:00 2001
From: Nigel Jones <nigelj puppet1 fedora phx redhat com>
Date: Sun, 26 Oct 2008 10:17:13 +0000
Subject: [PATCH] Fix up the rewrite so it works properly

---
 modules/zabbix/files/zabbix-proxy.conf |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/zabbix/files/zabbix-proxy.conf b/modules/zabbix/files/zabbix-proxy.conf
index 9920f92..747b636 100644
--- a/modules/zabbix/files/zabbix-proxy.conf
+++ b/modules/zabbix/files/zabbix-proxy.conf
@@ -1,5 +1,5 @@
 ProxyPass /zabbixold http://noc1.fedora.phx.redhat.com/zabbix
 ProxyPassReverse /zabbixold http://noc1.fedora.phx.redhat.com/zabbix
 
-RewriteRule ^/zabbix/(.*)     http://localhost:10010/zabbix/$1 [P,L]
+RewriteRule ^/zabbix(.*)     http://localhost:10010/zabbix$1 [P,L]
 
-- 
1.5.5.1

>From 10194afec88399995656d15fbd4207da90cb5747 Mon Sep 17 00:00:00 2001
From: Nigel Jones <nigelj puppet1 fedora phx redhat com>
Date: Sun, 26 Oct 2008 21:51:42 +0000
Subject: [PATCH] 1. Fix up tabs in zabbix manifest
 2. Add ability to turn off active checks & remote commands for various hosts etc etc (just non-phx/vpn hosts for now)

---
 modules/zabbix/manifests/init.pp                |  155 ++++++++++++-----------
 modules/zabbix/templates/zabbix_agentd.conf.erb |    4 +-
 2 files changed, 83 insertions(+), 76 deletions(-)

diff --git a/modules/zabbix/manifests/init.pp b/modules/zabbix/manifests/init.pp
index dd9e733..655c622 100644
--- a/modules/zabbix/manifests/init.pp
+++ b/modules/zabbix/manifests/init.pp
@@ -1,94 +1,101 @@
 class zabbix::agent {
-	case $location {
-        	"phx" : {
-			$zabbix_serverip = '10.8.34.53,192.168.1.10,::ffff:10.8.34.53,::ffff:192.168.1.10'
-        	}
-	        "vpn" : {
-        		$zabbix_serverip = '192.168.1.10,10.8.34.53,::ffff:192.168.1.10,::ffff:10.8.34.53'
-	        }
-	        default : {
-	        	$zabbix_serverip = '10.8.34.53,192.168.1.10,::ffff:10.8.34.53,::ffff:192.168.1.10,209.132.177.200,::ffff:209.132.177.200'
-	        }
-	}
-
-        package { zabbix-agent:
-                ensure => latest,
-                notify => Service['zabbix-agent'],
+    case $location {
+        "phx" : {
+            $zabbix_serverip = '10.8.34.53,192.168.1.10,::ffff:10.8.34.53,::ffff:192.168.1.10'
+            $zabbix_remotecmd = 1
+            $zabbix_disableactive = 0
+        }
+        "vpn" : {
+            $zabbix_serverip = '192.168.1.10,10.8.34.53,::ffff:192.168.1.10,::ffff:10.8.34.53'
+            $zabbix_remotecmd = 1
+            $zabbix_disableactive = 0
         }
+        default : {
+            $zabbix_serverip = '10.8.34.53,192.168.1.10,::ffff:10.8.34.53,::ffff:192.168.1.10,209.132.177.200,::ffff:209.132.177.200'
+            $zabbix_remotecmd = 0
+            $zabbix_disableactive = 1
+        }
+    }
+}
 
-	file {
-		'/etc/zabbix/zabbix_agentd.conf':
-                	content => template('zabbix/zabbix_agentd.conf.erb'),
-			mode => 0644,
-        	        owner => 'zabbix',
-			group => 'root',
-	                require => Package['zabbix-agent'],
-        	        notify => Service['zabbix-agent'];
+    package { zabbix-agent:
+        ensure => latest,
+        notify => Service['zabbix-agent'],
+    }
 
-		'/usr/local/bin/mail-queue-stats':
-			source => 'puppet:///zabbix/mail-queue-stats',
-			mode => 0755,
-			owner => root,
-			group => root;
-        }	
+    file {
+        '/etc/zabbix/zabbix_agentd.conf':
+        content => template('zabbix/zabbix_agentd.conf.erb'),
+        mode => 0644,
+        owner => 'zabbix',
+        group => 'root',
+        require => Package['zabbix-agent'],
+        notify => Service['zabbix-agent'];
 
-        service { zabbix-agent:
-            ensure => running,
-            enable => true,
-            hasstatus => true,
-            require => Package['zabbix-agent'],
-            subscribe => File['/etc/zabbix/zabbix_agentd.conf']
-        }
+        '/usr/local/bin/mail-queue-stats':
+        source => 'puppet:///zabbix/mail-queue-stats',
+        mode => 0755,
+        owner => root,
+        group => root;
+    }
+
+    service { zabbix-agent:
+        ensure => running,
+        enable => true,
+        hasstatus => true,
+        require => Package['zabbix-agent'],
+        subscribe => File['/etc/zabbix/zabbix_agentd.conf']
+    }
 }
 
 class zabbix::server {
-        package { zabbix-server-mysql:
-                ensure => latest,
-                notify => Service['zabbix-server'],
-        }
+    package { zabbix-server-mysql:
+        ensure => latest,
+        notify => Service['zabbix-server'],
+    }
 
-        service { zabbix-server:
-            ensure => running,
-            enable => true,
-            hasstatus => true,
-            require => Package['zabbix-server-mysql']
-        }
+    service { zabbix-server:
+        ensure => running,
+        enable => true,
+        hasstatus => true,
+        require => Package['zabbix-server-mysql']
+    }
 
-        templatefile { '/etc/zabbix/zabbix_server.conf':
-                content => template('zabbix/zabbix_server.conf.erb'),
-                owner => 'zabbix',
-                mode => '400',
-                require => Package['zabbix-server-mysql'],
-                notify => Service['zabbix-server'],
-        }
+    templatefile { '/etc/zabbix/zabbix_server.conf':
+        content => template('zabbix/zabbix_server.conf.erb'),
+        owner => 'zabbix',
+        mode => '400',
+        require => Package['zabbix-server-mysql'],
+        notify => Service['zabbix-server'],
+    }
 }
 
 class zabbix::web {
-        #Make sure we get php.ini
-        include apache::php
-        package { zabbix-web-mysql:
-                ensure => latest,
-        }
+    #Make sure we get php.ini
+    include apache::php
+    package { zabbix-web-mysql:
+        ensure => latest,
+    }
 
-        file { "/etc/httpd/conf.d/zabbix.conf":
-                notify => Service['httpd'],
-                source => 'puppet:///zabbix/zabbix-http.conf',
-                require => Package['zabbix-web-mysql']
-        }
+    file { "/etc/httpd/conf.d/zabbix.conf":
+        notify => Service['httpd'],
+        source => 'puppet:///zabbix/zabbix-http.conf',
+        require => Package['zabbix-web-mysql']
+    }
 
-        file { '/etc/zabbix/zabbix.conf.php':
-                content => template('zabbix/zabbix.conf.php.erb'),
-                owner => 'zabbix',
-                group => 48,
-                mode => '440',
-                require => Package['zabbix-web-mysql'],
-        }
+    file { '/etc/zabbix/zabbix.conf.php':
+        content => template('zabbix/zabbix.conf.php.erb'),
+        owner => 'zabbix',
+        group => 48,
+        mode => '440',
+        require => Package['zabbix-web-mysql'],
+    }
 }
 
 class zabbix::proxy inherits httpd {
-        file { "/etc/httpd/conf.d/admin.fedoraproject.org/zabbix.conf":
-            source => "puppet:///zabbix/zabbix-proxy.conf",
-            notify => Service['httpd'],
-        }
+    file { "/etc/httpd/conf.d/admin.fedoraproject.org/zabbix.conf":
+        source => "puppet:///zabbix/zabbix-proxy.conf",
+        notify => Service['httpd'],
+    }
 }
 
diff --git a/modules/zabbix/templates/zabbix_agentd.conf.erb b/modules/zabbix/templates/zabbix_agentd.conf.erb
index 3a2f56b..328187e 100644
--- a/modules/zabbix/templates/zabbix_agentd.conf.erb
+++ b/modules/zabbix/templates/zabbix_agentd.conf.erb
@@ -40,11 +40,11 @@ RefreshActiveChecks=120
 
 # Disable active checks. The agent will work in passive mode listening server.
 
-DisableActive=0
+DisableActive=<%= zabbix_disableactive %>
 
 # Enable remote commands for ZABBIX agent. By default remote commands disabled.
 
-EnableRemoteCommands=0
+EnableRemoteCommands=<%= zabbix_remotecmd %>
 
 # Specifies debug level
 # 0 - debug is not created
-- 
1.5.5.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]