Skip to content

Commit fffba0b

Browse files
authored
Merge pull request #82 from percona/develop
Prepare release 0.3.1
2 parents ff40f79 + 3cc8394 commit fffba0b

File tree

9 files changed

+28
-31
lines changed

9 files changed

+28
-31
lines changed

.travis.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ language: go
44

55
go:
66
- 1.8.x
7-
- tip
7+
- 1.9.x
8+
- master
89

910
env:
1011
- MONGODB_IMAGE=mongo:3.4
@@ -22,4 +23,11 @@ script:
2223
- make format build testall
2324

2425
after_success:
25-
- bash <(curl -s https://codecov.io/bash)
26+
- bash <(curl -s https://codecov.io/bash) -X fix
27+
28+
notifications:
29+
slack:
30+
on_success: change
31+
on_failure: always
32+
rooms:
33+
secure: updWrOALfF29z30ogJ4m21WX0oOSYbRX/+abuEqXCC9zZ2QI7EoRR61hrAgNXJXUTffmUIM0vCrToYlybMsdcZHwCXWN8vr2yW3fyypfs/+rUng1qigEy1wVVIFgAC/6NruhmuUMWo1qwe4tUenQmegBiSpYRVRI10Qsnj6TggCNVz0cuoxpmzpVvNH78s1elnU4P1REWhjStuqQvKgG5cWOsvI+9l2Z+t9HdpYE7E7N3Ec73t2Z4wKhlpScbLF+mhnTWV6zgCkLaVdMshFeBEuYWmRr3D2QJWMntl/DrVaRoW76kX9nm2PQ/P4q0BdQslf5WsAiONWPOOWqK6n9RM9SegGSEXnXiqkWtmJQspa3zhjkNZStaD/g5E4yP5QnTbk4WP8ma18yQfMthXeQiQOEWj6zOTzBslu6Iyyc9QzbNijnYy3ZBBBAWGaKjFKmTrMTgl19SbAsvgi41A+zrVL5LeCwAR0/2QUdMegHZSla9WBiURgT/quA8EnA3N+ObNQBpqBETJmSPpJbqrkZI8+7oo4nFxLkwCRVyI4/XInTl5aKsRNYP95kPX3zJuUEe8x39qYhG5QcGV8G8AK0B+jrGoEB2qSN2p+Ye1XE6+Z38KktVzM3GmMOt/v+ts1ZjiaZvK0zlb7vRTMuiBmAjAnB5l5vmNSjkP6+ZL832Og=

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## v0.3.1 (2017-09-08)
4+
5+
* Better logging for scrape errors.
6+
37
## v0.3.0 (2017-07-07)
48

59
* Add standard metrics:

Makefile

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,11 @@ style:
3131

3232
test:
3333
@echo ">> running tests"
34-
rm -f coverage.txt
35-
for p in $(pkgs); do \
36-
rm -f coverage_temp.txt ; \
37-
$(GO) test -v -short -race -covermode atomic -coverprofile coverage_temp.txt $$p ; \
38-
cat coverage_temp.txt >> coverage.txt ; \
39-
done
34+
gocoverutil -coverprofile=coverage.txt test -short -v -race $(pkgs)
4035

4136
testall:
4237
@echo ">> running all tests"
43-
rm -f coverage.txt
44-
for p in $(pkgs); do \
45-
rm -f coverage_temp.txt ; \
46-
$(GO) test -v -race -covermode atomic -coverprofile coverage_temp.txt $$p ; \
47-
cat coverage_temp.txt >> coverage.txt ; \
48-
done
38+
gocoverutil -coverprofile=coverage.txt test -v -race $(pkgs)
4939

5040
format:
5141
@echo ">> formatting code"
@@ -55,22 +45,23 @@ vet:
5545
@echo ">> vetting code"
5646
@$(GO) vet $(pkgs)
5747

58-
build: promu
48+
build: init
5949
@echo ">> building binaries"
6050
@$(PROMU) build --prefix $(PREFIX)
6151

62-
tarball: promu
52+
tarball: init
6353
@echo ">> building release tarball"
6454
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR)
6555

6656
docker:
6757
@echo ">> building docker image"
6858
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" .
6959

70-
promu:
71-
@GOOS=$(shell uname -s | tr A-Z a-z) \
60+
init:
61+
$(GO) get -u github.com/AlekSi/gocoverutil
62+
GOOS=$(shell uname -s | tr A-Z a-z) \
7263
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \
7364
$(GO) get -u github.com/prometheus/promu
7465

7566

76-
.PHONY: all style format build test vet tarball docker promu
67+
.PHONY: all style format build test vet tarball docker init

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
Based on [MongoDB exporter](https://github.com/dcu/mongodb_exporter) by David Cuadrado (@dcu), but forked for full sharded support and structure changes.
99

10-
11-
## Experimental
12-
13-
The exporter is in beta/experimental state and field names are **very likely to change** and features may change or get removed!
14-
1510
## Features
1611

1712
- MongoDB Server Status metrics (*cursors, operations, indexes, storage, etc*)
@@ -76,10 +71,9 @@ Point the process to any mongo port and it will detect if it is a mongos, replic
7671
## Roadmap
7772

7873
- Document more configurations options here
79-
- Stabilize RocksDB and WiredTiger support (*currently beta/experimental*)
74+
- Stabilize RocksDB and WiredTiger support
8075
- Move MongoDB user/password/authdb to a file (for security)
8176
- Write more go tests
82-
- Version scheme
8377

8478

8579
## Submitting Bug Reports

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.3.1

collector/mongod/oplog_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ func GetOplogStatus(session *mgo.Session) *OplogStatus {
146146
collectionStats, err := GetOplogCollectionStats(session)
147147
oplogTimestamps, err := GetOplogTimestamps(session)
148148
if err != nil {
149-
log.Error("Failed to get oplog status.")
149+
log.Errorf("Failed to get oplog status: %s", err)
150150
return nil
151151
}
152152

collector/mongod/replset_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func GetReplSetStatus(session *mgo.Session) *ReplSetStatus {
267267
result := &ReplSetStatus{}
268268
err := session.DB("admin").Run(bson.D{{"replSetGetStatus", 1}}, result)
269269
if err != nil {
270-
log.Error("Failed to get replSet status.")
270+
log.Errorf("Failed to get replSet status: %s", err)
271271
return nil
272272
}
273273
return result

collector/mongod/server_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ func GetServerStatus(session *mgo.Session) *ServerStatus {
221221
result := &ServerStatus{}
222222
err := session.DB("admin").Run(bson.D{{"serverStatus", 1}, {"recordStats", 0}}, result)
223223
if err != nil {
224-
log.Error("Failed to get server status.")
224+
log.Errorf("Failed to get server status: %s", err)
225225
return nil
226226
}
227227

collector/mongos/server_status.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ func GetServerStatus(session *mgo.Session) *ServerStatus {
137137
result := &ServerStatus{}
138138
err := session.DB("admin").Run(bson.D{{"serverStatus", 1}, {"recordStats", 0}}, result)
139139
if err != nil {
140-
log.Error("Failed to get server status.")
140+
log.Errorf("Failed to get server status: %s", err)
141141
return nil
142142
}
143143

0 commit comments

Comments
 (0)