Skip to content

Commit c74142d

Browse files
authored
Merge pull request #106 from prometheus-community/superq/build
Release v0.6.0
2 parents 3edb372 + f3543fd commit c74142d

File tree

8 files changed

+24
-58
lines changed

8 files changed

+24
-58
lines changed

Diff for: .circleci/config.yml

+3-46
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ executors:
99
# also be updated.
1010
golang:
1111
docker:
12-
- image: cimg/go:1.20
12+
- image: cimg/go:1.21
1313

1414
jobs:
1515
test:
@@ -21,46 +21,6 @@ jobs:
2121
- prometheus/store_artifact:
2222
file: systemd_exporter
2323

24-
codespell:
25-
docker:
26-
- image: cimg/python:3.11
27-
28-
steps:
29-
- checkout
30-
- run: pip install codespell
31-
- run: codespell --skip=".git,./vendor,ttar,go.mod,go.sum,*pem" -L uint,packages\',uptodate
32-
33-
build:
34-
machine:
35-
image: ubuntu-2204:current
36-
37-
environment:
38-
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.18-base
39-
REPO_PATH: github.com/prometheus-community/systemd_exporter
40-
41-
steps:
42-
- checkout
43-
- run: docker run --privileged linuxkit/binfmt:v0.8
44-
- run: make promu
45-
- run: promu crossbuild
46-
- run: promu --config .promu.yml crossbuild
47-
- persist_to_workspace:
48-
root: .
49-
paths:
50-
- .build
51-
- store_artifacts:
52-
path: .build
53-
destination: /build
54-
- run:
55-
command: |
56-
if [ -n "$CIRCLE_TAG" ]; then
57-
make docker DOCKER_IMAGE_TAG=$CIRCLE_TAG
58-
else
59-
make docker
60-
fi
61-
- run: docker images
62-
- run: docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T
63-
6424
workflows:
6525
version: 2
6626
systemd_exporter:
@@ -69,11 +29,8 @@ workflows:
6929
filters:
7030
tags:
7131
only: /.*/
72-
- build:
73-
filters:
74-
tags:
75-
only: /.*/
76-
- codespell:
32+
- prometheus/build:
33+
name: build
7734
filters:
7835
tags:
7936
only: /.*/

Diff for: .golangci.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
---
2+
linters:
3+
enable:
4+
- misspell
5+
- revive
6+
27
issues:
38
exclude-rules:
49
- path: _test.go
@@ -7,4 +12,8 @@ issues:
712

813
linters-settings:
914
errcheck:
10-
exclude: scripts/errcheck_excludes.txt
15+
exclude-functions:
16+
# Used in HTTP handlers, any error is handled by the server itself.
17+
- (net/http.ResponseWriter).Write
18+
# Never check for logger errors.
19+
- (github.com/go-kit/log.Logger).Log

Diff for: .promu.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
go:
22
# Whenever the Go version is updated here, .travis.yml and
33
# .circle/config.yml should also be updated.
4-
version: 1.20
4+
version: 1.21
55
repository:
66
path: github.com/prometheus-community/systemd_exporter
77
build:
88
binaries:
99
- name: systemd_exporter
10-
flags: -a -tags 'netgo static_build'
1110
ldflags: |
1211
-X github.com/prometheus/common/version.Version={{.Version}}
1312
-X github.com/prometheus/common/version.Revision={{.Revision}}

Diff for: CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
## main / unreleased
22

3+
## 0.6.0 / 2023-10-30
4+
5+
* [CHANGE] Remove broken metrics collection #68
6+
* [CHANGE] Remove use of cgroups #105
7+
* [FEATURE] Add unit timestamp metrics #58
8+
39
## 0.5.0 / 2022-07-20
410

511
Now released under the Prometheus Community

Diff for: VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.5.0
1+
0.6.0

Diff for: examples/kubernetes/daemonset.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ spec:
3131
privileged: true
3232
args:
3333
- --log.level=info
34-
- --path.procfs=/host/proc
35-
- --collector.unit-whitelist=kubelet.service|docker.service
34+
- --collector.unit-include=kubelet.service|docker.service
3635
ports:
3736
- name: metrics
3837
containerPort: 9558

Diff for: scripts/errcheck_excludes.txt

-4
This file was deleted.

Diff for: systemd/systemd.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ func (c *Collector) collectUnit(conn *dbus.Conn, ch chan<- prometheus.Metric, un
289289
logger := log.With(c.logger, "unit", unit.Name)
290290

291291
// Collect unit_state for all
292-
err := c.collectUnitState(conn, ch, unit)
292+
err := c.collectUnitState(ch, unit)
293293
if err != nil {
294294
level.Warn(logger).Log("msg", errUnitMetricsMsg, "err", err)
295295
// TODO should we continue processing here?
@@ -352,7 +352,7 @@ func (c *Collector) collectUnit(conn *dbus.Conn, ch chan<- prometheus.Metric, un
352352
return nil
353353
}
354354

355-
func (c *Collector) collectUnitState(conn *dbus.Conn, ch chan<- prometheus.Metric, unit dbus.UnitStatus) error {
355+
func (c *Collector) collectUnitState(ch chan<- prometheus.Metric, unit dbus.UnitStatus) error {
356356
// TODO: wrap GetUnitTypePropertyString(
357357
// serviceTypeProperty, err := conn.GetUnitTypeProperty(unit.Name, "Timer", "NextElapseUSecMonotonic")
358358

0 commit comments

Comments
 (0)