profile
viewpoint

hikhvar/mqtt2prometheus 52

MQTT to Prometheus gateway

hikhvar/journaldtail 18

PoC for shipping systemd logs to grafana loki

hikhvar/argos3 0

A parallel, multi-engine simulator for heterogeneous swarm robotics. This fork contains changes neccessary for my masterthesis

hikhvar/bio-rd 0

bio routing is a project to create a versatile, fast and reliable routing daemon in Golang. bio = BGP + IS-IS + OSPF

hikhvar/cronjobber 0

Cronjobber is a cronjob controller for Kubernetes with support for time zones

hikhvar/decoherence 0

A filetree compare tool

hikhvar/dht22tomqtt 0

Small ESP8266 based scatch to export DHT22 sensor readings to MQTT

startedgrafana/grafana

started time in 3 hours

fork lallspach/mqtt2prometheus

MQTT to Prometheus gateway

fork in 18 hours

startedhikhvar/mqtt2prometheus

started time in 3 days

startednpryce/adr-tools

started time in 4 days

startedbxcodec/go-clean-arch

started time in 4 days

issue openedhikhvar/mqtt2prometheus

Default port used is assigned to another exporter

Hi,

It seems this exporter would use port 9641, but according to https://github.com/prometheus/prometheus/wiki/Default-port-allocations, that port is reserved for the CoTURN exporter.

created time in 5 days

startedmicrosoft/Bringing-Old-Photos-Back-to-Life

started time in 8 days

issue commenthikhvar/mqtt2prometheus

Can't export Shelly HT, bug or configuration?

Sorry, that I didn't come back earlier to you. I had a quite busy week. I just took another shot. Until the changes, I had only configured the temperatures and it worked.

Now I altered the config to the following:

 mqtt:
   server: tcp://mosquitto:1883
   topic_path: shellies/shellyht-Wohnzimmer/sensor/+
   device_id_regex: "shellies/(?P<deviceid>.*)/sensor"
   metric_per_topic_config:
     metric_name_regex: "shellies/(?P<deviceid>.*)/sensor/(?P<metricname>.*)"
   qos: 0
 cache:
   timeout: 24h
 metrics:
   - prom_name: temperature
     mqtt_name: temperature
     help: shelly temperature reading
     type: gauge
     const_labels:
       sensor_type: shelly
   - prom_name: humidity
     mqtt_name: humidity
     help: shelly humidity reading
     type: gauge
     const_labels:
       sensor_type: shelly

The only measurements now is the humidity value:

mg@raspberrypi:~/docker/monitoring $ curl -s http://localhost:9641/metrics | grep shellyht
humidity{sensor="shellyht-Wohnzimmer",sensor_type="shelly",topic="shellies/shellyht-Wohnzimmer/sensor/humidity"} 57 1605466031173
received_messages{status="success",topic="shellies/shellyht-Wohnzimmer/sensor/act_reasons"} 1
received_messages{status="success",topic="shellies/shellyht-Wohnzimmer/sensor/battery"} 1
received_messages{status="success",topic="shellies/shellyht-Wohnzimmer/sensor/error"} 1
received_messages{status="success",topic="shellies/shellyht-Wohnzimmer/sensor/humidity"} 1
received_messages{status="success",topic="shellies/shellyht-Wohnzimmer/sensor/temperature"} 1
calligross

comment created time in 10 days

startedhikhvar/mqtt2prometheus

started time in 11 days

delete branch inovex/mqtt-stresser

delete branch : remove-superflous-sleep

delete time in 11 days

startedhikhvar/mqtt2prometheus

started time in 13 days

push eventinovex/mqtt-stresser

Christoph Petrausch

commit sha a9c6042ffc1d1311b2bd5ff9e20f2f34a557f67a

Remove second sleep of rampup delay It does not make sense to wait the rampup delay two times. The select is enough. Fixes #48

view details

Christian Rohmann

commit sha 4919198ab3b64158deddb7b43846dde61275d668

Merge pull request #49 from inovex/remove-superflous-sleep Remove second sleep of rampup delay

view details

push time in 13 days

PR merged inovex/mqtt-stresser

Remove second sleep of rampup delay

It does not make sense to wait the rampup delay two times. The select is enough.

Fixes #48

+0 -1

0 comment

1 changed file

hikhvar

pr closed time in 13 days

issue closedinovex/mqtt-stresser

why sleep two rampUpDelay interval?

time.Sleep(rampUpDelay).    // <-- here is first 
select {
case <-time.NewTimer(rampUpDelay).C:       // <-- here is second
case s := <-signalChan:
fmt.Printf("Got signal %s. Cancel test.\n", s.String())
cancelFunc()
stopStartLoop = true
}

why need two ?

closed time in 13 days

yanggeorge

startedgoogle/cadvisor

started time in 14 days

startedGoogleContainerTools/skaffold

started time in 14 days

started15Dkatz/official_joke_api

started time in 14 days

issue openedinovex/mqtt-stresser

why sleep two rampUpDelay interval?

			time.Sleep(rampUpDelay).    # <-- here is first 
			select {
			case <-time.NewTimer(rampUpDelay).C:       # <-- here is second
			case s := <-signalChan:
				fmt.Printf("Got signal %s. Cancel test.\n", s.String())
				cancelFunc()
				stopStartLoop = true
			}

why need two ?

created time in 14 days

startedhikhvar/ts3exporter

started time in 15 days

startedhikhvar/mqtt2prometheus

started time in 16 days

issue commenthikhvar/mqtt2prometheus

Can't export Shelly HT, bug or configuration?

Thanks so much! I just tried it out and it seems to work, if there is only one metric. As soon as I added humidity and battery, it only showed the last configured metric. But I just did a quick check, I will take a more sorrow look tomorrow.

calligross

comment created time in 17 days

PR opened bio-routing/bio-rd

WIP: IS-IS: Add LSDB
+470 -0

0 comment

4 changed files

pr created time in 17 days

push eventbio-routing/bio-rd

Oliver Herms

commit sha 274db493cbc3bdf5d24c8f6a2af55c6cec1c7c4a

IS-IS: Add LSDB

view details

push time in 17 days

create barnchbio-routing/bio-rd

branch : is-is/lsdb

created branch time in 17 days

startedhikhvar/mqtt2prometheus

started time in 18 days

startedhikhvar/mqtt2prometheus

started time in 19 days

startedrobertscherbarth/cheesecake

started time in 19 days

MemberEvent

issue commenthikhvar/mqtt2prometheus

Can't export Shelly HT, bug or configuration?

Thanks for the information, its good to know, that I can stop searching. :-)

It would be awesome if an adaption is doable with reasonable effort.

calligross

comment created time in 19 days

issue openedhikhvar/mqtt2prometheus

Can't export Shelly HT, bug or configuration?

Hi!

First of all, thanks for releasing your mqtt2prometheus exporter under a OSS licence, it is much appreciated.

I'm failing to export the metrics of a Shelly HT thermometer can't figure out, what is going wrong. Maybe you have an idea and can help?

Best regards Calli

mqtt:
   server: tcp://mosquitto:1883
   topic_path: shellies/shellyht-livingroom/sensor/+
   device_id_regex: "shellies/(?P<deviceid>.*)/sensor"
   qos: 0
 cache:
   timeout: 24h
 metrics:
   - prom_name: temperature
     mqtt_name: temperature
     help: DHT22 temperature reading
     type: gauge
Starting mqtt2prometheus ... done
Attaching to mqtt2prometheus
mqtt2prometheus    | 2020-11-06T11:31:15Z	info	mqttclient/mqttClient.go:18	Connected to MQTT Broker
mqtt2prometheus    | 2020-11-06T11:31:15Z	info	mqttclient/mqttClient.go:19	Will subscribe to topic	{"topic": "shellies/shellyht-livingroom/sensor/+"}

The metrics:

/ # mosquitto_sub -t "shellies/shellyht-livingroom/sensor/+" -v
shellies/shellyht-livingroom/sensor/temperature 29.12
shellies/shellyht-livingroom/sensor/humidity 41.5
shellies/shellyht-livingroom/sensor/battery 99
shellies/shellyht-livingroom/sensor/error 0
shellies/shellyht-livingroom/sensor/act_reasons ["button"]

The curl output:

mg@raspberrypi:~ $ curl raspberrypi:9641/metrics | grep shelly
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  6629    0  6629    0     0   462k      0 --:--:-- --:--:-- --:--:--  462k
received_messages{status="success",topic="shellies/shellyht-livingroom/sensor/act_reasons"} 1
received_messages{status="success",topic="shellies/shellyht-livingroom/sensor/battery"} 1
received_messages{status="success",topic="shellies/shellyht-livingroom/sensor/error"} 1
received_messages{status="success",topic="shellies/shellyht-livingroom/sensor/humidity"} 1
received_messages{status="success",topic="shellies/shellyht-livingroom/sensor/temperature"} 1

created time in 19 days

more