summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rwxr-xr-xetc/munin/plugins/jenkins_builds51
-rwxr-xr-xetc/munin/plugins/jenkins_builds_running46
-rwxr-xr-xetc/munin/plugins/jenkins_jobs51
-rw-r--r--etc/munin/static/style-new.css257
-rw-r--r--etc/munin/templates/partial/navigation.tmpl30
5 files changed, 435 insertions, 0 deletions
diff --git a/etc/munin/plugins/jenkins_builds b/etc/munin/plugins/jenkins_builds
new file mode 100755
index 00000000..91b531fa
--- /dev/null
+++ b/etc/munin/plugins/jenkins_builds
@@ -0,0 +1,51 @@
+#!/bin/sh
+# -*- sh -*-
+
+: << =cut
+
+=head1 NAME
+
+jenkins_builds - Plugin to measure number of jenknis builds
+
+=head1 AUTHOR
+
+Contributed by Holger Levsen
+
+=head1 LICENSE
+
+GPLv2
+
+=head1 MAGIC MARKERS
+
+ #%# family=auto
+ #%# capabilities=autoconf
+
+=cut
+
+. $MUNIN_LIBDIR/plugins/plugin.sh
+
+if [ "$1" = "autoconf" ]; then
+ echo yes
+ exit 0
+fi
+
+if [ "$1" = "config" ]; then
+
+ echo 'graph_title Jenkins Builds'
+ echo 'graph_args --base 1000 -l 0 '
+ echo 'graph_scale no'
+ echo 'graph_vlabel Jenkins Builds per category in the last 24h'
+ echo 'graph_category jenkins'
+ for PREFIX in $JOB_PREFIXES ; do
+ echo "jenkins_builds_$PREFIX.label $PREFIX builds"
+ echo "jenkins_builds_$PREFIX.draw AREA"
+ #print_warning jenkins_builds_$PREFIX
+ #print_critical jenkins_builds_$PREFIX
+ done
+ exit 0
+fi
+
+for PREFIX in $JOB_PREFIXES ; do
+ NR=$(find /var/lib/jenkins/jobs/$PREFIX*/builds/* -type d -mtime -1 | wc -l)
+ echo "jenkins_builds_$PREFIX.value $NR"
+done
diff --git a/etc/munin/plugins/jenkins_builds_running b/etc/munin/plugins/jenkins_builds_running
new file mode 100755
index 00000000..5166279a
--- /dev/null
+++ b/etc/munin/plugins/jenkins_builds_running
@@ -0,0 +1,46 @@
+#!/bin/sh
+# -*- sh -*-
+
+: << =cut
+
+=head1 NAME
+
+jenkins_builds_running - Plugin to measure number of jenknis builds which are currently running
+
+=head1 AUTHOR
+
+Contributed by Holger Levsen
+
+=head1 LICENSE
+
+GPLv2
+
+=head1 MAGIC MARKERS
+
+ #%# family=auto
+ #%# capabilities=autoconf
+
+=cut
+
+. $MUNIN_LIBDIR/plugins/plugin.sh
+
+if [ "$1" = "autoconf" ]; then
+ echo yes
+ exit 0
+fi
+
+if [ "$1" = "config" ]; then
+
+ echo 'graph_title Jenkins Builds running'
+ echo 'graph_args --base 1000 -l 0 '
+ echo 'graph_scale no'
+ echo 'graph_vlabel Jenkins Builds currently running'
+ echo 'graph_category jenkins'
+ echo "jenkins_builds_running.label $PREFIX builds_running"
+ echo "jenkins_builds_running.draw AREA"
+ #print_warning jenkins_builds_running
+ #print_critical jenkins_builds_running
+ exit 0
+fi
+
+echo "jenkins_builds_running.value $(ps fax|grep /tmp/hudson|grep -v grep|wc -l)"
diff --git a/etc/munin/plugins/jenkins_jobs b/etc/munin/plugins/jenkins_jobs
new file mode 100755
index 00000000..4b917b85
--- /dev/null
+++ b/etc/munin/plugins/jenkins_jobs
@@ -0,0 +1,51 @@
+#!/bin/sh
+# -*- sh -*-
+
+: << =cut
+
+=head1 NAME
+
+jenkins_jobs - Plugin to measure number of jenknis jobs
+
+=head1 AUTHOR
+
+Contributed by Holger Levsen
+
+=head1 LICENSE
+
+GPLv2
+
+=head1 MAGIC MARKERS
+
+ #%# family=auto
+ #%# capabilities=autoconf
+
+=cut
+
+. $MUNIN_LIBDIR/plugins/plugin.sh
+
+if [ "$1" = "autoconf" ]; then
+ echo yes
+ exit 0
+fi
+
+if [ "$1" = "config" ]; then
+
+ echo 'graph_title Jenkins Jobs'
+ echo 'graph_args --base 1000 -l 0 '
+ echo 'graph_scale no'
+ echo 'graph_vlabel Jenkins Jobs per category'
+ echo 'graph_category jenkins'
+ for PREFIX in $JOB_PREFIXES ; do
+ echo "jenkins_jobs_$PREFIX.label $PREFIX jobs"
+ echo "jenkins_jobs_$PREFIX.draw AREA"
+ #print_warning jenkins_jobs_$PREFIX
+ #print_critical jenkins_jobs_$PREFIX
+ done
+ exit 0
+fi
+
+for PREFIX in $JOB_PREFIXES ; do
+ NR=$(find /var/lib/jenkins/jobs/ -name "$PREFIX*" -type d | wc -l)
+ echo "jenkins_jobs_$PREFIX.value $NR"
+done
diff --git a/etc/munin/static/style-new.css b/etc/munin/static/style-new.css
new file mode 100644
index 00000000..28ecea40
--- /dev/null
+++ b/etc/munin/static/style-new.css
@@ -0,0 +1,257 @@
+/* Overall layout */
+html, body {
+ margin: 0;
+ padding: 0;
+ height: 100%;
+ background: #fdfdfd;
+ font-size: 90%;
+}
+
+select {
+ border: 1px solid #d1d1d1;
+}
+
+body, h1, h2, h3, p, span, div {
+ font-family: "vera sans","dejavu sans",helvetica,verdana,arial,sans-serif;
+ color: #666666;
+}
+
+h3 {
+ margin-top: 1em;
+ margin-bottom: 0px;
+ font-size: 110%;
+ letter-spacing: 0.05em;
+ margin-left: 0px;
+ padding-left: 10px;
+ padding-bottom: 0px;
+ padding-top: 0px;
+ text-decoration: underline;
+}
+
+a:link, a:visited, a:link:active, a:link:hover { color: #486aaf; text-decoration: none; }
+a:link:hover { text-decoration: underline;}
+
+.warntext {
+ font-weight: bold;
+ background-color: #cccc00;
+ padding: 0px;
+ margin: -1px;
+ border: 1px solid #b9b900;
+}
+
+.crittext {
+ font-weight: bold;
+ background-color: #ff6f22;
+ padding: 0px;
+ margin: -1px;
+ border: 1px solid #f16722;
+}
+
+a.unkn:link { color: #ffaa00; }
+a.unkn:visited { color: #ffaa00; }
+a.unkn:active { color: #ffaa00; }
+a.unkn:hover { color: #ffaa00; }
+
+a.warn:link { color: #ffd300; }
+a.warn:visited { color: #ffd300; }
+a.warn:active { color: #ffd300; }
+a.warn:hover { color: #ffd300; }
+
+a.crit:link { color: #ff0000; }
+a.crit:visited { color: #ff0000; }
+a.crit:active { color: #ff0000; }
+a.crit:hover { color: #ff0000; }
+
+img { border: 0px; }
+img.i { border: 1px solid #a0a0a0; }
+img.iwarn { border: 1px solid #ffd300; }
+img.icrit { border: 1px solid #ff0000; }
+img.iunkn { border: 1px solid #ffaa00; }
+
+/* Header */
+#header {
+ width: 90%;
+ margin: 0 auto;
+ background-color: #fbfbfb;
+ border: 1px solid #cfd6f8;
+ border-bottom-left-radius: 4px;
+ -moz-border-radius-bottomleft: 4px;
+ -webkit-border-bottom-left-radius: 4px;
+ border-bottom-right-radius: 4px;
+ -moz-border-radius-bottomright: 4px;
+ -webkit-border-bottom-right-radius: 4px;
+ border-top: 0;
+ padding: 3px;
+ height: 40px;
+}
+
+#header p {
+ margin: 0;
+}
+
+h1, h2 {
+ margin: 0;
+ padding: 0;
+ font-size: 110%;
+ font-weight: bold;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#nav h2 {
+ margin-top: 0.4em;
+ }
+
+h1 .logo {
+ display: block;
+ float: left;
+ background-image: url(logo-h.png);
+ background-repeat: no-repeat;
+ width: 115px;
+ height: 30px;
+ padding-right: 10px;
+ margin-top: 7px;
+ padding-bottom: 6px;
+}
+
+/* Main */
+#main {
+ width: 97%;
+ margin: 0 auto;
+}
+
+.contentpusher {
+ clear: both;
+}
+
+/* Navigation */
+#nav {
+ float: left;
+ width: 100px;
+}
+
+#nav ul li {
+ list-style-type: none;
+ margin: 0 0 0 3px;
+ padding: 2px;
+}
+
+#nav ul {
+ margin: 0.2em 0 0.8em 0;
+ padding: 0;
+}
+
+.navigationjump {
+ display: none;
+}
+
+/* Content */
+#content {
+ border-left: 1px solid #cfd6f8;
+ margin-left: 120px;
+ padding: 1em;
+}
+
+#content li {
+ margin-left: -20px;
+ }
+
+#content > ul:first-of-type {
+ margin-left: 2em;
+ }
+
+.comparison #content {
+ margin-left: 0;
+}
+
+#content h2 {
+ display: none;
+}
+
+ul.groupview li.last {
+ margin-bottom: 1em;
+}
+
+/* Content: comparison */
+td {
+ vertical-align: top;
+}
+.node {
+ width: 500px;
+}
+
+/* Content: service view */
+#legend {
+ margin: 2px;
+ border-collapse: collapse;
+}
+
+#legend tr, #legend td{
+ padding: 3px 2px 3px 2px;
+ margin: 1px;
+}
+
+#legend th{
+ border-bottom: 1px solid #999999;
+}
+
+#legend .oddrow{
+ background-color: #f8f8f8;
+}
+
+#legend .oddrow td{
+ border-bottom: 1px solid #d8d8d8;
+}
+
+#legend .evenrow{
+ background-color: #fdfdfd;
+}
+
+#legend .evenrow td{
+ border-bottom: 1px solid #d8d8d8;
+}
+
+#legend .lastrow td{
+ border-bottom: 0px solid transparent !important;
+}
+
+#legend .field, #legend .internal {
+ width: 20em;
+ text-align: left;
+}
+
+#legend .type {
+ width: 7em;
+ text-align: center;
+}
+
+#legend .warn, #legend .crit {
+ width: 5em;
+ text-align: center;
+}
+
+
+
+/* Footer */
+#footer {
+ width: 90%;
+ margin: 0 auto;
+ background-color: #fbfbfb;
+ border: 1px solid #cfd6f8;
+ padding: 5px;
+ clear: both;
+}
+
+#footer p.navigation {
+ margin: 0;
+}
+
+#footer p.tagline {
+ margin: 0;
+ font-size: 80%;
+ text-align: left;
+}
+
+.categoryview .node {
+ display: inline-block;
+}
diff --git a/etc/munin/templates/partial/navigation.tmpl b/etc/munin/templates/partial/navigation.tmpl
new file mode 100644
index 00000000..d1cbe07e
--- /dev/null
+++ b/etc/munin/templates/partial/navigation.tmpl
@@ -0,0 +1,30 @@
+<div id="nav">
+ <p class="navigationjump"><a href="#content">Skip navigation</a></p>
+ <h2>Problems</h2>
+ <ul>
+ <li><a href="<TMPL_VAR NAME="R_PATH">/problems.html#critical">Critical</a> (<TMPL_VAR NAME="NCRITICAL">)</li>
+ <li><a href="<TMPL_VAR NAME="R_PATH">/problems.html#warnings">Warning</a> (<TMPL_VAR NAME="NWARNING">)</li>
+ <li><a href="<TMPL_VAR NAME="R_PATH">/problems.html#unknowns">Unknown</a> (<TMPL_VAR NAME="NUNKNOWN">)</li>
+ </ul>
+ <h2>Groups</h2>
+ <ul>
+ <TMPL_LOOP NAME="ROOTGROUPS">
+ <li><a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URL">"><TMPL_VAR NAME="NAME"></a></li>
+ </TMPL_LOOP>
+ </ul>
+ <h2>Categories</h2>
+ <ul>
+ <TMPL_LOOP NAME="GLOBALCATS">
+ <li>
+ <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URLDAY">"><TMPL_VAR NAME="NAME"></a><br />
+ [
+ <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URLDAY">">d</a>
+ <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URLWEEK">">w</a>
+ <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URLMONTH">">m</a>
+ <a href="<TMPL_VAR NAME="R_PATH">/<TMPL_VAR NAME="URLYEAR">">y</a>
+ ]
+ </li>
+ </TMPL_LOOP>
+ </ul>
+</div>
+