You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm new to Prometheus so my understanding might be wrong. I don't think the status should be a gauge? Code that I'm referring to (note the conversion from t.Status to float):
So if my reading is correct, what needs to be changed is: The descriptor for the torrent status metric should have a status field which is the string representation of the tr_torrent_activity enum, and the value for the gauge should be 1.
Status: prometheus.NewDesc(
namespace+collectorNamespace+"status",
"Status of a torrent",
[]string{"id", "name", "status"},
nil,
It makes sense both ways I'd say. I don't really have a strong opinion on this very metric.
However, keep in mind that the current way it is implemented results in n time series for n statuses whereas the approach you propose results in 7*n. It might make a bigger difference for people having a lot of torrents. As the number of statuses is limited to 7, I'd still be fine with changing it to that.
I'm new to Prometheus so my understanding might be wrong. I don't think the status should be a gauge? Code that I'm referring to (note the conversion from
t.Status
to float):transmission-exporter/cmd/transmission-exporter/torrent_collector.go
Lines 144 to 149 in df36137
The status field in the Transmission rpc spec: https://github.com/transmission/transmission/blob/46b3e6c8dae02531b1eb8907b51611fb9229b54a/extras/rpc-spec.txt#L221
Reading
transmission.h
, it looks like this is an enum that corresponding to https://github.com/transmission/transmission/blob/46b3e6c8dae02531b1eb8907b51611fb9229b54a/libtransmission/transmission.h#L1814-L1824So if my reading is correct, what needs to be changed is: The descriptor for the torrent status metric should have a
status
field which is the string representation of thetr_torrent_activity
enum, and the value for the gauge should be 1.Does it make sense? If yes I can probably send a PR to fix it.
The text was updated successfully, but these errors were encountered: