mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 16:24:04 +02:00
Vagrant: Add monitoring module config
This commit is contained in:
parent
39c80dccaf
commit
7bf888a554
@ -0,0 +1,19 @@
|
|||||||
|
[localdb]
|
||||||
|
|
||||||
|
type = ido
|
||||||
|
resource = "ido"
|
||||||
|
|
||||||
|
[locallive]
|
||||||
|
disabled = "1"
|
||||||
|
type = livestatus
|
||||||
|
resource = livestatus
|
||||||
|
|
||||||
|
[localfile]
|
||||||
|
disabled = "1"
|
||||||
|
type = statusdat
|
||||||
|
resource = statusdat
|
||||||
|
|
||||||
|
;[localfailsafe]
|
||||||
|
;enabled=false
|
||||||
|
;type = combo
|
||||||
|
;backends = localdb, locallive, localfile
|
@ -0,0 +1,2 @@
|
|||||||
|
[icinga]
|
||||||
|
path = "/usr/local/icinga-mysql/var/rw/icinga.cmd"
|
@ -0,0 +1,76 @@
|
|||||||
|
|
||||||
|
[Problems]
|
||||||
|
priority = 20
|
||||||
|
icon = "img/icons/error.png"
|
||||||
|
|
||||||
|
[Problems.Unhandled Hosts]
|
||||||
|
icon = "img/icons/host.png"
|
||||||
|
priority = 50
|
||||||
|
url = "monitoring/list/hosts?host_problem=1&host_handled=0"
|
||||||
|
|
||||||
|
[Problems.Unhandled Services]
|
||||||
|
icon = "img/icons/service.png"
|
||||||
|
priority = 50
|
||||||
|
url = "monitoring/list/services?service_problem=1&service_handled=0"
|
||||||
|
|
||||||
|
[Problems.Current Downtimes]
|
||||||
|
url = "monitoring/list/downtimes?downtime_is_in_effect=1"
|
||||||
|
icon = "img/icons/down.png"
|
||||||
|
|
||||||
|
[Overview]
|
||||||
|
priority = 30
|
||||||
|
icon = "img/icons/hostgroup.png"
|
||||||
|
|
||||||
|
[Overview.Hosts]
|
||||||
|
title = "Hosts"
|
||||||
|
url = "monitoring/list/hosts"
|
||||||
|
icon = "img/icons/host.png"
|
||||||
|
priority = 50
|
||||||
|
|
||||||
|
[Overview.Services]
|
||||||
|
title = "Services"
|
||||||
|
url = "monitoring/list/services"
|
||||||
|
icon = "img/icons/service.png"
|
||||||
|
priority = 50
|
||||||
|
|
||||||
|
[Overview.Servicegroups]
|
||||||
|
title = "Servicegroups"
|
||||||
|
url = "monitoring/list/servicegroups"
|
||||||
|
icon = "img/icons/servicegroup.png"
|
||||||
|
priority = 60
|
||||||
|
|
||||||
|
[Overview.Hostgroups]
|
||||||
|
title = "Hostgroups"
|
||||||
|
url = "monitoring/list/hostgroups"
|
||||||
|
icon = "img/icons/hostgroup.png"
|
||||||
|
priority = 60
|
||||||
|
|
||||||
|
[Overview.Downtimes]
|
||||||
|
title = "Downtimes"
|
||||||
|
url = "monitoring/list/downtimes"
|
||||||
|
icon = "img/icons/down.png"
|
||||||
|
priority = 70
|
||||||
|
|
||||||
|
[Overview.Comments]
|
||||||
|
title = "Comments"
|
||||||
|
url = "monitoring/list/comments"
|
||||||
|
icon = "img/icons/comment.png"
|
||||||
|
priority = 70
|
||||||
|
|
||||||
|
[History]
|
||||||
|
icon = "img/icons/history.png"
|
||||||
|
|
||||||
|
[History.Notifications]
|
||||||
|
title = "Notifications"
|
||||||
|
url = "monitoring/list/notifications"
|
||||||
|
icon = "img/icons/notification.png"
|
||||||
|
|
||||||
|
[History.Events]
|
||||||
|
title = "All Events"
|
||||||
|
url = "monitoring/list/eventhistory"
|
||||||
|
icon = "img/icons/history.png"
|
||||||
|
|
||||||
|
[System.Performance]
|
||||||
|
title = "Performance"
|
||||||
|
url = "monitoring/process/performance"
|
||||||
|
|
@ -637,3 +637,45 @@ file { '/etc/icingaweb/resources.ini':
|
|||||||
group => 'apache',
|
group => 'apache',
|
||||||
require => File['/etc/icingaweb']
|
require => File['/etc/icingaweb']
|
||||||
}
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/enabledModules':
|
||||||
|
ensure => 'directory',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/modules':
|
||||||
|
ensure => 'directory',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/modules/monitoring':
|
||||||
|
ensure => 'directory',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb/modules']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/modules/monitoring/backends.ini':
|
||||||
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/modules/monitoring/backends.ini',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb/modules/monitoring']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/modules/monitoring/instances.ini':
|
||||||
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/modules/monitoring/instances.ini',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb/modules/monitoring']
|
||||||
|
}
|
||||||
|
|
||||||
|
file { '/etc/icingaweb/modules/monitoring/menu.ini':
|
||||||
|
source => 'puppet:////vagrant/.vagrant-puppet/files/etc/icingaweb/modules/monitoring/menu.ini',
|
||||||
|
owner => 'apache',
|
||||||
|
group => 'apache',
|
||||||
|
require => File['/etc/icingaweb/modules/monitoring']
|
||||||
|
}
|
||||||
|
@ -113,7 +113,7 @@ class ConfigController extends BaseConfigController
|
|||||||
{
|
{
|
||||||
$this->view->messageBox = new AlertMessageBox(true);
|
$this->view->messageBox = new AlertMessageBox(true);
|
||||||
$form = new GeneralForm();
|
$form = new GeneralForm();
|
||||||
$form->setConfiguration(IcingaConfig::app());
|
//$form->setConfiguration(IcingaConfig::app());
|
||||||
$form->setRequest($this->_request);
|
$form->setRequest($this->_request);
|
||||||
if ($form->isSubmittedAndValid()) {
|
if ($form->isSubmittedAndValid()) {
|
||||||
if (!$this->writeConfigFile($form->getConfig(), 'config')) {
|
if (!$this->writeConfigFile($form->getConfig(), 'config')) {
|
||||||
|
@ -28,13 +28,14 @@
|
|||||||
*/
|
*/
|
||||||
// {{{ICINGA_LICENSE_HEADER}}}
|
// {{{ICINGA_LICENSE_HEADER}}}
|
||||||
|
|
||||||
use \Icinga\Web\Controller\ActionController;
|
use Icinga\Web\Controller\ActionController;
|
||||||
use \Icinga\Web\Url;
|
use Icinga\Web\Url;
|
||||||
use \Icinga\Application\Icinga;
|
use Icinga\Web\Widget\Dashboard;
|
||||||
use \Icinga\Web\Widget\Dashboard;
|
use Icinga\Application\Config as IcingaConfig;
|
||||||
use \Icinga\Application\Config as IcingaConfig;
|
use Icinga\Form\Dashboard\AddUrlForm;
|
||||||
use \Icinga\Form\Dashboard\AddUrlForm;
|
use Icinga\Exception\ConfigurationError;
|
||||||
use \Icinga\Exception\ConfigurationError;
|
use Icinga\Exception\NotReadableError;
|
||||||
|
use Icinga\Application\Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle creation, removal and displaying of dashboards, panes and components
|
* Handle creation, removal and displaying of dashboards, panes and components
|
||||||
@ -53,7 +54,12 @@ class DashboardController extends ActionController
|
|||||||
private function getDashboard($config = 'dashboard/dashboard')
|
private function getDashboard($config = 'dashboard/dashboard')
|
||||||
{
|
{
|
||||||
$dashboard = new Dashboard();
|
$dashboard = new Dashboard();
|
||||||
$dashboard->readConfig(IcingaConfig::app($config));
|
try {
|
||||||
|
$dashboardConfig = IcingaConfig::app($config);
|
||||||
|
$dashboard->readConfig($dashboardConfig);
|
||||||
|
} catch (NotReadableError $e) {
|
||||||
|
Logger::exception(new Exception('Cannot load dashboard configuration. An exception was thrown:', 0, $e));
|
||||||
|
}
|
||||||
return $dashboard;
|
return $dashboard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,6 @@ class String
|
|||||||
*/
|
*/
|
||||||
public static function trimSplit($value, $delimiter = ',')
|
public static function trimSplit($value, $delimiter = ',')
|
||||||
{
|
{
|
||||||
return array_map('trim', explode(',', $value));
|
return array_map('trim', explode($delimiter, $value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user