Skip to content
This repository was archived by the owner on Jan 15, 2021. It is now read-only.

Commit f984749

Browse files
committed
Merged fixes and features for 1.0.2 release.
2 parents 517b81e + 1f8af83 commit f984749

File tree

69 files changed

+2314
-493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2314
-493
lines changed

Changelog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2013-02-15: version 1.0.2
2+
-------------------------
3+
4+
* Added "Disk IOPS" graph to Cacti Linux Templates
5+
* Created Debian and RPM packages
6+
* #1040528: pmp-check-mysql-replication-delay doesn't alert if second behing master is NULL
7+
* #1114425: pmp-check-pt-table-checksum should not report OK when a table does not exist
8+
* #1071802: "Bad substitution" error when running pmp-check-pt-table-checksum
9+
* #1052368: Add option to disable overriding the status basing on the largest process memory in pmp-check-unix-memory
10+
* #1048627: Add '!=' comparison operator to pmp-check-mysql-status
11+
* #1021855: DOC: pmp-check-mysql-file-privs -C parameter
12+
* #1014814: Docs don't mention privileges in the config section
13+
* #1125233: [DOC] GRANT statement mentions maatkit schema but documentation specifies percona schema
14+
115
2012-06-12: version 1.0.1
216
-------------------------
317

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.0.1
1+
1.0.2

build/build.sh

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/bin/sh
2+
# PMP package build script
3+
#
4+
# Required packages: rpm-build dpkg fakeroot php perl-Time-HiRes
5+
6+
set -e
7+
8+
TARGET=/opt/PKGS
9+
WORK_DIR=/tmp/pkgbuild-`date +%s`
10+
11+
if [ -n "${JOB_NAME}${BUILD_NUMBER}${WORKSPACE}" ]; then
12+
# Build from Jenkins
13+
SOURCE=$WORKSPACE
14+
RELEASE=$BUILD_NUMBER
15+
elif [ "$#" = 2 ]; then
16+
# Manual build
17+
SOURCE=$1
18+
RELEASE=$2
19+
else
20+
echo "USAGE: use Jenkins or give args: sh build.sh <source_path> <build_number>"
21+
exit 1
22+
fi
23+
24+
# Prepare the source code and docs
25+
mkdir -p $WORK_DIR $TARGET
26+
cp -pr $SOURCE $WORK_DIR/source_code
27+
cd $WORK_DIR/source_code
28+
./make.sh nodocs > /dev/null
29+
VERSION="$(cat VERSION)"
30+
FINAL_CODE=source_code/release/percona-monitoring-plugins-$VERSION
31+
mv release/percona-monitoring-plugins-$VERSION.tar.gz $TARGET
32+
echo "Tarball created: $TARGET/percona-monitoring-plugins-$VERSION.tar.gz"
33+
34+
build_rpm() {
35+
PROJECT=$1
36+
NAME=$PROJECT-$VERSION
37+
ARCH=noarch
38+
39+
mkdir -p $WORK_DIR/rpm/{BUILD,BUILDROOT,RPMS,SOURCES,SRPMS}
40+
cp -r $WORK_DIR/$FINAL_CODE $WORK_DIR/rpm/SOURCES/$NAME
41+
cd $WORK_DIR/rpm/SOURCES/
42+
tar czf $NAME.tar.gz $NAME/
43+
cd ..
44+
45+
rpmbuild --quiet -ba $SOURCE/build/rpm/$PROJECT.spec \
46+
--define "_topdir $WORK_DIR/rpm" \
47+
--define "version $VERSION" \
48+
--define "release $RELEASE"
49+
PKG=$NAME-$RELEASE.$ARCH.rpm
50+
mv RPMS/$ARCH/$PKG $TARGET
51+
rm -rf $WORK_DIR/rpm
52+
53+
if [ "$DEBUG" = 1 ]; then
54+
rpm -qpil $TARGET/$PKG
55+
echo
56+
fi
57+
echo "Package created: $TARGET/$PKG"
58+
}
59+
60+
build_deb() {
61+
PROJECT=$1
62+
NAME=${PROJECT}_$VERSION
63+
ARCH=all
64+
65+
mkdir -p $WORK_DIR/deb/$NAME/DEBIAN
66+
cd $WORK_DIR/deb
67+
cp $SOURCE/build/deb/$PROJECT/* $WORK_DIR/deb/$NAME/DEBIAN/
68+
sed -i "s/%{version}/$VERSION-$RELEASE/" $WORK_DIR/deb/$NAME/DEBIAN/control
69+
$SOURCE/build/deb/$PROJECT/files $WORK_DIR/$FINAL_CODE $WORK_DIR/deb/$NAME
70+
71+
fakeroot dpkg --build $NAME > /dev/null
72+
PKG=${NAME}-${RELEASE}_${ARCH}.deb
73+
mv $NAME.deb $TARGET/$PKG
74+
rm -rf $WORK_DIR/deb
75+
76+
if [ "$DEBUG" = 1 ]; then
77+
echo
78+
dpkg -I $TARGET/$PKG
79+
dpkg -c $TARGET/$PKG
80+
echo
81+
fi
82+
echo "Package created: $TARGET/$PKG"
83+
}
84+
85+
build_rpm percona-nagios-plugins
86+
build_rpm percona-cacti-templates
87+
build_deb percona-nagios-plugins
88+
build_deb percona-cacti-templates
89+
90+
rm -rf $WORK_DIR
91+
exit 0
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Source: percona-cacti-templates
2+
Section: utils
3+
Priority: optional
4+
Maintainer: Percona
5+
Homepage: http://www.percona.com/software/percona-monitoring-plugins
6+
Package: percona-cacti-templates
7+
Version: %{version}
8+
Architecture: all
9+
Depends: cacti (>= 0.8.6)
10+
Description: Percona Monitoring Plugins (Nagios)
11+
The Percona Monitoring Plugins are high-quality components to add enterprise-
12+
grade MySQL monitoring and graphing capabilities to your existing in-house,
13+
on-premises monitoring solutions. The components are designed to integrate
14+
seamlessly with widely deployed solutions such as Nagios and Cacti, and are
15+
delivered in the form of templates, plugins, and scripts.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: percona-cacti-templates
3+
Source: http://www.percona.com/downloads/
4+
5+
Files: *
6+
Copyright: 2013 Percona
7+
License: GPL-2.0+
8+
9+
License: GPL-2.0+
10+
This package is free software; you can redistribute it and/or modify
11+
it under the terms of the GNU General Public License as published by
12+
the Free Software Foundation; either version 2 of the License, or
13+
(at your option) any later version.
14+
.
15+
This package is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU General Public License for more details.
19+
.
20+
You should have received a copy of the GNU General Public License
21+
along with this program. If not, see <http://www.gnu.org/licenses/>
22+
.
23+
On Debian systems, the complete text of the GNU General
24+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
SOURCE_DIR=$1
3+
DEST_DIR=$2
4+
cd $SOURCE_DIR
5+
install -m 0755 -d $DEST_DIR/usr/share/cacti/resource/percona/bin
6+
install -m 0755 -d $DEST_DIR/usr/share/cacti/resource/percona/definitions
7+
install -m 0755 -d $DEST_DIR/usr/share/cacti/resource/percona/misc
8+
install -m 0755 -d $DEST_DIR/usr/share/cacti/resource/percona/templates
9+
install -m 0755 -d $DEST_DIR/usr/share/cacti/site/scripts
10+
install -m 0755 cacti/bin/* $DEST_DIR/usr/share/cacti/resource/percona/bin
11+
install -m 0644 cacti/definitions/* $DEST_DIR/usr/share/cacti/resource/percona/definitions
12+
install -m 0644 cacti/misc/* $DEST_DIR/usr/share/cacti/resource/percona/misc
13+
install -m 0644 cacti/templates/* $DEST_DIR/usr/share/cacti/resource/percona/templates
14+
install -m 0644 cacti/scripts/* $DEST_DIR/usr/share/cacti/site/scripts
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/sh
2+
echo
3+
echo "Scripts are installed to /usr/share/cacti/site/scripts"
4+
echo "Templates are installed to /usr/share/cacti/resource/percona"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Source: percona-nagios-plugins
2+
Section: utils
3+
Priority: optional
4+
Maintainer: Percona
5+
Homepage: http://www.percona.com/software/percona-monitoring-plugins
6+
Package: percona-nagios-plugins
7+
Version: %{version}
8+
Architecture: all
9+
Description: Percona Monitoring Plugins (Nagios)
10+
The Percona Monitoring Plugins are high-quality components to add enterprise-
11+
grade MySQL monitoring and graphing capabilities to your existing in-house,
12+
on-premises monitoring solutions. The components are designed to integrate
13+
seamlessly with widely deployed solutions such as Nagios and Cacti, and are
14+
delivered in the form of templates, plugins, and scripts.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
2+
Upstream-Name: percona-nagios-plugins
3+
Source: http://www.percona.com/downloads/
4+
5+
Files: *
6+
Copyright: 2013 Percona
7+
License: GPL-2.0+
8+
9+
License: GPL-2.0+
10+
This package is free software; you can redistribute it and/or modify
11+
it under the terms of the GNU General Public License as published by
12+
the Free Software Foundation; either version 2 of the License, or
13+
(at your option) any later version.
14+
.
15+
This package is distributed in the hope that it will be useful,
16+
but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
GNU General Public License for more details.
19+
.
20+
You should have received a copy of the GNU General Public License
21+
along with this program. If not, see <http://www.gnu.org/licenses/>
22+
.
23+
On Debian systems, the complete text of the GNU General
24+
Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/sh
2+
SOURCE_DIR=$1
3+
DEST_DIR=$2
4+
LIBDIR=/usr/lib64
5+
cd $SOURCE_DIR
6+
install -m 0755 -d $DEST_DIR/$LIBDIR/nagios/plugins
7+
install -m 0755 nagios/bin/pmp-* $DEST_DIR/$LIBDIR/nagios/plugins

0 commit comments

Comments
 (0)