Commit Graph

55 Commits

Author SHA1 Message Date
Kazumasa Kohtaka
9bd4416822 Makefile: add target for checking Prometheus rules (#1126)
Signed-off-by: Kazumasa Kohtaka <kkohtaka@gmail.com>
2018-10-30 18:44:17 +01:00
Ben Kochie
7519967619
Fix promu config (#1119)
Rename promu no-cgo config to default promu name to avoid crossbuild
problems.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-10-20 08:21:51 +02:00
Ben Kochie
c7dfb82dac
Update build (#1081)
* Update build

* Only use CGO when building non-Linux.
* Update build to Go 1.11
* Use tab indenting consistently.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-09-25 16:02:42 +02:00
Ben Kochie
ca2fa4684b
Fix docker build (#1016)
Fix override of make docker target to include new `DOCKER_REPO`
variable pattern.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-07-23 10:56:20 +02:00
Ben Kochie
981de58fad
Update build (#1010)
* Update from upstream `Makefile.common`.
* Update CircleCI with simplifed upstream templating.
* Cleanup `Makefile`.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-07-23 09:38:39 +02:00
Ivan Voronchihin
606568314b Add Makefile.common (#940)
* Add Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Change Makefile.common to initial Prometheus common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* fix checkmetrics

Signed-off-by: bege13mot <bege13mot@gmail.com>

* fix promu

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Add test to common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Fix GOPATH

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Initial Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* original Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* delete promu

Signed-off-by: bege13mot <bege13mot@gmail.com>

* delete redundant .PRONY params

Signed-off-by: bege13mot <bege13mot@gmail.com>
2018-05-24 23:31:48 +02:00
Alexey Kopytov
dd98a09bb2 A couple of ARM64-related fixes (#934)
* Do not rely on AArch64 CPUs to support 32-bit ARM for cross-testing.

Signed-off-by: Alexey Kopytov <akopytov@gmail.com>

* aarch64 like ppc64le reports 64k node_sockstat_TCP_mem_bytes due to 64k pages.

Signed-off-by: Alexey Kopytov <akopytov@gmail.com>
2018-05-14 15:55:49 +02:00
Ben Kochie
4c863f3b5d
Merge pull request #894 from prometheus/superq/ttar_cleanup
Cleanup sys fixtures before unpacking
2018-04-14 15:00:39 +02:00
Ben Kochie
1bdfe77315 Cleanup sys fixtures before unpacking
Make sure we cleanup the sys fixtures before unpacking to avoid obsolete
files and conflicts from sticking around.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-11 12:08:00 +02:00
Tobias Schmidt
22e79102e6 Fix code style check in "all" make target
The all target should abort on incorrectly formatted code, instead of
formatting it. The CI pipeline should fail and not silently accept
wrong code.

Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
2018-04-10 18:34:48 +02:00
Zach Leslie
6b1301fb24 Remove -race test flag to build on OpenBSD (#883)
Without this change, running 'gmake' as the documentation does not finish the
build process to produce the binary.

Signed-off-by: Zach Leslie <xaque208@gmail.com>
2018-04-06 18:50:26 +02:00
Ben Kochie
65e485c4e9
Convert circleci config to 2.0. (#844) 2018-03-08 12:43:49 +01:00
Dan Fredell
84719ef59a On SunOS/ solaris/ SmartOS the go test flag of -rance isn't supported. (#762) 2018-02-28 18:05:35 +01:00
Ben Kochie
d33a447047
Remove deprecated prometheus.InstrumentHandlerFunc (#831)
Update Prometheus client golang use to use `promhttp.Handler()` instead
of `prometheus.InstrumentHandlerFunc()`.
2018-02-19 15:44:59 +01:00
Matt Layher
dcb31670d6 Makefile: add checkmetrics target, use in CI (#797) 2018-02-13 18:04:03 +01:00
Siavash Safi
f3a7022602 Add collect[] parameter (#699)
* Add `collect[]` parameter

* Add TODo comment about staticcheck ignored

* Restore promhttp.HandlerOpts

* Log a warning and return HTTP error instead of failing

* Check collector existence and status, cleanups

* Fix warnings and error messages

* Don't panic, return error if collector registration failed

* Update README
2017-10-14 14:23:42 +02:00
Derek Marcotte
a6b8922a01 Only enable race detector when GOHOSTARCH is amd64.
This enables native builds to still run the test and all targets without
problems on say 386.

Build failure on Buildkite build 85, prevents enabling native FreeBSD
386 builds.
2017-10-03 16:40:22 -04:00
Matthias Rampke
d3e3a9c181 Only cross-test 32bit on Linux (#658)
This doesn't work on at least FreeBSD and Darwin. It does work on Linux,
only try it there.
2017-08-24 09:13:17 +02:00
Matthias Rampke
7420046383 Automatically cross-test 32bit based on GOARCH
Try to determine the corresponding 32bit architecture from the current
GOARCH and run the tests under that architecture. This only works on a
GOOS/GOARCH that can execute binaries for the smaller architecture, such
as running linux/386 binaries under linux/amd64.

I tested that this works under linux/amd64 and darwin/amd64, the rest of
the architectures is guesswork.

While we still only run regular tests on Intel/Linux architectures, this
covers general integer overflow issues like #629.
2017-08-21 17:27:25 +00:00
Hemant Kumar
de08e38c5e Add dockerfile for ppc64le (#638)
* Add dockerfile for ppc64le and related changes

* Pass the fill file as DOCKEFILE

* Add the dockerfile name to build msg
2017-08-17 11:53:04 +02:00
Jerome Froelich
cb14fff6c6 [test] Call cmd.Start and cmd.Wait separately to avoid triggering race detector (#616)
* [test] Call cmd.Start and cmd.Wait separately to avoid triggering race detector

* [test] Enable race detector for tests
2017-07-08 20:15:40 +02:00
ideaship
8d90276283 Add bcache collector (#597)
* Add bcache collector for Linux

This collector gathers metrics related to the Linux block cache
(bcache) from sysfs.

* Removed commented out code

* Use project comment style

* Add _sectors to metric name to indicate unit

* Really use project comment style

* Rename bcache.go to bcache_linux.go

* Keep collector namespace clean

Rename:
- metric -> bcacheMetric
- periodStatsToMetrics -> bcachePeriodStatsToMetric

* Shorten slice initialization

* Change label names to backing_device, cache_device

* Remove five minute metrics (keep only total)

* Include units in additional metric names

* Enable bcache collector by default

* Provide metrics in seconds, not nanoseconds

* remove metrics with label "all"

* Add fixtures, update end-to-end for bcache collector

* Move fixtures/sys into tar.gz

This changeset moves the collector/fixtures/sys directory into
collector/fixtures/sys.tar.gz and tweaks the Makefile to unpack the
tarball before tests are run.

The reason for this change is that Windows does not allow colons in a
path (colons are present in some of the bcache fixture files), nor can
it (out of the box) deal with pathnames longer than 260 characters
(which we would be increasingly likely to hit if we tried to replace
colons with longer codes that are guaranteed not the turn up in regular
file names).

* Add ttar: plain text archive, replacement for tar

This changeset adds ttar, a plain text replacement for tar, and uses it
for the sysfs fixture archive. The syntax is loosely based on tar(1).

Using a plain text archive makes it possible to review changes without
downloading and extracting the archive. Also, when working on the repo,
git diff and git log become useful again, allowing a committer to verify
and track changes over time.

The code is written in bash, because bash is available out of the box on
all major flavors of Linux and on macOS. The feature set used is
restricted to bash version 3.2 because that is what Apple is still
shipping.

The programm also works on Windows if bash is installed. Obviously, it
does not solve the Windows limitations (path length limited to 260
characters, no symbolic links) that prompted the move to an archive
format in the first place.
2017-07-07 07:20:18 +02:00
Giancarlo Rubio
1438243934 test docker image before pushing 2017-04-12 10:47:21 +02:00
Johannes 'fish' Ziemke
7ad91b84c4 Merge pull request #531 from prometheus/grobie/update-promu-by-default
Download promu and staticcheck every time by default
2017-03-23 11:35:39 +01:00
Tobias Schmidt
31189c9507 Download promu and staticcheck every time by default
If this is not desired, copy/symlink these binaries to a different path and
set the respective environment variables. For example:

    ln -s "$(GOPATH)/bin/{promu,staticcheck}" /usr/local/bin/
    PROMU=/usr/local/bin/promu STATICCHECK=/usr/local/bin/staticcheck make
2017-03-22 22:02:21 -03:00
Pontus Leitzler
2c3a652f58 Use go env to fetch GOPATH to support Go 1.8
Go 1.8 do not require env GOPATH to be set and make will fail if it isn't set.
2017-03-22 18:20:32 +01:00
Tobias Schmidt
301d8e4bc0 Don't declare real dependencies as phony targets
This will execute these targets every single time, even if they already
exist on disk.
2017-03-04 12:56:26 -04:00
Matt Layher
748f835171
Run staticcheck from Makefile, remove duplicate end-to-end test call in CI 2017-03-02 10:52:41 -05:00
Birger Schmidt
6cb6e38bbb disable end-to-end tests for non Linux OSes in Makefile
The End-to-end tests as they are now, are very dependent on running on Linux.
This makes the Makefile more OS agnostic regarding end to end tests.
2017-02-28 13:17:06 +01:00
Johannes 'fish' Ziemke
2c5f17d4e7 Fix Makefile by using first element of GOPATH
If GOPATH includes multiple paths, running `make promu` would fail.
This fixes it by always using the first path.
2016-12-29 18:52:36 +01:00
Christian Svensson
ee1a0cc3cc Allow overrides for GO and PROMU
This allows the user to override how/where promu and/or go is invoked.
2016-12-22 00:38:47 +01:00
Johannes 'fish' Ziemke
3b1ef14e7b Add end-to-end tests as default Makefile target 2016-12-21 12:00:32 +01:00
Steve Durrheimer
158200fd49
New release process using docker, circleci and a centralized
building tool
2016-04-28 22:07:21 +02:00
Matthias Rampke
20ecedd0b4 And one more, because I don't know how to version. 2016-02-04 12:43:50 +00:00
Matthias Rampke
1cdea5196e Release 0.12.0rc2. 2016-02-04 12:41:05 +00:00
Daniel Bechler
fc3931c924 Add build_info metric similar to the one of Prometheus itself 2016-01-06 23:54:33 +01:00
Tobias Schmidt
e70cbd2045 Release 0.12.0rc1 2015-10-06 13:36:27 -04:00
Eric Ripa
a8fbe6a20d Changed Go version to 1.5.1 2015-08-29 08:01:31 +02:00
Ian Hansen
31ca1ae0a6 Cut version 0.11.0 2015-07-27 10:27:09 -04:00
Julius Volz
8b3cf08b03 Cut version 0.10.0. 2015-06-10 17:53:36 +02:00
Matthias Rampke
433e2c584f Cut release 0.9.0
This release adds the IPVS collector and removes the deprecated
attributes collector.
2015-05-24 09:45:20 +00:00
Johannes 'fish' Ziemke
d1822e4749 Bump version 2015-05-05 13:28:50 +02:00
Tobias Schmidt
626900fe21 Log version at startup 2015-04-16 00:02:08 -04:00
Julius Volz
b3e5a8e046 Release version 0.8.0 and introduce changelog. 2015-03-09 19:16:10 +01:00
Julius Volz
cdf83741c2 Use Makefile.COMMON in node exporter. 2015-03-09 19:14:42 +01:00
Julius Volz
effc934777 Add tests and run info to README.md and Makefile. 2015-02-09 22:42:23 +01:00
Julius Volz
225b88bc31 Fix Go download link for several archs and OSes. 2015-02-05 16:54:53 +01:00
Fabian Reinartz
59f9faf416 Use https:// GOURL 2015-01-31 22:46:42 +01:00
Fabian Reinartz
52b6911c52 fix go tarball download for OS X, use redirect from golang.org 2015-01-31 22:00:15 +01:00
Brian Brazil
a9fdaf184c Make build hermetic.
This makes a simple 'make' work on a machine without golang,
and doesn't pull in libraries from elsewhere.

Bump golang version, 1.3 doesn't do http basic auth.
2015-01-25 12:43:10 +00:00