Commit Graph

65 Commits

Author SHA1 Message Date
ston1th f8609aeee2 remove openbsd amd64 cgo dependecies
I have rewritten all CGO dependencies for OpenBSD amd64
using pure go, be able to crosscompile node_exporter.

Signed-off-by: ston1th <ston1th@giftfish.de>
2020-11-12 23:37:48 +01:00
Tobias Schmidt 2c433cdac3
Fix and simplify checkmetrics make target (#1731)
The checkmetrics target currently uses promtool v2.5.0 which doesn't
include many improvements done over the time. This change also
simplifies the promtool installation, avoiding a temporary directory by
extracting the file directly to the target destination.

Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
2020-06-02 23:45:24 +02:00
vitt-bagal 04ad4b3510 Added s390x support for docker image (#1539)
Signed-off-by: Vitthal Bagal <vitthalb@us.ibm.com>
2020-01-27 10:55:35 +01:00
Ben Kochie 67d3010a79
Add fixture update helper (#1551)
* Add makefile target to update sysfs fixtures.
* Use similar style for fixtures from procfs.
* Re-pack fixtures ttar file.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-11-23 07:52:47 -06:00
Johannes Würbach 4e5c4d464f Docker images for ARM32v7, ARM64v8 and ppc64le (#1207)
Build and publish ARM32v7, ARM64v8 and ppc64le docker images.

Signed-off-by: Johannes Würbach <johannes.wuerbach@googlemail.com>
2019-04-15 17:36:25 +02:00
Simon Pasquier dbe7badc7c Update Makefile.common (#1288)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2019-03-25 12:47:57 +01:00
James Hartig 62e87ca00c Fixed capitalization of linux in Makefile (#1252)
Signed-off-by: James Hartig <james@getadmiral.com>
2019-02-04 20:10:26 +01:00
Paul Gier 6a3b92ce57 cleanup makefile (#1232)
The recent updates to Makefile.common make some of the stuff in
Makefile unnecessary.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-01-23 21:44:12 +01:00
Mateusz Piotrowski a616953b9a Do not use .PHONY for $(PROMTOOL) (#1216)
Adding $(PROMTOOL) to .PHONY makes it impossible to provide an alternative path
to promtool.

Signed-off-by: Mateusz Piotrowski <0mp@FreeBSD.org>
2019-01-10 17:44:10 +01:00
Ben Kochie becca1275c
Convert to Go modules (#1178)
* Convert to Go modules

* Update promu config.
* Convert to Go modules.
* Update vendoring.
* Update Makefile.common.
* Update circleci config.
* Use Prometheus release tar for promtool.
* Fixup unpack

* Use temp dir for unpacking tools.
* Use BSD compatible tar command.
* OpenBSD mkdir doesn't support `-v`.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 14:01:20 +01:00
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