diff --git a/Dockerfile b/Dockerfile index b8ee935..f574176 100644 --- a/Dockerfile +++ b/Dockerfile @@ -246,6 +246,7 @@ RUN pip install speedtest-cli COPY overlay/opt/nagios/libexec/* ${NAGIOS_HOME}/libexec/ 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/dashboard ${NAGIOS_HOME}/share/ #COPY overlay/usr ${NAGIOS_HOME}/usr RUN cd /opt/nagios/etc/objects && \ diff --git a/docker-compose.yml b/docker-compose.yml index 3195214..372113d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: build: dockerfile: Dockerfile container_name: nagios - image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.11 + image: docker-registry1.in.thelinuxpro.net:5000/tlp/nagios:241230.0.12 networks: infra_dev_net: ipv4_address: 10.99.23.36 diff --git a/overlay/opt/nagios/share/dashboard/nagios.php b/overlay/opt/nagios/share/dashboard/nagios.php new file mode 100755 index 0000000..17845b5 --- /dev/null +++ b/overlay/opt/nagios/share/dashboard/nagios.php @@ -0,0 +1,136 @@ + + + + + <? echo($pagetitle); ?> + + + + + +
+

Refresh in seconds

+
+ + diff --git a/overlay/opt/nagios/share/dashboard/nagios_get.php b/overlay/opt/nagios/share/dashboard/nagios_get.php new file mode 100755 index 0000000..17516a4 --- /dev/null +++ b/overlay/opt/nagios/share/dashboard/nagios_get.php @@ -0,0 +1,300 @@ + +"); +} +if (($collastcheck == false) and ($colhost == true) and ($colstatusinfo == true) and ($colservice == false)) { + echo(""); +} +if (($collastcheck == false) and ($colhost == false) and ($colstatusinfo == true) and ($colservice == false)) { + echo("
"); +} +if (($collastcheck == false) and ($colhost == true) and ($colstatusinfo == false) and ($colservice == false)) { + echo("
"); +} +if (($collastcheck == true) and ($colhost == true) and ($colstatusinfo == true) and ($colservice == true)) { + echo("
"); +} +?> + + Last Checked"); + } + if ($colhost == true) { + echo(""); + } + if ($colstatusinfo == true) { + echo(""); + } + if ($colservice == true) { + echo(" + + + +".date("Y-m-d H:i:s", $dashdate).""); + } + if ($colhost == true) { + echo(""); + } + if ($colstatusinfo == true) { + echo(""); + } + if ($colservice == true) { + if ($dashservice == "") { + echo(""); + } else { + echo(""); + } + } +endif; ?> + + critical, warnings, up, disabled + +for ($l = 1; $l <= $critcount; $l++) { + dashdisplay($finalcritarray[$l], $collastcheck, $colhost, $colstatusinfo, $colservice); +} + +for ($m = 1; $m <= $warncount; $m++) { + dashdisplay($finalwarnarray[$m], $collastcheck, $colhost, $colstatusinfo, $colservice); +} + +#for ($n = 1; $n <= $okcount; $n++) { +# dashdisplay($finaluparray[$n],$collastcheck,$colhost,$colstatusinfo,$colservice); +#} + +#for ($o = 1; $o <= $disttlcount; $o++) { +# dashdisplay($finaldisarray[$o],$collastcheck,$colhost,$colstatusinfo,$colservice); +#} +?> +
HostStatus InfoService"); + } + ?> +
".$dashhost."".$dashplugin."HOST PING".$dashservice."
diff --git a/overlay/opt/nagios/share/dashboard/throbber.gif b/overlay/opt/nagios/share/dashboard/throbber.gif new file mode 100755 index 0000000..47adbf0 Binary files /dev/null and b/overlay/opt/nagios/share/dashboard/throbber.gif differ