summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Dessaux2018-03-13 18:49:27 +0100
committerJulien Dessaux2018-03-13 18:49:56 +0100
commit84f6a6d1c31a8dd8cc610c9e23420ccad493f477 (patch)
tree643f5458f8a940cd495f2626ee71870c87f2fd1d
parentEnsure sshd is running on linux servers (diff)
downloadmasterfiles-84f6a6d1c31a8dd8cc610c9e23420ccad493f477.tar.gz
masterfiles-84f6a6d1c31a8dd8cc610c9e23420ccad493f477.tar.bz2
masterfiles-84f6a6d1c31a8dd8cc610c9e23420ccad493f477.zip
Removed deprecated ipam policy and cleaned reality remnants in nagios config
Diffstat (limited to '')
-rw-r--r--services/applications.cf1
-rw-r--r--services/applications/ipam.cf41
-rw-r--r--services/main.cf2
-rw-r--r--templates/nagios/conf.d/docker/miniflux.adyxax.org.cfg2
-rw-r--r--templates/nagios/conf.d/docker/phpipam.adyxax.org.cfg2
-rw-r--r--templates/nagios/conf.d/hostgroups.cfg9
-rw-r--r--templates/nagios/conf.d/servers/collab.cfg2
-rw-r--r--templates/nagios/conf.d/servers/myth.cfg (renamed from templates/nagios/conf.d/servers/reality.cfg)4
-rw-r--r--templates/nginx/ipam_nginx.conf62
9 files changed, 12 insertions, 113 deletions
diff --git a/services/applications.cf b/services/applications.cf
index 2c66ca8..a9910b9 100644
--- a/services/applications.cf
+++ b/services/applications.cf
@@ -4,7 +4,6 @@ body file control
"services/applications/bareos_fd.cf",
"services/applications/check_mk.cf",
"services/applications/fcgiwrap.cf",
- "services/applications/ipam.cf",
"services/applications/nagios.cf",
"services/applications/nginx.cf",
"services/applications/nrpe.cf",
diff --git a/services/applications/ipam.cf b/services/applications/ipam.cf
deleted file mode 100644
index 067cb29..0000000
--- a/services/applications/ipam.cf
+++ /dev/null
@@ -1,41 +0,0 @@
-bundle agent ipam
-{
- vars:
- ipam::
- "config[host]" string => "mysql01";
- "config[user]" string => "phpipam";
- "config[pass]" string => "Hee0Hai8lie2gaaBia8xaisieSiengie";
- "config[name]" string => "phpipam";
- "config[port]" string => "3306";
- "index" slist => getindices("ipam.config");
- "packages" slist => {
- "pear",
- "php56-filter",
- "php56-gettext",
- "php56-gd",
- "php56-gmp",
- "php56-json",
- "php56-mbstring",
- "php56-openssl",
- "php56-pdo_mysql",
- "php56-session",
- "php56-simplexml",
- "php56-sockets",
- };
- methods:
- ipam::
- "ipam" usebundle => install_package("$(this.bundle)", "$(ipam.packages)");
- "ipam" usebundle => fcgiwrap("nobody", "www", "770");
- "ipam" usebundle => php56();
- "ipam" usebundle => nginx("$(sys.inputdir)/templates/nginx/ipam_nginx.conf", "nginx.conf");
- files:
- ipam::
- "/var/www/phpipam/config.php"
- create => "true",
- perms => system_owned("444"),
- edit_line => regex_replace("\$db\['$(index)'\]\s+=\s+\"(?!$(config[$(index)]))[^\"]+\";", "$db['$(index)'] = \"$(config[$(index)])\";"),
- classes => if_repaired("ipam_ipam_config_php_repaired");
- reports:
- any::
- "$(this.bundle): /var/www/phpipam/config.php repaired" ifvarclass => "ipam_ipam_config_php_repaired";
-}
diff --git a/services/main.cf b/services/main.cf
index 45d7521..786524e 100644
--- a/services/main.cf
+++ b/services/main.cf
@@ -48,8 +48,6 @@ bundle common classify
bundle agent main
{
methods:
- ipam::
- "ipam" usebundle => ipam;
nagios::
"nagios" usebundle => nagios;
}
diff --git a/templates/nagios/conf.d/docker/miniflux.adyxax.org.cfg b/templates/nagios/conf.d/docker/miniflux.adyxax.org.cfg
index 2243d50..7b9ab96 100644
--- a/templates/nagios/conf.d/docker/miniflux.adyxax.org.cfg
+++ b/templates/nagios/conf.d/docker/miniflux.adyxax.org.cfg
@@ -2,5 +2,5 @@ define host {
use workhours
host_name miniflux.adyxax.org
address miniflux
- parents reality.adyxax.org
+ parents myth.adyxax.org
}
diff --git a/templates/nagios/conf.d/docker/phpipam.adyxax.org.cfg b/templates/nagios/conf.d/docker/phpipam.adyxax.org.cfg
index ea8d270..8aee904 100644
--- a/templates/nagios/conf.d/docker/phpipam.adyxax.org.cfg
+++ b/templates/nagios/conf.d/docker/phpipam.adyxax.org.cfg
@@ -2,5 +2,5 @@ define host {
use workhours
host_name phpipam.adyxax.org
address phpipam
- parents reality.adyxax.org
+ parents myth.adyxax.org
}
diff --git a/templates/nagios/conf.d/hostgroups.cfg b/templates/nagios/conf.d/hostgroups.cfg
index e05049e..068bdd4 100644
--- a/templates/nagios/conf.d/hostgroups.cfg
+++ b/templates/nagios/conf.d/hostgroups.cfg
@@ -22,6 +22,11 @@ define hostgroup {
define hostgroup {
hostgroup_name ubuntu-servers
alias Ubuntu Servers
- members collab.adyxax.org, \
- reality.adyxax.org
+ members collab.adyxax.org
+}
+
+define hostgroup {
+ hostgroup_name centos-servers
+ alias Centos Servers
+ members myth.adyxax.org
}
diff --git a/templates/nagios/conf.d/servers/collab.cfg b/templates/nagios/conf.d/servers/collab.cfg
index 5f25243..0afba81 100644
--- a/templates/nagios/conf.d/servers/collab.cfg
+++ b/templates/nagios/conf.d/servers/collab.cfg
@@ -2,5 +2,5 @@ define host {
use workhours
host_name collab.adyxax.org
address collab
- parents cobsd.adyxax.org, reality.adyxax.org
+ parents cobsd.adyxax.org
}
diff --git a/templates/nagios/conf.d/servers/reality.cfg b/templates/nagios/conf.d/servers/myth.cfg
index 7998e4d..1159c14 100644
--- a/templates/nagios/conf.d/servers/reality.cfg
+++ b/templates/nagios/conf.d/servers/myth.cfg
@@ -1,6 +1,6 @@
define host {
use workhours
- host_name reality.adyxax.org
- address reality
+ host_name myth.adyxax.org
+ address myth
parents cobsd.adyxax.org
}
diff --git a/templates/nginx/ipam_nginx.conf b/templates/nginx/ipam_nginx.conf
deleted file mode 100644
index fe703ef..0000000
--- a/templates/nginx/ipam_nginx.conf
+++ /dev/null
@@ -1,62 +0,0 @@
-worker_processes 1;
-
-# This default error log path is compiled-in to make sure configuration parsing
-# errors are logged somewhere, especially during unattended boot when stderr
-# isn't normally logged anywhere. This path will be touched on every nginx
-# start regardless of error log location configured here. See
-# https://trac.nginx.org/nginx/ticket/147 for more info.
-#
-#error_log /var/log/nginx/error.log;
-
-events {
- worker_connections 1024;
-}
-
-http {
- include mime.types;
- default_type application/octet-stream;
-
- sendfile on;
- keepalive_timeout 65;
- gzip on;
-
- server {
- listen 80;
- server_name localhost;
-
- root /var/www/phpipam/;
-
- location ~ ^/(favicon.ico|robots.txt)$ {
- access_log off;
- expires max;
- }
- location ~ ^/(api/controllers|api/README|app|db|functions|install|misc|upgrade|INSTALL.txt|README|UPDATE)$ {
- deny all;
- access_log off;
- log_not_found off;
- }
- location /nginx_status { stub_status on; access_log off; allow 127.0.0.1; deny all; }
-
- location / {
- index index.php;
- try_files $uri $uri/ index.php;
- }
-
- #error_page 404 /404.html;
-
- # redirect server error pages to the static page /50x.html
- error_page 500 502 503 504 /50x.html;
- location = /50x.html {
- root /usr/local/www/nginx-dist;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_index index.php;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- fastcgi_pass_header Authorization;
- }
- }
-}
-