Faidon Liambotis has uploaded a new change for review. https://gerrit.wikimedia.org/r/106756
Change subject: librenms: another round of misc fixes ...................................................................... librenms: another round of misc fixes - Add a project name, title & logo - Switch RRD storage to /srv/, as there's plenty of (LVM) space there. - Enable mod_rewrite, since it's used by .htaccess - Switch docroot to /html, as originally intended. - Change Nagios check to mention "LibreNMS HTTP" in the description, to make clear which service is broken. - Remove now virtual php5-json; add php-net-ipv4/6 - Fix a typo in one of the crontabs - Fix config.php to not override LibreNMS' default settings Change-Id: I80170aa558ff4d132c99582f4106731d980aae29 --- M manifests/role/librenms.pp M modules/librenms/manifests/init.pp M modules/librenms/templates/config.php.erb 3 files changed, 14 insertions(+), 15 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/56/106756/1 diff --git a/manifests/role/librenms.pp b/manifests/role/librenms.pp index 4eb22f5..b2e5f06 100644 --- a/manifests/role/librenms.pp +++ b/manifests/role/librenms.pp @@ -19,10 +19,13 @@ $install_dir = '/srv/deployment/librenms/librenms' $config = { + 'project_name' => 'Wikimedia NMS', + 'project_id' => 'librenms', + 'title_image' => 'url(//upload.wikimedia.org/wikipedia/commons/thumb/c/c4/Wikimedia_Foundation_RGB_logo_with_text.svg/100px-Wikimedia_Foundation_RGB_logo_with_text.svg.png)', + 'install_dir' => $install_dir, - 'html_dir' => "${install_dir}/html", + 'rrd_dir' => '/srv/librenms/rrd', 'log_file' => '/var/log/librenms.log', - 'rrd_dir' => '/var/lib/librenms/rrd', 'db_host' => 'db1001.eqiad.wmnet', 'db_user' => $passwords::librenms::db_user, @@ -57,9 +60,9 @@ config => $config, } - @webserver::apache::module { 'php5': } + @webserver::apache::module { [ 'php5', 'rewrite' ]: } @webserver::apache::site { $sitename: - docroot => $install_dir, + docroot => "${install_dir}/html", require => [ Webserver::Apache::Module['php5'], Class['::librenms'], @@ -72,7 +75,7 @@ } monitor_service { 'librenms': - description => 'HTTP', + description => 'LibreNMS HTTP', check_command => "check_http_url!${sitename}!http://${sitename}", } } diff --git a/modules/librenms/manifests/init.pp b/modules/librenms/manifests/init.pp index a965a2b..ffff8b0 100644 --- a/modules/librenms/manifests/init.pp +++ b/modules/librenms/manifests/init.pp @@ -44,13 +44,6 @@ require => Group['librenms'], } - file { [ '/var/lib/librenms', '/var/lib/librenms/rrd' ]: - ensure => directory, - owner => 'librenms', - group => 'librenms', - mode => '0755', - } - file { '/etc/logrotate.d/librenms': ensure => present, owner => 'root', @@ -61,10 +54,11 @@ package { [ 'php5-cli', 'php5-gd', - 'php5-json', 'php5-mcrypt', 'php5-mysql', 'php5-snmp', + 'php-net-ipv4', + 'php-net-ipv6', 'php-pear', 'fping', 'graphviz', @@ -90,7 +84,7 @@ cron { 'librenms-discovery-new': ensure => present, user => 'librenms', - command => "${install_dir}/discovery.php -h all >> /dev/null 2>&1", + command => "${install_dir}/discovery.php -h new >> /dev/null 2>&1", minute => '*/5', require => User['librenms'], } diff --git a/modules/librenms/templates/config.php.erb b/modules/librenms/templates/config.php.erb index b65bc2f..49a14a6 100644 --- a/modules/librenms/templates/config.php.erb +++ b/modules/librenms/templates/config.php.erb @@ -1,6 +1,8 @@ <?php # This file is managed by Puppet! -$config = <%= scope.function_phpdump(@config) %>; +$puppet_config = <%= scope.function_phpdump(@config) %>; + +$config = array_merge($config, $puppet_config); ?> -- To view, visit https://gerrit.wikimedia.org/r/106756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I80170aa558ff4d132c99582f4106731d980aae29 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Faidon Liambotis <fai...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits