Compare commits
4 Commits
e9f35954c6
...
7131aa33fb
Author | SHA1 | Date |
---|---|---|
|
7131aa33fb | |
|
2716380a67 | |
|
9d38f73151 | |
|
cdc9b85e55 |
|
@ -246,6 +246,7 @@ RUN pip install speedtest-cli
|
||||||
COPY overlay/opt/nagios/libexec/* ${NAGIOS_HOME}/libexec/
|
COPY overlay/opt/nagios/libexec/* ${NAGIOS_HOME}/libexec/
|
||||||
COPY overlay/opt/nagios/share/stylesheets/* ${NAGIOS_HOME}/share/stylesheets/
|
COPY overlay/opt/nagios/share/stylesheets/* ${NAGIOS_HOME}/share/stylesheets/
|
||||||
COPY overlay/opt/nagios/share/index.php ${NAGIOS_HOME}/share/
|
COPY overlay/opt/nagios/share/index.php ${NAGIOS_HOME}/share/
|
||||||
|
COPY overlay/opt/nagios/share/side.php ${NAGIOS_HOME}/share/
|
||||||
COPY overlay/opt/nagios/share/dashboard ${NAGIOS_HOME}/share/
|
COPY overlay/opt/nagios/share/dashboard ${NAGIOS_HOME}/share/
|
||||||
#COPY overlay/usr ${NAGIOS_HOME}/usr
|
#COPY overlay/usr ${NAGIOS_HOME}/usr
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ services:
|
||||||
build:
|
build:
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
container_name: nagios
|
container_name: nagios
|
||||||
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:250102.0.02
|
image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:250105.0.01
|
||||||
networks:
|
networks:
|
||||||
infra_dev_net:
|
infra_dev_net:
|
||||||
ipv4_address: 10.99.23.36
|
ipv4_address: 10.99.23.36
|
||||||
|
|
|
@ -0,0 +1,137 @@
|
||||||
|
<?php
|
||||||
|
$refreshvalue = 10; //value in seconds to refresh page
|
||||||
|
$pagetitle = "Operations Nagios Dashboard";
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title><? echo($pagetitle); ?></title>
|
||||||
|
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js">
|
||||||
|
</script>
|
||||||
|
<style type="text/css">
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
line-height: 1.3em;
|
||||||
|
overflow-x: hidden;
|
||||||
|
font-size: 1.2em;
|
||||||
|
background-color: #363636;
|
||||||
|
}
|
||||||
|
|
||||||
|
table {
|
||||||
|
border-collapse: collapse;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
td {
|
||||||
|
padding: .1em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
display: inline-block;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head {
|
||||||
|
background: lightGray;
|
||||||
|
color: black;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.head th {
|
||||||
|
border-right: 1px solid #888;
|
||||||
|
padding: .2em 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.critical {
|
||||||
|
background: #b40000;
|
||||||
|
color: white;
|
||||||
|
font-size: 1.4em;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.critical td {
|
||||||
|
border-bottom: 2px solid #7f0000;
|
||||||
|
border-right: 2px solid #7f0000;
|
||||||
|
padding: .1em 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.warning {
|
||||||
|
background: yellow;
|
||||||
|
color: black;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
.warning td{
|
||||||
|
border-bottom: 1px solid #bdbf00;
|
||||||
|
border-right: 1px solid #bdbf00;
|
||||||
|
}
|
||||||
|
.statusinfo {
|
||||||
|
font-size: 14px !important;
|
||||||
|
}
|
||||||
|
#nagios_placeholder {
|
||||||
|
}
|
||||||
|
#loading {
|
||||||
|
background: transparent url(throbber.gif) no-repeat center center;
|
||||||
|
width: 214px;
|
||||||
|
height: 13px;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
#refreshing {
|
||||||
|
color: gray;
|
||||||
|
display: inline-block;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
#refreshing_countdown {
|
||||||
|
display: inline-block;
|
||||||
|
width: 15px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
#refreshing, #loading, h1 {
|
||||||
|
line-height: 50px;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<script type="text/javascript">
|
||||||
|
|
||||||
|
var placeHolder,
|
||||||
|
refreshValue = <?php print $refreshvalue; ?>;
|
||||||
|
|
||||||
|
$().ready(function(){
|
||||||
|
placeHolder = $("#nagios_placeholder");
|
||||||
|
updateNagiosData(placeHolder);
|
||||||
|
window.setInterval(updateCountDown, 1000);
|
||||||
|
});
|
||||||
|
|
||||||
|
function updateNagiosData(block){
|
||||||
|
$("#loading").fadeIn(200);
|
||||||
|
block.load("nagios_get.php", function(response){
|
||||||
|
$(this).empty();
|
||||||
|
$(this).html(response);
|
||||||
|
$("#loading").fadeOut(200);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateCountDown(){
|
||||||
|
var countdown = $("#refreshing_countdown");
|
||||||
|
var remaining = parseInt(countdown.text());
|
||||||
|
if(remaining == 0){
|
||||||
|
updateNagiosData(placeHolder);
|
||||||
|
countdown.text(refreshValue);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
countdown.text(remaining - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<div id="nagios_placeholder"></div>
|
||||||
|
<p id="refreshing">Refresh in <span id="refreshing_countdown"><?php print $refreshvalue; ?></span> seconds</p>
|
||||||
|
<div id="loading"></div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -289,9 +289,9 @@ for ($m = 1; $m <= $warncount; $m++) {
|
||||||
dashdisplay($finalwarnarray[$m], $collastcheck, $colhost, $colstatusinfo, $colservice);
|
dashdisplay($finalwarnarray[$m], $collastcheck, $colhost, $colstatusinfo, $colservice);
|
||||||
}
|
}
|
||||||
|
|
||||||
#for ($n = 1; $n <= $okcount; $n++) {
|
for ($n = 1; $n <= $okcount; $n++) {
|
||||||
# dashdisplay($finaluparray[$n],$collastcheck,$colhost,$colstatusinfo,$colservice);
|
dashdisplay($finaluparray[$n],$collastcheck,$colhost,$colstatusinfo,$colservice);
|
||||||
#}
|
}
|
||||||
|
|
||||||
#for ($o = 1; $o <= $disttlcount; $o++) {
|
#for ($o = 1; $o <= $disttlcount; $o++) {
|
||||||
# dashdisplay($finaldisarray[$o],$collastcheck,$colhost,$colstatusinfo,$colservice);
|
# dashdisplay($finaldisarray[$o],$collastcheck,$colhost,$colstatusinfo,$colservice);
|
||||||
|
|
|
@ -0,0 +1,133 @@
|
||||||
|
<?php
|
||||||
|
include_once(dirname(__FILE__).'/includes/utils.inc.php');
|
||||||
|
|
||||||
|
$this_version = '4.4.4';
|
||||||
|
$link_target = 'main';
|
||||||
|
?>
|
||||||
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||||
|
|
||||||
|
<html>
|
||||||
|
|
||||||
|
<head>
|
||||||
|
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
|
||||||
|
<title>Nagios Core</title>
|
||||||
|
<link href="stylesheets/common.css?<?php echo $this_version; ?>" type="text/css" rel="stylesheet">
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
<body class='navbar'>
|
||||||
|
|
||||||
|
<div class="navbarlogo">
|
||||||
|
<a href="https://www.nagios.org" target="_blank"><img src="images/sblogo.png" height="39" width="140" border="0" alt="Nagios" /></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navsection">
|
||||||
|
<div class="navsectiontitle">General</div>
|
||||||
|
<div class="navsectionlinks">
|
||||||
|
<ul class="navsectionlinks">
|
||||||
|
<li><a href="main.php" target="<?php echo $link_target;?>">Home</a></li>
|
||||||
|
<li><a href="https://go.nagios.com/nagioscore/docs" target="_blank">Documentation</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navsection">
|
||||||
|
<div class="navsectiontitle">Current Status</div>
|
||||||
|
<div class="navsectionlinks">
|
||||||
|
<ul class="navsectionlinks">
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/tac.cgi" target="<?php echo $link_target;?>">Tactical Overview</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="map.php?host=all" target="<?php echo $link_target;?>">Map</a>
|
||||||
|
<a href="<?php echo $cfg["cgi_base_url"];?>/statusmap.cgi?host=all" target="<?php echo $link_target;?>">(Legacy)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail" target="<?php echo $link_target;?>">Hosts</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all" target="<?php echo $link_target;?>">Services</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=overview" target="<?php echo $link_target;?>">Host Groups</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=summary" target="<?php echo $link_target;?>">Summary</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=grid" target="<?php echo $link_target;?>">Grid</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=overview" target="<?php echo $link_target;?>">Service Groups</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=summary" target="<?php echo $link_target;?>">Summary</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?servicegroup=all&style=grid" target="<?php echo $link_target;?>">Grid</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="navsectionheader">
|
||||||
|
<ul>
|
||||||
|
<li>Problems
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&servicestatustypes=28" target="<?php echo $link_target;?>">Services</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?host=all&type=detail&hoststatustypes=3&serviceprops=10&servicestatustypes=28" target="<?php echo $link_target;?>">Unhandled</a>)</li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12" target="<?php echo $link_target;?>">Hosts</a> (<a href="<?php echo $cfg["cgi_base_url"];?>/status.cgi?hostgroup=all&style=hostdetail&hoststatustypes=12&hostprops=42" target="<?php echo $link_target;?>">Unhandled</a>)</li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/outages.cgi" target="<?php echo $link_target;?>">Network Outages</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="navbarsearch">
|
||||||
|
<form method="get" action="<?php echo $cfg["cgi_base_url"];?>/status.cgi" target="<?php echo $link_target;?>">
|
||||||
|
<fieldset>
|
||||||
|
<legend>Quick Search:</legend>
|
||||||
|
<input type='hidden' name='navbarsearch' value='1'>
|
||||||
|
<input type='text' name='host' size='15' class="NavBarSearchItem">
|
||||||
|
</fieldset>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navsection">
|
||||||
|
<div class="navsectiontitle">Reports</div>
|
||||||
|
<div class="navsectionlinks">
|
||||||
|
<ul class="navsectionlinks">
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/avail.cgi" target="<?php echo $link_target;?>">Availability</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="trends.html" target="<?php echo $link_target;?>">Trends</a>
|
||||||
|
<a href="<?php echo $cfg["cgi_base_url"];?>/trends.cgi" target="<?php echo $link_target;?>">(Legacy)</a>
|
||||||
|
</li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">Alerts</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/history.cgi?host=all" target="<?php echo $link_target;?>">History</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/summary.cgi" target="<?php echo $link_target;?>">Summary</a></li>
|
||||||
|
<li>
|
||||||
|
<a href="histogram.html" target="<?php echo $link_target;?>">Histogram</a>
|
||||||
|
<a href="<?php echo $cfg["cgi_base_url"];?>/histogram.cgi" target="<?php echo $link_target;?>">(Legacy)</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/notifications.cgi?contact=all" target="<?php echo $link_target;?>">Notifications</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/showlog.cgi" target="<?php echo $link_target;?>">Event Log</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navsection">
|
||||||
|
<div class="navsectiontitle">System</div>
|
||||||
|
<div class="navsectionlinks">
|
||||||
|
<ul class="navsectionlinks">
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=3" target="<?php echo $link_target;?>">Comments</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=6" target="<?php echo $link_target;?>">Downtime</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=0" target="<?php echo $link_target;?>">Process Info</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=4" target="<?php echo $link_target;?>">Performance Info</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/extinfo.cgi?type=7" target="<?php echo $link_target;?>">Scheduling Queue</a></li>
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/config.cgi" target="<?php echo $link_target;?>">Configuration</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="navsection">
|
||||||
|
<div class="navsectiontitle">Dashboards</div>
|
||||||
|
<div class="navsectionlinks">
|
||||||
|
<ul class="navsectionlinks">
|
||||||
|
<li><a href="<?php echo $cfg["cgi_base_url"];?>/dashboard/nagios.php" target="<?php echo $link_target;?>">Nagios Dash</a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue