summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--TODO2
-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
-rwxr-xr-xupdate_jdn.sh3
7 files changed, 438 insertions, 2 deletions
diff --git a/TODO b/TODO
index 26899a78..dea9e90b 100644
--- a/TODO
+++ b/TODO
@@ -15,6 +15,7 @@ About jenkins.debian.net
* Join #debian-qa on irc.debian.org to report bugs or give other feedback! Use debian-qa@lists.debian.org if you prefer mail.
* git clone git://git.debian.org/git/users/holger/jenkins.debian.net.git
* (virtual) hardware sponsored by http://www.profitbricks.com - currently it's just a server, but in future there will be installation and tests clients started on demand as well.
+* some stats are available at http://jenkins.debian.net/munin/jenkins-month.html
== General ToDo
@@ -30,7 +31,6 @@ About jenkins.debian.net
* make job configuration visible to un-authenticated users
* squid has problems with SO_FAIL
* split TODO and about.txt?
-* setup munin monitoring
** use debian stylesheet for about.html
** add sidebar links for all jobs
* proper git repo url, outside users/holger
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>
+
diff --git a/update_jdn.sh b/update_jdn.sh
index 27f14103..7af5aa24 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -41,7 +41,8 @@ fi
sudo chown root.root /etc/sudoers.d/jenkins ; sudo chmod 700 /etc/sudoers.d/jenkins
sudo ln -sf /etc/apache2/sites-available/jenkins.debian.net /etc/apache2/sites-enabled/000-default
sudo service apache2 reload
-cd /etc/munin/plugins ; sudo rm -f postfix_* open_inodes df_inode interrupts diskstats 2>/dev/null
+cd /etc/munin/plugins ; sudo rm -f postfix_* open_inodes df_inode interrupts diskstats irqstats threads proc_pri vmstat 2>/dev/null
+[ -L apache_accesses ] || for i in apache_accesses apache_processes apache_volume ; do ln -s /usr/share/munin/plugins/cpu/$i $i ; done
#
# run jenkins-job-builder to update jobs if needed