nginx: remove icinga2, telegraf and pacman references

This commit is contained in:
Rico 2021-12-21 17:16:50 +01:00
parent 1b1c5a8502
commit 927a8f2e0c
Signed by: stillbeben
GPG key ID: AE1066B5BD0B5041
2 changed files with 9 additions and 41 deletions

View file

@ -1,11 +1,10 @@
from datetime import datetime, timedelta from datetime import datetime, timedelta
if node.has_bundle('pacman'): pkg_apt = {
package = 'pkg_pacman:nginx' 'nginx': {
username = 'http' 'needs': ['file:/etc/apt/sources.list.d/nginx.list'],
else: },
package = 'pkg_apt:nginx' }
username = 'www-data'
directories = { directories = {
'/etc/nginx/sites': { '/etc/nginx/sites': {
@ -24,9 +23,9 @@ directories = {
}, },
}, },
'/var/log/nginx-timing': { '/var/log/nginx-timing': {
'owner': username, 'owner': 'http',
'needs': { 'needs': {
package, 'pkg_apt:nginx',
}, },
}, },
'/var/www': {}, '/var/www': {},
@ -39,7 +38,7 @@ files = {
'/etc/nginx/nginx.conf': { '/etc/nginx/nginx.conf': {
'content_type': 'mako', 'content_type': 'mako',
'context': { 'context': {
'username': username, 'username': 'http',
**node.metadata['nginx'], **node.metadata['nginx'],
}, },
'triggers': { 'triggers': {
@ -89,7 +88,7 @@ svc_systemd = {
'needs': { 'needs': {
'action:nginx-generate-dhparam', 'action:nginx-generate-dhparam',
'directory:/var/log/nginx-timing', 'directory:/var/log/nginx-timing',
package, 'pkg_apt:nginx',
}, },
}, },
} }

View file

@ -9,48 +9,17 @@ defaults = {
}, },
}, },
}, },
'packages': {
'nginx': {},
},
}, },
'backups': { 'backups': {
'paths': { 'paths': {
'/var/www', '/var/www',
}, },
}, },
'icinga2_api': {
'nginx': {
'services': {
'NGINX PROCESS': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_systemd_unit nginx',
},
'NGINX STATUS': {
'command_on_monitored_host': '/usr/local/share/icinga/plugins/check_nginx_status',
},
},
},
},
'nginx': { 'nginx': {
'worker_connections': 768, 'worker_connections': 768,
}, },
'pacman': {
'packages': {
'nginx': {},
},
},
} }
if node.has_bundle('telegraf'):
defaults['telegraf'] = {
'input_plugins': {
'builtin': {
'nginx': [{
'urls': ['http://localhost:22999/server_status'],
}],
},
},
}
@metadata_reactor.provides( @metadata_reactor.provides(
'nginx/worker_processes', 'nginx/worker_processes',