Commit Graph

72 Commits

Author SHA1 Message Date
Christoph Petrausch
a6dbb18ce5 Merge pull request #24 from hikhvar/refactor-logging
Use go.uber.org/zap for logging
2020-11-01 20:25:15 +01:00
Christoph Petrausch
25f213a37e Please the linter 2020-10-29 21:10:48 +01:00
Christoph Petrausch
126e13428b Use go.uber.org/zap for logging
As mentioned in https://github.com/hikhvar/mqtt2prometheus/issues/23, we
do not use any logging framework at all. This was fine for getting the
exporter startet. However, with inreasing load the logging must be
configureable. This PR is a start to replace all instances of
"log.Printf" with the zap logger. The current configuration parameters
are the log level and the log format (console, json). We might expose
the log configuration to the config file. But I think this is overkill
for the current state of the exporter.
2020-10-29 20:58:28 +01:00
Christoph Petrausch
a774b61b93 Mark preleases automatically in the github releases. v0.1.4-RC1 2020-10-19 22:47:25 +02:00
Christoph Petrausch
0958d4c865 Only use goreleaser for docker images v0.1.3 2020-10-19 20:27:32 +02:00
Christoph Petrausch
004444a442 Use dedicated dockerfile for goreleaser v0.1.3-RC1 2020-10-19 20:21:07 +02:00
Christoph Petrausch
880157ecec Release docker images via goreleaser 2020-10-19 20:06:59 +02:00
Christoph Petrausch
6c6c9386c3 Add supported go versions notification 2020-09-19 23:49:31 +02:00
Christoph Petrausch
90d39dbc42 Move to Go 1.15. Drop 1.13 in tests 2020-09-19 23:47:07 +02:00
Christoph Petrausch
dc07489237 Fix Sprintf v0.1.2 2020-09-19 23:41:55 +02:00
Christoph Petrausch
31b233b4b0 Support multiple mqtt2prometheus instances per host by incorporate the pid into the mqtt client ID 2020-09-19 23:39:22 +02:00
Christoph Petrausch
9e4ab531b7 Add version flag to commandline v0.1.1 2020-09-19 20:07:33 +02:00
Christoph Petrausch
41680370ca Merge pull request #18 from vikramsubramanian/master
Changed incorrect port number
2020-09-18 17:22:33 +02:00
Vikram N. Subramanian
f14e2a7696 Changed incorrect port number
As mqtt2promethius is built from source,
it should export 9641:9641 instead of 8002:8002

Fixes issue #17
2020-09-18 10:52:29 -04:00
Christoph Petrausch
357948345d Merge pull request #16 from pulsar256/feature/improve-docs
clarified usage of topic wildcard in examples/doc
2020-09-02 06:53:31 +02:00
Paul Rogalinski-Pinter
a9e61fe42a clarified usage of topic wildcard in examples/doc 2020-09-01 22:33:52 +02:00
Christoph Petrausch
0d8d9e373c Add a link to the hacking environment
Increase the visibility of the hacking enviroment. 

Fixes #15
2020-08-12 08:22:26 +02:00
Christoph Petrausch
e5431f2fe5 Update Readme.md 2020-07-18 20:43:13 +02:00
Christoph Petrausch
09cc6b1e83 Merge pull request #14 from hikhvar/support-tasmota
Support tasmota
v0.1.0-RC1 v0.1.0
2020-07-18 20:13:50 +02:00
Christoph Petrausch
cdb02b9efe Updated readme 2020-07-18 20:13:23 +02:00
Christoph Petrausch
800b8c0cc5 Append source topic to metrics 2020-07-18 18:28:52 +02:00
Christoph Petrausch
d55b83443f Updated gosund example 2020-07-18 18:23:06 +02:00
Christoph Petrausch
f13c36ab4a Breaking: Don't append + automatically to the topic 2020-07-18 18:17:29 +02:00
Christoph Petrausch
29eb9250f6 Moved to gojsonq to support nested paths 2020-07-18 18:03:49 +02:00
Christoph Petrausch
5680206095 Support arbitrary position of device id in topic
The device firmware tasmota places the device ID in the middle of the
topic path. To support those devices to this commit introduce the
device_id_regex configuration. The old behavior of the last element of
the topic path is unchanged.
2020-07-18 18:02:17 +02:00
Christoph Petrausch
ec23d61881 Rename RegexpFilter to use it for device id extraction too 2020-07-18 18:02:17 +02:00
Christoph Petrausch
acf2988842 Merge pull request #12 from hikhvar/use-timestamps
Use timestamps
2020-07-16 14:50:45 +02:00
Christoph Petrausch
43f4611812 Add comment to config.yaml.dist to show eternal presentation to prometheus 2020-07-16 14:50:24 +02:00
Christoph Petrausch
2f2a8de37e Fix port in docker run 2020-07-16 14:43:37 +02:00
Christoph Petrausch
627c52669a Update hack config 2020-07-16 14:42:38 +02:00
Christoph Petrausch
0a300339af Add complete local development stack 2020-07-16 14:41:13 +02:00
Christoph Petrausch
ecb0011f3f Merge pull request #13 from hikhvar/fix-docs
Change default port as suggested in https://github.com/prometheus/doc…
2020-06-09 16:18:45 +02:00
Christoph Petrausch
451f4c0ce1 Change default port as suggested in https://github.com/prometheus/docs/pull/1649
Updated documentation
2020-06-09 16:18:11 +02:00
Christoph Petrausch
ebeed6edee Merge pull request #10 from oxplot/sensor-name-filtering
Sensor name filtering
2020-05-25 21:28:08 +02:00
Mansour Behabadi
8d0c1e0f2b gofmt cmd/ 2020-05-22 00:43:09 +10:00
Mansour Behabadi
7b5796b042 Add sensor name filter config 2020-05-22 00:42:49 +10:00
Christoph Petrausch
443f437b46 Merge pull request #9 from oxplot/parse-more-value-types
Parse more value types
v0.0.6
2020-05-03 11:35:16 +02:00
Mansour Behabadi
1ac6f71fa3 Fix typo 2020-05-03 18:29:15 +10:00
Mansour Behabadi
6e6113efba Remove unused regex 2020-05-03 18:15:31 +10:00
Mansour Behabadi
13c47b498d Parse more value types
* Parse bools as 0 for false and 1 for true
* Allow mapping between string and float values
2020-05-03 18:11:09 +10:00
Christoph Petrausch
39a6e392d5 Merge pull request #8 from hikhvar/docker-builds
Use bash variable substitution for docker tag
v0.0.5
2020-04-22 00:59:08 +02:00
Christoph Petrausch
f545e55456 Push twice 2020-04-22 00:58:35 +02:00
Christoph Petrausch
8e5df10de9 Use bash variable substitution for docker tag v0.0.5-RC1 2020-04-22 00:50:27 +02:00
Christoph Petrausch
bdb825f357 Merge pull request #6 from hikhvar/docker-builds
Create dockerimage.yml
2020-04-22 00:29:42 +02:00
Christoph Petrausch
f0d19e17ab Build docker image on every push
Release docker image to github
v0.0.4
2020-04-22 00:29:17 +02:00
Christoph Petrausch
c5f6fda731 Migrate dockerfile also to go 1.14 2020-04-21 23:14:07 +02:00
Christoph Petrausch
708c89f0a9 Add goreleaser file and badges v0.0.3 2020-04-21 22:34:02 +02:00
Christoph Petrausch
7eb393e433 Use github actions for CI 2020-04-21 22:18:14 +02:00
Christoph Petrausch
1de13bc192 Migrate to go modules 2020-04-21 22:17:42 +02:00
Christoph Petrausch
0b308a5ea3 Remove unused package 2020-04-21 22:07:31 +02:00