Make nagios-external maybe work
Signed-off-by: Ricky Elrod <codeblock@fedoraproject.org>
This commit is contained in:
parent
f01107d0bf
commit
d7073bd80b
4 changed files with 8 additions and 345 deletions
|
@ -67,5 +67,6 @@
|
|||
roles:
|
||||
- { role: dhcp_server, when: datacenter == 'phx2' }
|
||||
- { role: tftp_server, when: datacenter == 'phx2' }
|
||||
- nagios_server
|
||||
- { role: nagios_server, srcdir: nagios, when: datacenter == 'phx2' }
|
||||
- { role: nagios_server, srcdir: nagios-external, when: datacenter != 'phx2' }
|
||||
- fedmsg/base
|
||||
|
|
|
@ -1,269 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">
|
||||
<TITLE>Nagios</TITLE>
|
||||
|
||||
<STYLE type="text/css">
|
||||
|
||||
<!--
|
||||
|
||||
TABLE.NavBarTitle { font-family: verdana,arial,serif; background-color: black; border: thin solid white; padding: 1; }
|
||||
TD.NavBarTitle { font-family: verdana,arial,serif; background-color: black; color: #DEE7C6; font-size: 10pt; font-weight: bold; text-decoration: none; }
|
||||
.NavBarItem { font-family: verdana,arial,serif; background-color: black; color: #DEE7C6; font-size: 8pt; font-weight: bold; text-decoration: none; }
|
||||
.NavBarSearchItem { font-family: verdana,arial,serif; background-color: black; color: #DEE7C6; font-size: 8pt; }
|
||||
INPUT.NavBarSearchItem { font-family: verdana,arial,serif; background-color: white; color: black; font-size: 8pt; }
|
||||
BODY.navbar { font-family: verdana,arial,serif; background-color: white; color: black; background-color: black }
|
||||
|
||||
-->
|
||||
|
||||
</STYLE>
|
||||
|
||||
</HEAD>
|
||||
|
||||
<BODY CLASS='navbar'>
|
||||
|
||||
<SCRIPT LANGUAGE="JavaScript">
|
||||
<!--
|
||||
|
||||
if(parseInt(navigator.appVersion.substring(0,1))>=3){
|
||||
doton = new Image(13,14);
|
||||
doton.src = "images/orangedot.gif";
|
||||
dotoff = new Image(13,14);
|
||||
dotoff.src = "images/greendot.gif";
|
||||
}
|
||||
|
||||
function switchdot(name,on){
|
||||
if(parseInt(navigator.appVersion.substring(0,1))>=3){
|
||||
image = eval("" + (on == 1 ? "doton.src" : "dotoff.src"));
|
||||
document[name].src=image;
|
||||
}
|
||||
}
|
||||
|
||||
//-->
|
||||
</SCRIPT>
|
||||
|
||||
|
||||
|
||||
<table width="150" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<div align="center"><a href="http://www.nagios.org" target="_blank"><img src="images/sblogo.jpg" border="0" alt="Nagios"></a></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" class="NavBarTitle" cellspacing="0">
|
||||
<tr>
|
||||
<td class="NavBarTitle">General</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width=150 border="0" cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="home-dot"></td>
|
||||
<td nowrap width=134><a href="main.html" target="main" onMouseOver="switchdot('home-dot',1)" onMouseOut="switchdot('home-dot',0)" class="NavBarItem">Home</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="docs-dot"></td>
|
||||
<td nowrap><a href="docs/index.html" target="main" onMouseOver="switchdot('docs-dot',1)" onMouseOut="switchdot('docs-dot',0)" class="NavBarItem">Documentation</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" class="NavBarTitle" cellspacing="0">
|
||||
<tr>
|
||||
<td class="NavBarTitle">Monitoring</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150" border="0" cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="tac-dot"></td>
|
||||
<td nowrap width=134><a href="/nagios-external/cgi-bin//tac.cgi" target="main" onMouseOver="switchdot('tac-dot',1)" onMouseOut="switchdot('tac-dot',0)" class="NavBarItem">Tactical Overview</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="status-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?host=all" target="main" onMouseOver="switchdot('status-dot',1)" onMouseOut="switchdot('status-dot',0)" class="NavBarItem">Service Detail</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="hoststatus-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?hostgroup=all&style=hostdetail" target="main" onMouseOver="switchdot('hoststatus-dot',1)" onMouseOut="switchdot('hoststatus-dot',0)" class="NavBarItem">Host Detail</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="hgstatus-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?hostgroup=all&style=overview" target="main" onMouseOver="switchdot('hgstatus-dot',1)" onMouseOut="switchdot('hgstatus-dot',0)" class="NavBarItem">Hostgroup Overview</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="hgstatus2-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?hostgroup=all&style=summary" target="main" onMouseOver="switchdot('hgstatus2-dot',1)" onMouseOut="switchdot('hgstatus2-dot',0)" class="NavBarItem">Hostgroup Summary</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="hgstatus3-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?hostgroup=all&style=grid" target="main" onMouseOver="switchdot('hgstatus3-dot',1)" onMouseOut="switchdot('hgstatus3-dot',0)" class="NavBarItem">Hostgroup Grid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="sgstatus1-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?servicegroup=all&style=overview" target="main" onMouseOver="switchdot('sgstatus1-dot',1)" onMouseOut="switchdot('sgstatus1-dot',0)" class="NavBarItem">Servicegroup Overview</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="sgstatus2-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?servicegroup=all&style=summary" target="main" onMouseOver="switchdot('sgstatus2-dot',1)" onMouseOut="switchdot('sgstatus2-dot',0)" class="NavBarItem">Servicegroup Summary</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="sgstatus3-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?servicegroup=all&style=grid" target="main" onMouseOver="switchdot('sgstatus3-dot',1)" onMouseOut="switchdot('sgstatus3-dot',0)" class="NavBarItem">Servicegroup Grid</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="statusmap-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//statusmap.cgi?host=all" target="main" onMouseOver="switchdot('statusmap-dot',1)" onMouseOut="switchdot('statusmap-dot',0)" class="NavBarItem">Status Map</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="statuswrl-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//statuswrl.cgi?host=all" target="main" onMouseOver="switchdot('statuswrl-dot',1)" onMouseOut="switchdot('statuswrl-dot',0)" class="NavBarItem">3-D Status Map</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="svcproblems-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?host=all&servicestatustypes=28" target="main" onMouseOver="switchdot('svcproblems-dot',1)" onMouseOut="switchdot('svcproblems-dot',0)" class="NavBarItem">Service Problems</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="hostproblems-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12" target="main" onMouseOver="switchdot('hostproblems-dot',1)" onMouseOut="switchdot('hostproblems-dot',0)" class="NavBarItem">Host Problems</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="outages-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//outages.cgi" target="main" onMouseOver="switchdot('outages-dot',1)" onMouseOut="switchdot('outages-dot',0)" class="NavBarItem">Network Outages</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13></td>
|
||||
<td nowrap class="NavBarSearchItem">Show Host:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13></td>
|
||||
<td nowrap>
|
||||
<form method="get" action="/nagios-external/cgi-bin//status.cgi" target="main">
|
||||
<input type='hidden' name='navbarsearch' value='1'>
|
||||
<input type='text' name='host' size='15' class="NavBarSearchItem">
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="comment-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//extinfo.cgi?&type=3" target="main" onMouseOver="switchdot('comment-dot',1)" onMouseOut="switchdot('comment-dot',0)" class="NavBarItem">Comments</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="downtime-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//extinfo.cgi?&type=6" target="main" onMouseOver="switchdot('downtime-dot',1)" onMouseOut="switchdot('downtime-dot',0)" class="NavBarItem">Downtime</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="processinfo-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//extinfo.cgi?&type=0" target="main" onMouseOver="switchdot('processinfo-dot',1)" onMouseOut="switchdot('processinfo-dot',0)" class="NavBarItem">Process Info</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="performance-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//extinfo.cgi?&type=4" target="main" onMouseOver="switchdot('performance-dot',1)" onMouseOut="switchdot('performance-dot',0)" class="NavBarItem">Performance Info</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="queue-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//extinfo.cgi?&type=7" target="main" onMouseOver="switchdot('queue-dot',1)" onMouseOut="switchdot('queue-dot',0)" class="NavBarItem">Scheduling Queue</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" class="NavBarTitle" cellspacing="0">
|
||||
<tr>
|
||||
<td class="NavBarTitle">Reporting</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150" border="0" cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="trends-dot"></td>
|
||||
<td nowrap width=134><a href="/nagios-external/cgi-bin//trends.cgi" target="main" onMouseOver="switchdot('trends-dot',1)" onMouseOut="switchdot('trends-dot',0)" class="NavBarItem">Trends</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="avail-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//avail.cgi" target="main" onMouseOver="switchdot('avail-dot',1)" onMouseOut="switchdot('avail-dot',0)" class="NavBarItem">Availability</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="histogram-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//histogram.cgi" target="main" onMouseOver="switchdot('histogram-dot',1)" onMouseOut="switchdot('histogram-dot',0)" class="NavBarItem">Alert Histogram</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="history-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//history.cgi?host=all" target="main" onMouseOver="switchdot('history-dot',1)" onMouseOut="switchdot('history-dot',0)" class="NavBarItem">Alert History</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="summary-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//summary.cgi" target="main" onMouseOver="switchdot('summary-dot',1)" onMouseOut="switchdot('summary-dot',0)" class="NavBarItem">Alert Summary</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="notifications-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//notifications.cgi?contact=all" target="main" onMouseOver="switchdot('notifications-dot',1)" onMouseOut="switchdot('notifications-dot',0)" class="NavBarItem">Notifications</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="logfile-dot"></td>
|
||||
<td nowrap><a href="/nagios-external/cgi-bin//showlog.cgi" target="main" onMouseOver="switchdot('logfile-dot',1)" onMouseOut="switchdot('logfile-dot',0)" class="NavBarItem">Event Log</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2" height="10"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
<table width="150">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" class="NavBarTitle" cellspacing="0">
|
||||
<tr>
|
||||
<td class="NavBarTitle">Configuration</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="150" border="0" cellpadding=0 cellspacing=0>
|
||||
<tr>
|
||||
<td width=13><img src="images/greendot.gif" width="13" height="14" name="config-dot"></td>
|
||||
<td nowrap width=134><a href="/nagios-external/cgi-bin//config.cgi" target="main" onMouseOver="switchdot('config-dot',1)" onMouseOut="switchdot('config-dot',0)" class="NavBarItem">View Config</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
|
@ -37,10 +37,10 @@
|
|||
# service: name=nsca state=restarted enabled=yes
|
||||
|
||||
- name: Copy /etc/nagios config
|
||||
copy: src=nagios/ dest=/etc/nagios owner=nagios group=nagios
|
||||
copy: src={{srcdir}}/ dest=/etc/nagios owner=nagios group=nagios
|
||||
|
||||
- name: Copy checkcommands.cfg
|
||||
template: src=nagios/checkcommands.cfg dest=/etc/nagios/checkcommands.cfg owner=nagios group=nagios
|
||||
template: src={{srcdir}}/checkcommands.cfg dest=/etc/nagios/checkcommands.cfg owner=nagios group=nagios
|
||||
|
||||
- name: Copy httpd config
|
||||
template: src=nagios-httpd.conf dest=/etc/httpd/conf.d/nagios.conf
|
||||
|
@ -76,6 +76,9 @@
|
|||
- name: Install check_nagios_notifications cron
|
||||
cron: name="check_nagios_notifications" minute=0 hour=0 weekday=1 user=nagios job="/usr/local/bin/check_nagios_notifications.py"
|
||||
|
||||
- name: Override config.inc.php for the given environment
|
||||
template: src=config.inc.php dest=/usr/share/nagios/html/config.inc.php mode=0640 owner=root group=apache
|
||||
|
||||
# TODO: Remove this for prod
|
||||
- name: Shut services up for testing peacefully
|
||||
service: name={{item}} state=stopped enabled=no
|
||||
|
@ -85,68 +88,3 @@
|
|||
|
||||
- name: Restart and autostart nagios
|
||||
service: name=nagios state=restarted enabled=yes
|
||||
|
||||
#class nagios::server_external inherits nagios::server {
|
||||
# File['/etc/nagios/'] {
|
||||
# source => 'puppet:///nagios/nagios-external/',
|
||||
# }
|
||||
#
|
||||
# File['/etc/nagios/checkcommands.cfg'] {
|
||||
# content => template('nagios/nagios-external/checkcommands.cfg.erb'),
|
||||
# }
|
||||
#
|
||||
# file { '/usr/share/nagios/html/side.html':
|
||||
# mode => 644,
|
||||
# owner => root,
|
||||
# group => root,
|
||||
# source => 'puppet:///nagios/side.html'
|
||||
# }
|
||||
#
|
||||
# file { '/usr/share/nagios/html/config.inc.php':
|
||||
# mode => 644,
|
||||
# owner => root,
|
||||
# group => root,
|
||||
# source => 'puppet:///nagios/config.inc.php'
|
||||
# }
|
||||
#
|
||||
#
|
||||
#}
|
||||
|
||||
#class nagiosPhysical{
|
||||
# include ipmitool-package
|
||||
# file { '/usr/lib/nagios/plugins/check_ipmi':
|
||||
# source => 'puppet:///nagios/plugins/check_ipmi',
|
||||
# mode => 755,
|
||||
# owner => root,
|
||||
# group => root,
|
||||
# require => [Package['nagios-plugins'], Package['ipmitool']]
|
||||
# }
|
||||
#}
|
||||
|
||||
#class nrpe {
|
||||
# if ($operatingsystem == "RedHat" and $operatingsystemrelease >= 6) {
|
||||
# selinux-policy::custom { 'nrpe': }
|
||||
# }
|
||||
#
|
||||
# package { 'nrpe': ensure => installed }
|
||||
#
|
||||
# service { 'nrpe':
|
||||
# enable => true,
|
||||
# ensure => running,
|
||||
# subscribe => File['/etc/nagios/nrpe.cfg']
|
||||
# }
|
||||
#
|
||||
# file { '/etc/nagios/nrpe.cfg':
|
||||
# source => 'puppet:///nagios/nrpe.cfg',
|
||||
# require => Package[nrpe],
|
||||
# # notify => Service[nrpe]
|
||||
# }
|
||||
#}
|
||||
|
||||
#class nagiossymlink { # Is this a hack? Is it still needed?
|
||||
# symlink { '/usr/lib/nagios':
|
||||
# replace => false,
|
||||
# ensure => '/usr/lib64/nagios/',
|
||||
# require => Package['nagios-plugins']
|
||||
# }
|
||||
#}
|
||||
|
|
9
roles/nagios_server/files/config.inc.php → roles/nagios_server/templates/config.inc.php
Executable file → Normal file
9
roles/nagios_server/files/config.inc.php → roles/nagios_server/templates/config.inc.php
Executable file → Normal file
|
@ -1,20 +1,13 @@
|
|||
<?php
|
||||
//
|
||||
|
||||
|
||||
$cfg['cgi_config_file']='/etc/nagios/cgi.cfg'; // location of the CGI config file
|
||||
|
||||
$cfg['cgi_base_url']='/nagios-external/cgi-bin';
|
||||
|
||||
$cfg['cgi_base_url']='/{{srcdir}}/cgi-bin/';
|
||||
|
||||
// FILE LOCATION DEFAULTS
|
||||
$cfg['main_config_file']='/etc/nagios/nagios.cfg'; // default location of the main Nagios config file
|
||||
$cfg['status_file']='/var/log/nagios/status.dat'; // default location of Nagios status file
|
||||
$cfg['state_retention_file']='/var/log/nagios/retention.dat'; // default location of Nagios retention file
|
||||
|
||||
|
||||
|
||||
// utilities
|
||||
require_once(dirname(__FILE__).'/includes/utils.inc.php');
|
||||
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue